A2A MCP Server

by yw0nam

Not rated
GitHub

About

A bridge server connecting Model Context Protocol (MCP) with Agent-to-Agent (A2A) protocol.

Details

Author
yw0nam
Categories
Communication, AI, Automation

Setup

Install A2A MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/yw0nam/mcp_a2a_gateway

Follow the installation instructions in the repository README, then restart your MCP client.

A bridge server connecting Model Context Protocol (MCP) with Agent-to-Agent (A2A) protocol.

A gateway 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.

This project serves as an integration layer between two cutting-edge AI agent protocols:

-

Model Context Protocol (MCP): Developed by Anthropic, MCP allows AI assistants to connect to external tools and data sources. It standardizes how AI applications and large language models connect to external resources in a secure, composable way.

Agent-to-Agent Protocol (A2A): Developed by Google, A2A enables communication and interoperability between different AI agents through a standardized JSON-RPC interface.

By bridging these protocols, this server allows MCP clients (like Claude) to discover, register, communicate with, and manage tasks on A2A agents through a unified interface.

# Run with default settings (stdio transport) uvx mcp-a2a-gateway # Run with HTTP transport for web clients MCP_TRANSPORT=streamable-http MCP_PORT=10000 uvx mcp-a2a-gateway # Run with custom data directory MCP_DATA_DIR="/Users/your-username/Desktop/a2a_data" uvx mcp-a2a-gateway # Run with specific version uvx mcp-a2a-gateway==0.1.6 # Run with multiple environment variables MCP_TRANSPORT=stdio MCP_DATA_DIR="/custom/path" LOG_LEVEL=DEBUG uvx mcp-a2a-gateway
# Clone and run locally git clone https://github.com/yw0nam/MCP-A2A-Gateway.git cd MCP-A2A-Gateway # Run with uv uv run mcp-a2a-gateway # Run with uvx from local directory uvx --from . mcp-a2a-gateway # Run with custom environment for development MCP_TRANSPORT=streamable-http MCP_PORT=8080 uvx --from . mcp-a2a-gateway

1, Run The hello world Agent in A2A Sample

2, Use Claude or github copilot to register the agent.

3, Use Claude to Send a task to the hello Agent and get the result.

4, Use Claude to retrieve the task result.

- Register A2A agents with the bridge server
- List all registered agents
- Unregister agents when no longer needed

- Send messages to A2A agents and receive responses
- Asynchronous message sending for immediate server response.
- Stream responses from A2A agents in real-time

- Track which A2A agent handles which task
- Retrieve task results using task IDs
- Get a list of all tasks and their statuses.
- Cancel running tasks

- Multiple transport types: stdio, streamable-http, SSE
- Configure transport type using MCP_TRANSPORT environment variable

Before you begin, ensure you have the following installed:

Run directly without installation usinguvx:

git clone https://github.com/yw0nam/MCP-A2A-Gateway.git cd MCP-A2A-Gateway
# Using uvx MCP_TRANSPORT=streamable-http MCP_HOST=0.0.0.0 MCP_PORT=10000 uvx mcp-a2a-gateway
# Using uvx MCP_TRANSPORT=sse MCP_HOST=0.0.0.0 MCP_PORT=10000 uvx mcp-a2a-gateway

The server can be configured using the following environment variables:

# Transport configuration MCP_TRANSPORT=stdio MCP_HOST=0.0.0.0 MCP_PORT=10000 MCP_PATH=/mcp # Data storage MCP_DATA_DIR=/Users/your-username/Desktop/data/a2a_gateway # Timeouts MCP_REQUEST_TIMEOUT=30 MCP_REQUEST_IMMEDIATE_TIMEOUT=2 # Logging LOG_LEVEL=INFO

The A2A MCP Server supports multiple transport types:
-

stdio(default): Uses standard input/output for communication

- Ideal for command-line usage and testing
- No HTTP server is started
- Required for Claude Desktop

streamable-http(recommended for web clients): HTTP transport with streaming support

- Recommended for production deployments
- Starts an HTTP server to handle MCP requests
- Enables streaming of large responses

- Provides real-time event streaming
- Useful for real-time updates

Add below to VS Code settings.json for sse or http:

"mcpServers": { "mcp_a2a_gateway": { "url": "http://0.0.0.0:10000/mcp" } }
"mcpServers": { "mcp_a2a_gateway": { "type": "stdio", "command": "uvx", "args": ["mcp-a2a-gateway"], "env": { "MCP_TRANSPORT": "stdio", "MCP_DATA_DIR": "/Users/your-username/Desktop/data/Copilot/a2a_gateway/" } } }
"mcpServers": { "mcp_a2a_gateway": { "type": "stdio", "command": "uvx", "args": ["--from", "/path/to/MCP-A2A-Gateway", "mcp-a2a-gateway"], "env": { "MCP_TRANSPORT": "stdio", "MCP_DATA_DIR": "/Users/your-username/Desktop/data/Copilot/a2a_gateway/" } } }
"mcpServers": { "mcp_a2a_gateway": { "type": "stdio", "command": "uv", "args": [ "--directory", "/path/to/MCP-A2A-Gateway", "run", "mcp-a2a-gateway" ], "env": { "MCP_TRANSPORT": "stdio", "MCP_DATA_DIR": "/Users/your-username/Desktop/data/Copilot/a2a_gateway/" } } }
"mcpServers": { "mcp_a2a_gateway": { "command": "uvx", "args": ["mcp-a2a-gateway"], "env": { "MCP_TRANSPORT": "stdio", "MCP_DATA_DIR": "/Users/your-username/Desktop/data/Claude/a2a_gateway/" } } }
"mcpServers": { "mcp_a2a_gateway": { "command": "uvx", "args": ["--from", "/path/to/MCP-A2A-Gateway", "mcp-a2a-gateway"], "env": { "MCP_TRANSPORT": "stdio", "MCP_DATA_DIR": "/Users/your-username/Desktop/data/Claude/a2a_gateway/" } } }
"mcpServers": { "mcp_a2a_gateway": { "command": "uv", "args": ["--directory", "/path/to/MCP-A2A-Gateway", "run", "mcp-a2a-gateway"], "env": { "MCP_TRANSPORT": "stdio", "MCP_DATA_DIR": "/Users/your-username/Desktop/data/Claude/a2a_gateway/" } } }

The server exposes the following MCP tools for integration with LLMs like Claude:

-

register_agent: Register an A2A agent with the bridge server

{ "name": "register_agent", "arguments": { "url": "http://localhost:41242" } }

list_agents: Get a list of all registered agents

{ "name": "list_agents", "arguments": {"dummy": "" } }

unregister_agent: Remove an A2A agent from the bridge server

{ "name": "unregister_agent", "arguments": { "url": "http://localhost:41242" } }

-

send_message: Send a message to an agent and get a task_id for the response

{ "name": "send_message", "arguments": { "agent_url": "http://localhost:41242", "message": "What's the exchange rate from USD to EUR?", "session_id": "optional-session-id" } }

-

get_task_result: Retrieve a task's result using its ID

{ "name": "get_task_result", "arguments": { "task_id": "b30f3297-e7ab-4dd9-8ff1-877bd7cfb6b1", } }

get_task_list: Get a list of all tasks and their statuses.

{ "name": "get_task_list", "arguments": {} }

We are actively developing and improving the gateway! We welcome contributions of all kinds. Here is our current development roadmap, focusing on creating a rock-solid foundation first.

Core Stability & Developer Experience (Help Wanted! πŸ‘)

This is our current focus. Our goal is to make the gateway as stable and easy to use as possible.

- Implement Streaming Responses: Full support for streaming responses from A2A agents.
- Enhance Error Handling: Provide clearer error messages and proper HTTP status codes for all scenarios.
- Input Validation: Sanitize and validate agent URLs during registration for better security.
- Add Health Check Endpoint: A simple/healthendpoint to monitor the server's status.
- Configuration Validation: Check for necessary environment variables at startup.
- Comprehensive Integration Tests: Increase test coverage to ensure reliability.
- Cancel Task: Implement task cancellation
- Implement Streaming Update: Implement streaming task update. So that user check the progress.

- Easy Installation: Add support foruvx
- Docker Support: Provide a Docker Compose setup for easy deployment.
- Better Documentation: Create a dedicated documentation site or expand the Wiki.

Want to contribute?Check out the issues tab or feel free to open a new one to discuss your ideas!

This project is licensed under the Apache License, Version 2.0 - see theLICENSEfile for details.

- Anthropic for theModel Context Protocol
- Google for the
Agent-to-Agent Protocol
- Contributors to the FastMCP library
- Contributors of
A2A-MCP-Server(This project highly inspired from this repo.)

This project uses automated publishing through GitHub Actions for seamless releases.

Option 1: Using the Release Script (Recommended)

# Patch release (0.1.6 β†’ 0.1.7) ./release.sh patch # Minor release (0.1.6 β†’ 0.2.0) ./release.sh minor # Major release (0.1.6 β†’ 1.0.0) ./release.sh major

- βœ… Check you're on the main branch with clean working directory
- πŸ“ˆ Automatically bump the version inpyproject.toml
- πŸ”¨ Build and test the package locally
- πŸ“€ Commit the version change and create a git tag
- πŸš€ Push to GitHub, triggering automated PyPI publishing

# Update version in pyproject.toml manually # Then create and push a tag git add pyproject.toml git commit -m "chore: bump version to 0.1.7" git tag v0.1.7 git push origin main git push origin v0.1.7

- Go tohttps://github.com/yw0nam/MCP-A2A-Gateway/releases
- Click "Create a new release"
- Choose or create a tag (e.g.,v0.1.7)
- Fill in release notes
- Publish the release

To enable automated publishing, add your PyPI API token to GitHub Secrets:

- Go tohttps://pypi.org/manage/account/token/
- Create a new token with "Entire account" scope
- Copy the token (starts withpypi-)

- Go to your repository β†’ Settings β†’ Secrets and variables β†’ Actions
- Add a new repository secret:

- Name:PYPI_API_TOKEN
- Value: Your PyPI token

- Push a tag or create a release
- Check the Actions tab for publishing status

For emergency releases or local testing:

# Build and get manual publish instructions ./publish.sh # Or publish directly (with credentials configured) uv build uv publish

An MCP server client for the Agent-to-Agent (A2A) protocol, enabling LLMs to interact with A2A agents.

A bridge server connecting Model Context Protocol (MCP) with Agent-to-Agent (A2A) protocol.

Production-grade multi-agent communication MCP server with 58 tools over MCP+SSE β€” real-time messaging, task scheduling, shared memory, and a trust-based evolution engine. SQLite WAL persistence, 4-level RBAC, zero-dependency Python/TypeScript SDKs.

Enables room-based messaging between multiple agents.

Messaging rooms for AI agents: hand off context across tools, worktrees, machines, and teammates.

Agent-to-agent messaging platform. any MCP-compatible agent sends and receives direct messages

Agent-to-agent messaging, trust attestation, and collaboration infrastructure β€” 20 tools + 8 resources for DMs, trust profiles, obligations, and agent discovery via Streamable HTTP.

Enables AI assistants to request human input through a web interface, facilitating human-in-the-loop interactions.

Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client, with persistent identity, real-time messaging with @mentions and threads, task handoffs, shared workspace context, semantic search, and replayable MCP App widgets.

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.