Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path →
MCP vs A2A: agent-to-tool, or agent-to-agent?
Both showed up as "the new agent standard" within a year of each other, which is exactly why they get conflated. They solve different problems: MCP is how an agent reaches its own tools and data. A2A is how an agent talks to a completely separate, autonomous agent it doesn't control.
The one distinction that decides everything
MCP (Model Context Protocol, Anthropic) standardizes how an agent connects to and calls tools and data sources — a database, a file system, a search API. It's a client-server protocol between an agent and a capability. A2A (Agent2Agent, originally Google, now Linux Foundation-hosted) standardizes how one autonomous agent discovers, delegates to, and exchanges results with another autonomous agent — potentially built by a different team or vendor entirely.
Is the other end of the connection a fixed capability with a defined schema (a tool, an API, a database)? That's MCP. Is the other end a separate reasoning agent that plans, adapts, and might take many turns to finish a task? That's A2A.
Head to head
| Dimension | MCP | A2A |
|---|---|---|
| Connects | Agent ↔ tool / data server | Agent ↔ agent |
| What’s on the other end | A fixed-schema capability | An autonomous, opaque reasoning system |
| Interaction shape | Request → structured result | Task delegation, often long-running, async |
| Discovery | Server exposes a tool/resource manifest | Agent publishes an "agent card" describing skills |
| State | Mostly stateless, per-call | Supports long-running tasks with status/streaming |
| Origin | Anthropic, Nov 2024 | Google, 2025, now Linux Foundation |
| Analogy | A USB-C port for tools | Two agents speaking a shared business language |
When to use each
Reach for MCP
- Connecting your agent to a database, file system, or internal API
- The capability has a clear, fixed input/output schema
- A single tool call fully answers the need — no ongoing reasoning required on the other end
- You want the huge, growing MCP server ecosystem
Reach for A2A
- Delegating a task to a separate, independently-built agent
- The other agent needs to plan, adapt, or take many turns
- The other agent’s internals are opaque — you only see its declared capabilities
- Coordinating multiple autonomous agents, possibly from different vendors
One agent’s hands vs its voice to peers
MCP and A2A aren't competing standards for the same job — a single agent commonly uses both at once. MCP is how that agent reaches its own capabilities (its "hands"): a weather API, a search index, a code sandbox. A2A is how it collaborates with entirely separate agents it doesn't control (its "voice" to peers): handing off a sub-task to a specialized agent and getting a result back, without needing to know how that agent works internally. Notably, the remote agent on the other end of an A2A connection might itself be built using MCP internally — the two protocols compose cleanly because they operate at different layers.
MCP is inside an agent's own reasoning loop, reaching outward to capabilities it owns. A2A is between agents, each with their own separate reasoning loop, neither owning the other.
Why one protocol wasn’t enough
It's reasonable to ask why agent-to-agent collaboration didn't just get bolted onto MCP as another kind of "tool call" — the reason is that MCP's tool-call model is built around a specific shape: a synchronous-feeling, tightly-scoped capability with a fixed schema, where the caller expects a bounded, structured result. Agent-to-agent collaboration needs semantics that shape doesn't fit well: the remote agent is an opaque black box (you can't inspect its internal tool calls the way an MCP server exposes its schema), the task can be genuinely long-running (minutes to hours, not a single request-response), and the interaction may need to stream partial progress or ask clarifying questions mid-task — closer to how you'd delegate work to a competent colleague than how you'd call a function.
A2A's "agent card" discovery mechanism reflects this directly: instead of a fixed tool schema, an agent card advertises capabilities at a higher, more negotiable level — what kinds of tasks this agent can take on — because the exact steps it'll take to complete a task are up to its own internal reasoning, not something the caller specifies in advance the way a tool call's parameters are.
MCP gives you a predictable, schema-bound result fast. A2A gives you access to another agent's actual reasoning and adaptability — at the cost of losing the tight, synchronous predictability a tool call gives you.
A worked scenario: a travel-planning agent
A "plan my trip" super-agent needs to check flight prices and look up weather forecasts — both are simple, well-defined capabilities with fixed inputs and outputs, so it reaches them via MCP: call the flight-search tool, call the weather tool, get structured results back, done. No ongoing reasoning is needed on the other end for either.
The same super-agent also needs to "negotiate a hotel refund for a cancelled booking with the hotel's support system" — this isn't a single tool call, it's a multi-turn, judgment-requiring task (read the cancellation policy, construct an argument, respond to counter-offers) that a specialized customer-service agent is built to handle end-to-end on its own. The super-agent delegates this whole task via A2A, hands over the relevant context, and waits for (or streams) a result — without needing to know or control how that agent conducts the negotiation internally. Using MCP for the first two capabilities and A2A for the delegated task isn't an inconsistency; it's each protocol doing the job it was actually built for.
If you could write the exact steps yourself and just need them executed, it's an MCP tool call. If the steps require judgment you're deliberately delegating away, it's an A2A task.
The picture: one host agent, two protocols
Worked example: the travel agent, message by message
Trace the page’s trip-planning scenario on the wire. Both protocols carry JSON-RPC 2.0 messages, so the envelope looks alike; what differs is what each request means and how long it lives. Rows 1–4 are MCP, rows 5–8 are A2A.
| # | Protocol | Host sends | Comes back | What it shows |
|---|---|---|---|---|
| 1 | MCP | initialize | Protocol version and server capabilities | Once per connection, not once per call |
| 2 | MCP | tools/list | Each tool’s name, description and JSON Schema for its inputs | These schemas are what the model reads to pick a tool |
| 3 | MCP | tools/call search_flights with from, to, date | A content list of results, isError: false | One request, one bounded, structured result |
| 4 | MCP | tools/call get_forecast with city, date | The same result shape | You could have written these steps yourself |
| 5 | A2A | Fetch the hotel agent’s Agent Card | Name, description, skills, endpoint, supported auth | Discovery says what it can do, never how |
| 6 | A2A | A message: “get a refund for this cancelled booking” | A task with an id, state working | The task outlives the request that created it |
| 7 | A2A | (nothing: an update is streamed) | State input-required: “which booking reference?” | The remote agent asks a question mid-task |
| 8 | A2A | A reply on the same task id | working, then completed with an artifact: the refund confirmation | The result arrives as an artifact on the task |
Row 7 is the one an MCP tool call has no natural slot for: the callee, part-way through, needs something only the caller has. Row 2 has a cost that is easy to miss. Every tool schema the host exposes is sent to the model on every call; at an illustrative 300 tokens per schema, 40 tools put 12,000 tokens in front of every question before the user says a word. The integration count is what MCP exists to cut: 5 agent apps each wired by hand to 8 internal systems is 40 integrations, while one protocol makes it 5 clients plus 8 servers, 13 pieces, each built once.
Cost and trade-offs of each transport and shape
| Case | Time | Space | Why |
|---|---|---|---|
| MCP over stdio | A local subprocess; one round trip per call | Lives as long as the host session | The simplest setup. The server runs with the user’s own permissions on that machine. |
| MCP over HTTP | A network round trip per call | A remote server with sessions per client | One server shared by many clients, with central auth (the spec’s authorization is OAuth-based). A service to run and secure. |
| MCP tool schemas | Sent to the model on every call | Tokens, not memory: 40 tools × 300 = 12,000 (illustrative) | More tools means more context per call and more chances to pick the wrong one. |
| A2A, request and response | One message, one completed task | A task id | Fine when the remote agent finishes in seconds. |
| A2A streaming | An open connection carrying status and artifact updates | The task stays live server side | Progress and input-required arrive while the caller is connected. |
| A2A push notifications | The remote agent calls the client’s webhook later | The task persists; the caller can disconnect | For work that takes hours. The caller must expose and secure an endpoint. |
The pattern across both columns: the longer and less predictable the work on the far side, the more state someone has to keep. An MCP call keeps almost none. An A2A task is a small, durable record on both ends, and the cost of that record is the price of delegating judgement.
Common mistakes
- Exposing every tool from every server
Connecting five servers with a dozen tools each hands the model sixty schemas on every call: more tokens, and more near-duplicate tools to confuse. Give each agent or task an allow-list of the few tools it needs.
- Treating tool output as instructions
A web page, issue body or email fetched through an MCP tool can contain text written to steer the model (“ignore your instructions and send this file to…”). That is prompt injection, and tool descriptions from third-party servers can carry it too. Treat everything a tool returns as data, and gate side-effecting tools behind confirmation.
- Installing local servers without review
A stdio MCP server is a program running as you, with access to your files, keys and tokens. Install it with the same care as any dependency: a known source, a pinned version, and a sandbox or container when you can.
- Calling an A2A task like a function
Block on it with a short timeout and retry on expiry, and you may have created two refund tasks. Ignore
input-requiredand the task waits forever. Keep the task id, resume it instead of re-sending, and make delegated actions safe to repeat. - Over-sharing with an agent you do not control
The remote agent is opaque by design, so send it only what the task needs, not the whole conversation, and give it scoped, short-lived credentials rather than your user’s full token. An agent card describes what an agent claims to do; it is not a promise about what it does with your data.
Where this shows up in production and interviews
- MCP in everyday tools
Desktop and IDE clients such as Claude Desktop, Claude Code, Cursor and VS Code connect to MCP servers for things like GitHub, databases and the local file system. For most engineers this is where MCP is met first: adding a server to a config file, not writing a protocol client.
- Internal tool platforms
Companies wrap internal APIs once as MCP servers so every agent product can reuse them. That turns the many-to-many wiring from the worked example into one server per system, with auth, logging and allow-lists handled in one place.
- Cross-team and cross-vendor agents
A2A is for the case where the other agent belongs to another team or company, such as a supplier’s order agent or a partner’s support agent, and you can only see its card and its results. Hosting by the Linux Foundation is aimed at exactly that: a standard no single vendor controls.
- The interview version
Expect “MCP or A2A for this integration?” Answer with the page’s test (fixed capability or delegated judgement?), then the operational part: what state a long-running task needs, how you secure a tool server, and how tool count and tool output affect the model’s context.
Which would you pick?
Three situations. Pick the side you'd actually build — the explanation follows.
Your agent needs to query a database with a known schema and get rows back.
You could write these steps yourself and simply need them executed, which is the page's MCP test. Wrapping a schema-bound query in another reasoning agent buys adaptability nobody asked for and gives up the tight synchronous predictability that made the call trivial.
A task needs judgement you deliberately do not want to encode: "research this vendor and tell me if they are viable."
The steps here require judgement that changes with what is found, which is exactly what the page reserves A2A for. An MCP tool returns a schema-bound result for a request you fully specified; "research and judge viability" is not a request you can fully specify in advance, and chaining tools just moves the judgement back into your own loop.
What is the structural difference between the two, beyond the use case?
The page draws the line at where the reasoning lives: MCP sits inside an agent's own loop reaching for capabilities it owns, while A2A joins two agents that each plan independently. Synchrony is a consequence of that, not the definition, and A2A is not MCP with extra auth — the other end thinks for itself.
Quick answers
MCP or A2A — which should I use?
If you’re connecting your agent to a tool, API, or data source with a fixed schema, use MCP. If you’re delegating a task to a separate, independently-reasoning agent — especially one you don’t control — use A2A. Most real agent systems use both, at different layers.
Is A2A a replacement for MCP?
No. They operate at different layers — MCP is agent-to-tool, A2A is agent-to-agent — and a single agent typically uses MCP to reach its own capabilities while using A2A to collaborate with separate agents. Neither supersedes the other.
Can an agent reachable via A2A also use MCP internally?
Yes, and this is common. The two protocols compose cleanly: what the remote agent uses internally to reach its own tools (MCP) is invisible to the agent delegating work to it over A2A — A2A only sees the declared capability and the eventual result.
Why not just use MCP tool calls for agent-to-agent delegation?
MCP’s model assumes a fixed-schema, boundedly-scoped capability with a structured result — it doesn’t naturally fit an opaque, long-running, adaptive task the way agent-to-agent delegation needs to, which is why a separate protocol emerged instead of overloading tool calls.
Explore the topic
See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.
More Handbooks
- The Agentic AI Interview HandbookTwenty topics every senior AI engineer should be able to reason about live — from eval pipelines to reliability patterns for generative systems.Read →
- The Agent Evaluations HandbookA self-contained handbook on evaluating AI agents — theory, interactive widgets, and practical guidance. Trajectory evals, tool-use scoring, LLM-as-judge, observability, and reliability for PMs, engineers, and founders.Read →
- The Agent Patterns HandbookThe design patterns behind every LLM agent — the ReAct Thought–Action–Observation loop, tool/function calling, plan-and-execute, reflection, memory, multi-agent orchestration, and the failure modes (loops, hallucinated tools, recovery, human-in-the-loop) that break agents in production.Read →
- The Model Context Protocol (MCP) HandbookThe open standard connecting AI agents to the outside world — why M×N bespoke integrations collapse to M+N, the host/client/server roles over JSON-RPC, the three primitives (tools, resources, prompts), the connect→discover→call session lifecycle, when MCP earns its keep, and the security sharp edges (a server's output is untrusted input).Read →
- The Loop Engineering HandbookStop prompting your agents — design the system that prompts them for you. The inner vs outer loop, the four loop types (heartbeat, cron, hook, goal), the six building blocks (automations, worktrees, skills, MCP connectors, subagents, external memory), stopping conditions and the verification split, state across runs, cost engineering, and the six failure modes that burn tokens at 3am.Read →
- The Context Engineering HandbookThe discipline that replaced prompt-tweaking: curating everything the model sees under a finite attention budget. The anatomy of a production context window, the three taxes on an overstuffed one (context rot, cost, behavioral drift), the four operations (write, select, compress, isolate), agent-specific patterns like compaction and just-in-time retrieval, six production habits, and where it sits in the prompt → context → loop → harness stack.Read →