A2A MCP Tutorial
A tutorial on how to use Model Context Protocol by Anthropic and Agent2Agent Protocol by Google
What is A2A MCP Tutorial?
A2A MCP Tutorial is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to tutorial on how to use model context protocol by anthropic and agent2agent protocol by google
A tutorial on how to use Model Context Protocol by Anthropic and Agent2Agent Protocol by Google
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A tutorial on how to use Model Context Protocol by Anthropic
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx a2a-mcp-tutorialConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use A2A MCP Tutorial
The A2A MCP Tutorial repository is a hands-on educational project that demonstrates how to build and connect systems using both Anthropic's Model Context Protocol (MCP) and Google's Agent-to-Agent (A2A) protocol in a single working example. It implements real MCP servers for Google search and stock price lookups, plus A2A agent servers for a Stock Report Agent and a Search Agent, all orchestrated by a Host Agent. Developers learning multi-agent architecture use it to understand how MCP tools and A2A agent delegation work together in a Python-based system.
Prerequisites
- Python 3.10 or higher with uv package manager installed (https://astral.sh/uv)
- A Finnhub API key (free at finnhub.io) for stock price data
- A Serper.dev API key (serper.dev) for Google Search functionality
- Basic familiarity with Python async programming and REST APIs
- An MCP-compatible client or the ability to run the agents as standalone processes
Clone the repository and install dependencies
Clone the tutorial repository and use uv to install all Python dependencies into a virtual environment.
git clone https://github.com/Tsadoq/a2a-mcp-tutorial.git
cd a2a-mcp-tutorial
uv syncSet required environment variables
Export your Finnhub and Serper API keys. The stock MCP server requires FINNHUB_API_KEY and the search MCP server requires SERPER_DEV_API_KEY.
export FINNHUB_API_KEY=your_finnhub_api_key
export SERPER_DEV_API_KEY=your_serper_dev_api_keyStart the MCP servers
Launch the two MCP SSE servers — one for search and one for stock data. Run each in a separate terminal.
# Terminal 1: Search MCP server
uv run mcp_server/sse/search_server.py
# Terminal 2: Stock MCP server
uv run mcp_server/sse/stocks_server.pyStart the A2A agent servers
Launch the specialized A2A agents (Stock Report Agent and Google Search Agent) and the Host Agent that coordinates between them. Each requires a separate terminal.
# Terminal 3:
uv run a2a_servers/agent_servers/stock_report_agent_server.py
# Terminal 4:
uv run a2a_servers/agent_servers/google_search_agent_server.py
# Terminal 5:
uv run a2a_servers/host_agent_server.pyQuery the Host Agent
Send requests to the Host Agent endpoint. It will delegate to the appropriate specialist agents which in turn call the MCP tool servers. You can send HTTP requests directly or integrate with an MCP client.
A2A MCP Tutorial Examples
Client configuration
MCP client config pointing to the locally running stock and search MCP SSE servers from the tutorial.
{
"mcpServers": {
"a2a-stocks": {
"command": "uv",
"args": ["run", "/path/to/a2a-mcp-tutorial/mcp_server/sse/stocks_server.py"],
"env": {
"FINNHUB_API_KEY": "your_finnhub_api_key"
}
},
"a2a-search": {
"command": "uv",
"args": ["run", "/path/to/a2a-mcp-tutorial/mcp_server/sse/search_server.py"],
"env": {
"SERPER_DEV_API_KEY": "your_serper_dev_api_key"
}
}
}
}Prompts to try
Example queries you can send to the host agent or MCP tools once the servers are running.
- "What is the current stock price of Apple (AAPL)?"
- "What are the prices of stocks for the top 10 S&P 500 companies?"
- "Search the web for the latest news on NVIDIA earnings"
- "Who are the top 5 US lumber producers?"
- "Get the symbol for Tesla and then retrieve its current price, daily high, and daily low"Troubleshooting A2A MCP Tutorial
Stock server returns 'API key invalid' or empty data
Verify that FINNHUB_API_KEY is set correctly in your environment before running the stock server. Get a free key at finnhub.io. Note that the free tier has rate limits — avoid querying more than 60 stocks per minute.
Search server fails with authentication error
Ensure SERPER_DEV_API_KEY is exported in the same shell session where you run search_server.py. Get a key from serper.dev. The free tier allows 2,500 queries per month.
uv sync fails or modules are not found
Ensure uv is installed (curl -LsSf https://astral.sh/uv/install.sh | sh) and that you are running commands from the repository root where pyproject.toml is located. If PYTHONPATH errors occur, prefix commands with PYTHONPATH=. before the uv run command.
Frequently Asked Questions about A2A MCP Tutorial
What is A2A MCP Tutorial?
A2A MCP Tutorial is a Model Context Protocol (MCP) server that tutorial on how to use model context protocol by anthropic and agent2agent protocol by google It connects AI assistants to external tools and data sources through a standardized interface.
How do I install A2A MCP Tutorial?
Follow the installation instructions on the A2A MCP Tutorial GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with A2A MCP Tutorial?
A2A MCP Tutorial works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is A2A MCP Tutorial free to use?
Yes, A2A MCP Tutorial is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
A2A MCP Tutorial Alternatives — Similar Developer Tools Servers
Looking for alternatives to A2A MCP Tutorial? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up A2A MCP Tutorial in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use A2A MCP Tutorial?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.