Prerequisites
- Python 3.10+
- Node.js 18+
- Agent MCP Studio at agentmcp.studio
Step-by-Step Setup
Install AutoGen
pip install "autogen-agentchat" "autogen-ext[mcp]"
Start bridge.js
curl -O https://agentmcp.studio/bridge.js && npm install ws node bridge.js wss://agentmcp.studio/api/relay/YOUR-UUID
Open the studio โ Settings โ MCP Relay Bridge โ click Connect.
-
Use McpWorkbench in your agents
import asyncio from autogen_agentchat.agents import AssistantAgent from autogen_agentchat.ui import Console from autogen_ext.models.anthropic import AnthropicChatCompletionClient from autogen_ext.tools.mcp import McpWorkbench, StdioServerParams async def main(): server_params = StdioServerParams( command="node", args=[ "/path/to/bridge.js", "wss://agentmcp.studio/api/relay/YOUR-UUID" ] ) async with McpWorkbench(server_params=server_params) as workbench: model = AnthropicChatCompletionClient(model="claude-3-5-sonnet-20241022") agent = AssistantAgent( "assistant", model_client=model, workbench=workbench ) await Console(agent.run_stream( task="Query the database tool to get our top customers" )) asyncio.run(main())
Frequently Asked Questions
Yes โ AutoGen (v0.4+) includes MCP support via MCPToolAdapter in the autogen-ext package. You can connect AutoGen agents to any MCP server, including Agent MCP Studio via bridge.js.
Use StdioServerParams from autogen_ext.tools.mcp pointing to bridge.js + relay URL, then MCPToolAdapter to wrap MCP tools as AutoGen-compatible tools. Pass them to any AssistantAgent.
AutoGen Studio (the visual interface for AutoGen) supports tool configuration, but MCP integration currently works best programmatically via the Python SDK. Full AutoGen Studio MCP UI support is in progress.
Yes โ each AutoGen agent that needs tools gets its own MCPToolAdapter instance pointing to the same relay URL. Multiple adapters/agents can run concurrently against one Agent MCP Studio session.
AutoGen v0.4 (the new async-first rewrite) has official MCP support via autogen-ext. AutoGen v0.2 (legacy) requires manual tool wrappers. Use v0.4+ for the cleanest MCP integration experience.