The A2A MCP Server bridges the Model Context Protocol with the Agent-to-Agent protocol, enabling AI assistants like Claude to seamlessly connect with A2A agents. This integration layer allows MCP clients to discover, register, and communicate with A2A agents through a unified interface.
npx -y @smithery/cli install @GongRzhe/A2A-MCP-Server --client claude
pip install a2a-mcp-server
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
Configure the server using these environment variables:
# 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"
The server supports multiple transport methods:
stdio (default): Uses standard input/output for communication
streamable-http: HTTP transport with streaming support
sse: Server-Sent Events transport
# Using default settings (stdio transport)
uvx a2a-mcp-server
# Using HTTP transport on specific host and port
MCP_TRANSPORT=streamable-http MCP_HOST=127.0.0.1 MCP_PORT=8080 uvx a2a-mcp-server
Add the server to your claude_desktop_config.json
file, located at:
%APPDATA%\Claude\claude_desktop_config.json
~/Library/Application Support/Claude/claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
"a2a": {
"command": "uvx",
"args": [
"a2a-mcp-server"
]
}
"a2a": {
"command": "C:\\path\\to\\python.exe",
"args": [
"C:\\path\\to\\A2A-MCP-Server\\a2a_mcp_server.py"
],
"env": {
"MCP_TRANSPORT": "stdio",
"PYTHONPATH": "C:\\path\\to\\A2A-MCP-Server"
}
}
# If using local installation
python config_creator.py
Start the MCP server with HTTP transport:
MCP_TRANSPORT=streamable-http MCP_HOST=127.0.0.1 MCP_PORT=8000 uvx a2a-mcp-server
In Claude web interface, enable the MCP URL connection in Tools menu with http://127.0.0.1:8000/mcp
Add the configuration to your claude_desktop_config.json
file as described above.
http://127.0.0.1:8000/mcp
http://127.0.0.1:8000/mcp
register_agent: Register an A2A agent
{
"name": "register_agent",
"arguments": {
"url": "http://localhost:41242"
}
}
list_agents: Get registered agents
{
"name": "list_agents",
"arguments": {}
}
unregister_agent: Remove an agent
{
"name": "unregister_agent",
"arguments": {
"url": "http://localhost:41242"
}
}
send_message: Send a message to an agent
{
"name": "send_message",
"arguments": {
"agent_url": "http://localhost:41242",
"message": "What's the exchange rate from USD to EUR?",
"session_id": "optional-session-id"
}
}
send_message_stream: Send a message and stream response
{
"name": "send_message_stream",
"arguments": {
"agent_url": "http://localhost:41242",
"message": "Tell me a story about AI agents.",
"session_id": "optional-session-id"
}
}
get_task_result: Retrieve a task's result
{
"name": "get_task_result",
"arguments": {
"task_id": "b30f3297-e7ab-4dd9-8ff1-877bd7cfb6b1",
"history_length": null
}
}
cancel_task: Cancel a running task
{
"name": "cancel_task",
"arguments": {
"task_id": "b30f3297-e7ab-4dd9-8ff1-877bd7cfb6b1"
}
}
User: Register an agent at http://localhost:41242
Claude uses: register_agent(url="http://localhost:41242")
Claude: Successfully registered agent: ReimbursementAgent
User: Ask the agent what it can do
Claude uses: send_message(agent_url="http://localhost:41242", message="What can you do?")
Claude: I've sent your message. Here's the task_id: b30f3297-e7ab-4dd9-8ff1-877bd7cfb6b1
User: Get the answer to my question
Claude uses: get_task_result(task_id="b30f3297-e7ab-4dd9-8ff1-877bd7cfb6b1")
Claude: The agent replied: "I can help you process reimbursement requests. Just tell me what you need to be reimbursed for, including the date, amount, and purpose."
/.well-known/agent.json
list_agents
)claude_desktop_config.json
"command": "python"
MCP_TRANSPORT
is set to "stdio"
in the env
sectionconfig_creator.py
script for automatic configurationTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "a2a" '{"command":"uvx","args":["a2a-mcp-server"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"a2a": {
"command": "uvx",
"args": [
"a2a-mcp-server"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"a2a": {
"command": "uvx",
"args": [
"a2a-mcp-server"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect