MCP and A2A: Two Protocols Every Multi-Agent Dev Should Know
The Two-Layer Problem Nobody Saw Coming
If you're building anything with AI agents right now, you've probably hit the same wall I did: how do you wire multiple agents together without creating a brittle mess of custom integrations?
Turns out, two protocols are emerging to split this problem cleanly down the middle. MCP (Model Context Protocol) handles the vertical-how a single agent talks to its tools and data sources. A2A (Agent-to-Agent) handles the horizontal-how agents discover and communicate with each other.
Understanding this split early saves you from architectural regret later. Let me show you why.
The Vertical Layer: MCP
Think of MCP as the standardised plumbing between your agent and everything it needs to do actual work. Before MCP, every LLM framework had its own way of wrapping API calls, database queries, or file system access.
Here's what MCP standardises:
- Tool definitions - A consistent schema for describing what a function does and what parameters it needs
- Resource access - How agents read from databases, file systems, or external APIs
- Prompts and context - A protocol-level way to inject context and instructions
In practice, this means you can write an MCP server once and plug it into Claude, custom LangChain agents, or any other MCP-compatible runtime:
# Pseudocode: MCP server exposing a tool
class WeatherMCPServer:
@mcp_tool
def get_forecast(location: str) -> dict:
return fetch_weather_api(location)
Anthropic drives MCP, and adoption is growing fast. If you're building agents that need reliable tool access, MCP is becoming the safe default.
The Horizontal Layer: A2A
A2A solves a different problem: how do agents find each other and coordinate? Imagine you're building a customer support system with three specialised agents:
- An intake agent that routes requests
- A technical agent that handles product queries
- A billing agent that processes refunds
Without A2A, you'd hard-code those connections. With A2A, agents register their capabilities in a directory, and other agents discover them dynamically.
Key A2A concepts:
- Agent discovery - A registry where agents advertise what they can do
- Message routing - Standardised envelopes for inter-agent communication
- Capability negotiation - Agents declare their skills; others query and invoke them
Google's pushing A2A hard, and major cloud vendors are lining up support. The two-layer stack is quickly becoming the de facto architecture for serious multi-agent systems.
Where Devs Get It Wrong
The biggest mistake I see? Using MCP to solve A2A problems, or vice versa. For example:
- โ Trying to use MCP tool calls to route messages between agents
- โ Building custom agent discovery when A2A already defines it
- โ Implementing A2A-style capability negotiation inside MCP servers
Keep it clean:
- MCP = One agent, many tools
- A2A = Many agents, one conversation
Real-World Architecture
Here's how I'd structure a production system:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ A2A Layer (Agent Coordination) โ
โ - Discovery registry โ
โ - Message bus โ
โ - Routing logic โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
Agent A Agent B Agent C
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Layer (Tool Integration) โ
โ - Database connector โ
โ - API wrappers โ
โ - File system access โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Each agent has its own MCP stack. The A2A layer orchestrates the whole system.
The Standards Risk
One caveat: neither protocol is governed by a neutral standards body yet. MCP is Anthropic's baby; A2A is Google's. That's not necessarily a dealbreaker, but it does mean the specs could shift based on commercial priorities. If you're building something enterprise-grade, keep an eye on governance. The worst-case scenario is ending up locked into one vendor's interpretation of the spec.
Should You Care Right Now?
If you're building:
- Single-agent systems โ MCP is immediately useful. Start there.
- Multi-agent orchestration โ You need both layers. Design for A2A from day one.
- Enterprise AI at scale โ The two-layer stack is becoming table stakes.
Teams working on AI automation and software development are already adopting this architecture. The payoff is real: cleaner code, less coupling, easier to extend. And when the next big LLM framework drops, you won't be rewriting everything.
Where to Start
- Experiment with MCP - Anthropic's docs are solid. Build a simple tool server.
- Read the A2A spec - Google published it earlier this year. It's clearer than you'd expect.
- Design for the split - Even if you're not using both today, structure your code as if you will.
The agent internet is coming. These two protocols are the plumbing.
Comments
No comments yet. Start the discussion.