Replies: 1 comment 2 replies
-
Here is one way to do it from autogen_ext.tools.mcp import SseServerParams, mcp_server_tools
from autogen_ext.models.openai import OpenAIChatCompletionClient
async def main():
excel_server_params = SseServerParams(url=excel_mcp_server_url)
excel_tools = await mcp_server_tools(excel_server_params)
mysql_server_params = SseServerParams(url=mysql_mcp_server_url)
mysql_tools = await mcp_server_tools(mysql_server_params)
tools = excel_tools + mysql_tools
agent = AssistantAgent(
name="tool_user",
model_client=OpenAIChatCompletionClient(
model=model_name,
api_key="-",
base_url=llm_host,
model_info={
"json_output": False,
"function_calling": True,
"vision": False,
"family": "unknown",
"structured_output": False
}
),
tools=tools
) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible for single agent to connect to multiple MCP server?
Ex: i am have 2 MCP server (Mysql and Excel).
I need to query MySQL database and store the results in a xls.
Beta Was this translation helpful? Give feedback.
All reactions