A2A MCP Server for Claude and A2A Agents
Connect MCP-compatible assistants like Claude with A2A agents using an MCP server that bridges MCP and A2A protocols.
npx -y @GongRzhe/A2A-MCP-ServerOverview
A2A MCP Server is a lightweight bridge that connects MCP-compatible assistants (for example, Anthropic Claude running with an MCP integration) to A2A agents and tools. It translates Model Context Protocol (MCP) actions and events into the A2A agent protocol and vice versa, allowing an assistant to call, monitor, and receive results from external A2A-enabled tooling and services.
This server is useful when you need to enable multimodal workflows or tool use from an MCP-enabled assistant without changing the assistant itself. By exposing a consistent HTTP/webhook interface on both sides, the server centralizes routing, authorization, and simple message translation so developers can register tools, inspect traffic for debugging, and orchestrate agents during development or production deployments.
Features
- Bidirectional bridge between MCP and A2A protocols
- Simple HTTP webhook endpoints for registering agents and receiving assistant events
- Pluggable authorization via bearer tokens or API keys
- Message translation: converts MCP tool calls/events into A2A invocations and maps responses back
- Docker and local development support
- Logging and basic observability for message flows
Installation / Configuration
Clone and run locally or via Docker. Example commands:
Clone repository:
Run with Node (example):
# install dependencies
# environment variables (example)
# start dev server
Run with Docker:
# build image
# run container
Example docker-compose.yml:
version: "3.8"
services:
a2a-mcp:
image: a2a-mcp-server:latest
ports:
- "8080:8080"
environment:
MCP_PORT: 8080
A2A_PORT: 9090
MCP_AUTH_TOKEN: "mcp-secret"
A2A_AUTH_TOKEN: "a2a-secret"
Configuration options (common env vars):
- MCP_PORT: HTTP port to expose MCP endpoints (default: 8080)
- A2A_PORT: HTTP port for A2A endpoints or internal agent callbacks
- MCP_AUTH_TOKEN / A2A_AUTH_TOKEN: static bearer tokens used to authorize incoming requests
- LOG_LEVEL: debug|info|warn|error
Available Resources
API endpoints (typical):
| Endpoint | Method | Purpose |
|---|---|---|
| /mcp/events | POST | Receive MCP assistant events (tool calls, responses, lifecycle events) |
| /mcp/connect | POST | Register or handshake an MCP-compatible assistant |
| /a2a/register | POST | Register an A2A agent/tool with the bridge |
| /a2a/invoke | POST | Internally invoked to trigger a registered A2A agent |
| /health | GET | Health and readiness check |
Example: register an A2A tool
Example: MCP event forwarded to A2A
The bridge will call the registered A2A tool endpoint, await a response (or stream results back if configured), then POST a corresponding result back to the MCP assistant webhook.
Use Cases
- Connect Claude (or another MCP-enabled assistant) to internal automation agents: let the assistant call internal services (deployment, CI checks, data lookup) via A2A agents without exposing those services directly to the assistant provider.
- Orchestrate multi-agent workflows: use the server to coordinate calls among multiple A2A agents triggered by assistant prompts, aggregating results and returning them to the assistant in context.
- Local testing and development: emulate an A2A environment locally while developing MCP-driven assistant experiences. The bridge makes it easy to stub agents and inspect translated messages.
- Audit and debugging: centralize logs of assistant tool calls and agent responses for troubleshooting model-tool interactions.
Notes and Next Steps
- Secure deployment: use HTTPS and strong tokens or mutual TLS for production; rotate keys regularly.
- Scalability: the server is intended as a lightweight bridge. For high throughput, deploy behind load balancers and scale agent backends independently.
- Extensibility: add custom adapters to translate specific A2A agent payloads or to support streaming responses.
GitHub repository: https://github.com/GongRzhe/A2A-MCP-Server — consult the repo for the latest code examples, issues, and contribution guidelines.