A2A MCP Tutorial

v1.0.0Developer Toolsstable

A tutorial on how to use Model Context Protocol by Anthropic and Agent2Agent Protocol by Google

a2a-mcp-tutorialmcpai-integration
Share:
110
Stars
0
Downloads
0
Weekly
0/5

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

Learn how to use Model Context Protocol from Anthropic.
Understand Agent2Agent Protocol integration with MCP.
Tsadoq

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 4, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx a2a-mcp-tutorial

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 sync
2

Set 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_key
3

Start 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.py
4

Start 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.py
5

Query 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.

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.

Quick Config Preview

{ "mcpServers": { "a2a-mcp-tutorial": { "command": "npx", "args": ["-y", "a2a-mcp-tutorial"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides