A mcp server that bridges the Model Context Protocol (MCP) with the Agent-to-Agent (A2A) protocol, enabling MCP-compatible AI assistants (like Claude) to seamlessly interact with A2A agents.
Configuration
View docs{
"mcpServers": {
"gongrzhe-a2a-mcp-server": {
"url": "http://127.0.0.1:8000/mcp",
"headers": {
"MCP_HOST": "0.0.0.0",
"MCP_PATH": "/mcp",
"MCP_PORT": "8000",
"MCP_DEBUG": "true",
"MCP_SSE_PATH": "/sse",
"MCP_TRANSPORT": "streamable-http"
}
}
}
}You connect MCP clients to A2A agents through a dedicated bridge server that translates between Model Context Protocol (MCP) requests and the Agent-to-Agent (A2A) protocol. This enables MCP-enabled assistants to discover, register, communicate with, and manage tasks on A2A agents with a unified, secure interface.
You run the A2A MCP Server and connect your MCP client (such as Claude) to it. Start the server in either stdio mode for local development or streamable-http mode for production deployments. Register A2A agents you want to manage, send messages to those agents, and retrieve results using task identifiers. You can also stream responses in real time and cancel tasks if needed. Use the standard MCP client workflow to register an agent, send a message, and then fetch the corresponding results.
Prerequisites: ensure you have Python and pip installed for Python-based components, and Node.js with npm or npx for tooling and deployment convenience.
# Option 1: Install via Smithery (Claude Desktop integration)
npx -y @smithery/cli install @GongRzhe/A2A-MCP-Server --client claudeOption 2: Install from PyPI (recommended for Python environments)
pip install a2a-mcp-serverOption 3: Local installation (clone and run from source)
git clone https://github.com/GongRzhe/A2A-MCP-Server.git
cd A2A-MCP-Server
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
uvx a2a-mcp-serverConfigure how the MCP server runs using environment variables. The following variables control transport, host, port, and debug logging.
# Transport type: stdio, streamable-http, or sse
export MCP_TRANSPORT="streamable-http"
# Host for the MCP server
export MCP_HOST="0.0.0.0"
# Port for the MCP server (when using HTTP transports)
export MCP_PORT="8000"
# Path for the MCP server endpoint (when using HTTP transports)
export MCP_PATH="/mcp"
# Path for SSE endpoint (when using SSE transport)
export MCP_SSE_PATH="/sse"
# Enable debug logging
export MCP_DEBUG="true"To run with stdio communication (local usage or Claude Desktop integration requires this mode):
uvx a2a-mcp-serverTo run with HTTP streaming for web clients (production-friendly):
MCP_TRANSPORT=streamable-http MCP_HOST=127.0.0.1 MCP_PORT=8080 uvx a2a-mcp-serverRegister an A2A agent with the bridge server by providing the agent URL.
Retrieve a list of all agents currently registered with the bridge server.
Remove a previously registered A2A agent from the bridge server using its URL.
Send a message to a registered A2A agent and obtain a task_id for the response.
Send a message to a registered A2A agent and stream the response in real time.
Fetch the result of a previously submitted task using its task_id.
Cancel a running task by its task_id.