What is the difference between MCP and A2A?
MCP, the Model Context Protocol, is how an AI application reaches tools and data. The other side is a server that lists what it can do, and the model picks a tool and fills in the arguments. The current MCP spec is stateless, so every call carries what it needs and the server keeps no conversation. Our what is MCP guide covers it from the start.
A2A, the Agent2Agent protocol, is how one agent hands work to another. The other side is an agent with its own model, its own tools and its own judgment. You don't see how it does the job. You send it a message, and you get back a task that moves through states until it completes, fails or needs something from you. The A2A specification reached 1.0 this year.
The A2A project puts the split in one line on its A2A and MCP page: "MCP is vertical. It deepens a single agent." A2A is the horizontal one, between agents. Both now sit in the same foundation: A2A joined the Agentic AI Foundation in August 2026, alongside MCP.
| Question | MCP | A2A |
|---|---|---|
| What's on the other end? | Tools and data | Another agent |
| How do you find out what it does? | tools/list on the server |
An Agent Card at /.well-known/agent-card.json |
| What is one unit of work? | A tool call: arguments in, result out | A task with states and a history |
| Can it ask you a question mid-way? | No, a call returns or fails | Yes, the task goes to INPUT_REQUIRED |
| Do you see how it works? | Yes, every tool and its schema | No, only its skills |
| Transports | stdio, Streamable HTTP | JSON-RPC, gRPC, HTTP+JSON |

An A2A agent that uses MCP tools
We built the refund flow from our MCP vs RAG guide one level up. The MCP server from that guide still has search_docs and create_refund. In front of it now sits an orders agent that speaks A2A, and a support agent that sends it work. Both are written with the official Python SDKs: a2a-sdk 1.4.0 and mcp 2.3.0.
The orders agent starts by describing itself. This is its Agent Card, which A2A serves at a fixed path so any client can read it before sending anything:
card = AgentCard(
name="Acme Orders agent",
description="Looks up Acme order policy and issues refunds.",
version="1.0.0",
supported_interfaces=[
AgentInterface(
url="http://127.0.0.1:9999/a2a",
protocol_binding="JSONRPC",
protocol_version="1.0",
)
],
capabilities=AgentCapabilities(streaming=True),
default_input_modes=["text/plain"],
default_output_modes=["text/plain"],
skills=[
AgentSkill(
id="refunds",
name="Refunds",
description="Refunds all or part of an order.",
tags=["orders", "refunds"],
examples=["Refund $20 on order ord_123"],
)
],
)The card lists a skill, refunds, and says nothing about search_docs or create_refund. That's the A2A boundary. A caller learns what the agent can do for it, and how it does that stays inside.
The work happens in the executor. It reads the task history, asks for anything missing, and calls its MCP tools once it has an order and an amount:
class OrdersAgent(AgentExecutor):
async def execute(self, context: RequestContext, event_queue):
if context.current_task is None:
first = new_task_from_user_message(context.message)
await event_queue.enqueue_event(first)
task = TaskUpdater(event_queue, context.task_id, context.context_id)
await task.start_work()
# Read the whole task history, so a follow-up can fill in the gaps.
history = context.current_task.history if context.current_task else []
messages = [*history, context.message]
text = " ".join(p.text for m in messages for p in m.parts)
order = re.search(r"ord_\w+", text)
amount = re.search(r"\$(\d+(?:\.\d\d)?)", text)
if not order or not amount:
ask = "Which order?"
if order:
ask = f"How much of {order.group()} should I refund?"
await task.requires_input(new_text_message(ask))
return
cents = round(float(amount.group(1)) * 100)
async with Client(MCP_SERVER) as mcp:
policy = await mcp.call_tool(
"search_docs", {"query": "partial refund", "limit": 1}
)
args = {"order_id": order.group(), "amount_cents": cents}
refund = await mcp.call_tool("create_refund", args)
page = policy.structured_content["result"][0]["slug"]
r = refund.structured_content
text = (
f"Refund {r['id']} of {r['amount_cents']} cents on {r['order_id']}"
f" is {r['status']} (policy page: {page})"
)
await task.add_artifact([new_text_part(text)], name="refund")
await task.complete()There's no model in this agent, so a regular expression stands in for understanding the request. In a production agent a model would read the message and decide which tools to call. The protocol parts stay the same either way.
The support agent fetches the card, then sends two messages on the same task. The first one leaves out the amount on purpose:
card: Acme Orders agent | skills: ['refunds']
interface: {'url': 'http://127.0.0.1:9999/a2a', 'protocolBinding': 'JSONRPC',
'protocolVersion': '1.0'}
> Please refund order ord_123
task 424e4225 TASK_STATE_SUBMITTED
status TASK_STATE_WORKING
status TASK_STATE_INPUT_REQUIRED How much of ord_123 should I refund?
> Make it $20
status TASK_STATE_WORKING
artifact Refund re_1 of 2000 cents on ord_123 is pending (policy page: refunds)
status TASK_STATE_COMPLETEDThat pause in the middle is the part MCP doesn't have. An MCP tool call returns a result or an error. An A2A task can stop, ask a question, and pick up where it left off when the answer comes in on the same task ID. The refund itself still went through MCP: search_docs found the policy page and create_refund made the refund, inside the orders agent where the support agent never saw it.
What broke while we built it
Three things failed on the way, and each one says something about the protocol.
The first run died with Agent should enqueue Task before TaskStatusUpdateEvent event. In A2A the task is an object with an ID that the client keeps, so the agent has to create it before it reports any state. MCP has nothing like this, because a tool call has no lifetime of its own.
The SDK also warned that our card was "not spec-compliant" until each interface named a protocol_version. A client uses that field to decide whether it can talk to the agent at all, so leave it in even though the SDK still serves a card without it.
Then we sent a raw SendMessage request with plain HTTP and no version header:
{'A2A-Version': '1.0'} -> TASK_STATE_COMPLETED
{} -> {'code': -32009, 'message': "A2A version '0.3' is not supported by this
handler. Expected version '1.0'.", ...}Without an A2A-Version header, the server treats the request as version 0.3 and rejects it. The SDK client sends the header for you, so this only bites hand-written clients and gateways that strip unknown headers.
Tip: notice that both refunds in our runs came back as re_1. The orders agent opens a new stdio connection to the MCP server for every task, which starts a fresh server process each time. If your tools keep state in memory, open the MCP connection once when the agent starts.

When to use MCP, A2A or both
Use MCP when the other side should do exactly what it's told: an API, a database, a docs search, a file system. You want every tool and its schema in front of the model, and a call that returns in one round trip. Most single agents only need this. The MCP vs API guide covers how that compares with calling your API directly.
Use A2A when the other side is an agent you don't control or shouldn't look inside. Another team's agent, a vendor's agent, a long job that might take minutes and might need to ask a question. A2A gives you discovery through the Agent Card, a task you can check on, and no access to the other agent's tools or prompts.
Use both when work is split across agents that each own a domain. That's the shape of the demo above, and the shape the A2A project recommends: A2A between the agents, MCP between each agent and its own tools.
Rule of thumb: if you'd write the other side's input schema yourself, it's a tool and MCP fits. If you'd describe the job in a sentence and let the other side figure it out, it's an agent and A2A fits.

Checklist for choosing between them
- Decide whether the other side is a tool with a fixed schema or an agent that makes its own choices.
- For an agent, publish an Agent Card at
/.well-known/agent-card.jsonwith skills a caller can understand without seeing your tools. - Set
protocol_versionon every interface in the card. - Create the task before you report any status on it.
- Use
INPUT_REQUIREDfor missing details, and keep the follow-up on the same task ID. - Send the
A2A-Versionheader from any client you write by hand, and make sure your gateway passes it through. - Keep each agent's MCP connection open for the agent's lifetime if its tools hold state.
- Put approval and limits on the MCP tools that write, because the agent calling them may be acting for another agent.
MCP and A2A with Octri
Octri builds the MCP side of this picture for your API. You get a hosted MCP server where every endpoint becomes a tool, along with documentation tools such as search_docs and get_endpoint, so an agent can check how your API works before it calls it. Tools that change data can ask the user before each call, and safety limits cap writes per session and calls per minute per tool. Those limits matter most once agents delegate to each other, because a loop between two agents can call the same tool far faster than any person would.
Octri doesn't build A2A agents. If you run an agent behind an Agent Card, it can use an Octri MCP server as its toolset, the same way the orders agent in this guide uses its own server. For the rules that keep those write tools safe, read MCP security best practices, and to build a server by hand, start with how to build an MCP server.