
a2a mcp poc
A Proof of Concept demonstrating Agent2Agent (A2A) and Model Context Protocol (MCP) integration
Repository Info
About This Server
A Proof of Concept demonstrating Agent2Agent (A2A) and Model Context Protocol (MCP) integration
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
A2A + MCP Interoperability POC
This project demonstrates the integration of Google's Agent2Agent (A2A) protocol with Anthropic's Model Context Protocol (MCP) through a simple proof of concept application.
Project Structure
a2a_mcp_poc/
|-- agent_a/ # Intent Router Agent
| |-- main.py
|-- agent_b/ # Weather Fetcher Agent
| |-- main.py
| |-- mcp_client.py
|-- agent_c/ # Joke Teller Agent
| |-- main.py
| |-- mcp_client.py
|-- mcp_servers/ # Mock MCP Servers
| |-- weather_mcp_server.py
| |-- joke_mcp_server.py
|-- README.md
|-- requirements.txt
Setup Instructions
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Start the MCP servers:
# Terminal 1
python mcp_servers/weather_mcp_server.py
# Terminal 2
python mcp_servers/joke_mcp_server.py
- Start the agents:
# Terminal 3
python agent_a/main.py
# Terminal 4
python agent_b/main.py
# Terminal 5
python agent_c/main.py
- Access the Streamlit interface:
streamlit run agent_a/main.py
Architecture
Agent A (Intent Router)
- Provides a Streamlit interface for user interaction
- Analyzes user intent and delegates tasks to appropriate agents
- Communicates using A2A protocol
Agent B (Weather Fetcher)
- Handles weather-related queries
- Connects to weather MCP server
- Returns weather information via A2A
Agent C (Joke Teller)
- Handles joke-related queries
- Connects to joke MCP server
- Returns jokes via A2A
MCP Servers
- Mock servers providing weather and joke data
- Implemented using FastAPI
- Simulate external API responses
Communication Flow
- User sends query via Streamlit interface
- Agent A analyzes intent and delegates to appropriate agent
- Agent B/C fetches data via MCP
- Agent B/C responds to Agent A via A2A
- Agent A displays final response to user
Testing
Run the test suite:
python -m pytest tests/
Notes
- This is a local-only POC
- Uses mock MCP servers for demonstration
- No authentication required for basic functionality
- Focus on clean delegation and response handling
Quick Start
Clone the repository
git clone https://github.com/chandni-kaithavalappil/a2a-mcp-pocInstall dependencies
cd a2a-mcp-poc
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.