A2A (Agent-to-Agent protocol) is a standard way for agents to talk to each other over HTTP using a shared message format (JSON-RPC + structured messages).
MCP (Model Context Protocol) and A2A solve different layers of the stack:
-
MCP is about tools
It exposes functions/APIs like get_weather(city) or search_docs(query).
Agent → MCP server (tools). -
A2A is about agents
It lets full agents (with their own tools, memory, logic) talk to each other.
Agent A ↔ Agent B (conversation/requests).
| Project Title | The Chain and Run Commands |
|---|---|
| Travel Planner × Weather Stylist (A2A + MCP Demo) |
A2A connects: Travel Planner Agent ↔ Weather Stylist Agent. MCP connects: Weather Stylist Agent → Weather MCP Server → OpenWeather API. 1. Start Weather Stylist Agent: uv run uvicorn weather_stylist_agent:app --port 8080 2. Start Travel Planner Agent: uv run uvicorn travel_planner_agent:app --port 8081 3. Call the chain: uv run talk_to_agent.py |
| Currency & Stocks Pair (A2A + MCP Demo) |
A2A connects: Currency Pair Agent ↔ Stock Data Agent. MCP connects: • Currency Pair Agent → Currency MCP Server → Exchange Rate API • Stock Data Agent → Stock MCP Server → Yahoo Finance API. Run Order: 1. Start Currency Pair (A2A) Agent: uv run uvicorn currency_pair_agent:app --port 8081 2. Start Stock Data (A2A) Agent: uv run uvicorn stock_data_agent:app --port 8082 3. Test or Orchestrate Communication: uv run python test.py |
| Vacation Planner × Airbnb (A2A + MCP Demo) |
A2A connects: Flight Agent ↔ Airbnb Agent. MCP connects: • Flight Agent → Flights MCP Server → Google Flights API (via RapidAPI) • Airbnb Agent → Airbnb MCP Server → Airbnb Search & Listing Tools. Run Order: 1. Start Flights MCP Server: uv run python flights_mcp_server.py 2. Start Airbnb (A2A) Agent: uv run uvicorn airbnb_a2a:app --port 8090 3. Start Flight (A2A) Agent: uv run uvicorn flights_a2a:app --port 8091 4. Run the Orchestrator / Tester: uv run python tester.py |
| Reddit × Google Docs (A2A + MCP Demo) |
A2A connects: Google Docs Agent ↔ Reddit Agent. MCP connects: • Reddit Agent → Reddit MCP Server → Reddit API (hot threads, comments, summaries) • Google Docs Agent → Google Docs MCP Server → Google Docs & Drive API. Run Order: 1. Start Reddit (A2A) Agent: uv run uvicorn reddit_a2a:app --port 8130 2. Start Google Docs (A2A) Agent: uv run uvicorn docs_a2a:app --port 8131 3. Run A2A Client / Orchestrator: uv run python a2a_client.py ✅ Flow: User → Planner → Google Docs Agent → Reddit Agent → Reddit MCP → Google Docs MCP → Final Write to Doc |
git clone https://github.com/gauthiii/a2aProjects
cd a2aProjectsOPENAI_API_KEY=your_openai_key_here
OPENWEATHER_API_KEY=your_openweather_key_here
# Optional
ANTHROPIC_API_KEY=your_anthropic_key_here
GROQ_API_KEY=
GEMINI_API_KEY=
GMAIL_CLIENT_ID=
GMAIL_CLIENT_SECRET=
EXCHANGE_RATE_API_KEY=
RAPID_GOOGLE_FLIGHTS_API=
uv sync