Explanation
MCP vs A2A
Common Mistakes
Prompt Output
| Aspect | Direct Call | MCP | A2A |
|---|---|---|---|
| Scope | Same process | Agent to Tools | Agent to Agent |
| Protocol | Function call | JSON-RPC 2.0 | HTTP + SSE |
| Discovery | Import / require | Server config | Agent Cards |
| Direction | In-process | Vertical (down to tools) | Horizontal (peer agents) |
| State | Shared memory | Stateless calls | Task lifecycle |
| Multimodal | Native types | Schema-typed | Format negotiation |
| Use case | Simple utilities | External data / tools | Multi-agent collaboration |
1. Confusing MCP and A2A
MCP connects agents to tools (vertical). A2A connects agents to agents (horizontal). They work TOGETHER -- an orchestrator uses A2A to delegate, and each agent uses MCP for its tools.
2. Building without Agent Cards
Without discovery, agents are hardcoded. Agent Cards enable dynamic selection -- an orchestrator can find the right agent at runtime instead of importing it at build time.
3. Free-form natural language handoffs
Relying on free-form natural language for handoffs is a recipe for instability. Instead, enforce strict output schemas.
4. No state persistence
The system must implement state persistence (checkpointing) after every step. If the orchestrator fails, the workflow can resume exactly where it left off.
Code
Agent Card
Protocol