A2A
- python
138
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
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.
How to use
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.
How to install
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 claude
Option 2: Install from PyPI (recommended for Python environments)
pip install a2a-mcp-server
Option 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-server
Configuration and running
Configure 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"
Starting in different transports
To run with stdio communication (local usage or Claude Desktop integration requires this mode):
uvx a2a-mcp-server
To 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-server
Available tools
register_agent
Register an A2A agent with the bridge server by providing the agent URL.
list_agents
Retrieve a list of all agents currently registered with the bridge server.
unregister_agent
Remove a previously registered A2A agent from the bridge server using its URL.
send_message
Send a message to a registered A2A agent and obtain a task_id for the response.
send_message_stream
Send a message to a registered A2A agent and stream the response in real time.
get_task_result
Fetch the result of a previously submitted task using its task_id.
cancel_task
Cancel a running task by its task_id.