MCP vs A2A vs API in one minute
All three are ways for software to ask other software to do something. The difference is who is on the other end.
- An API (a REST or GraphQL endpoint) is written for a programmer. Someone reads the docs, then writes code that calls
POST /bookingswith the right fields. - MCP (Model Context Protocol) wraps tools and data so an AI app can find them and a language model can call them. The server describes each tool in JSON Schema, and the model picks the tool and fills in the arguments.
- A2A (Agent2Agent protocol) lets one AI agent hand a job to another agent it does not control. The remote agent decides how to do the job, may ask questions, and reports back on a task that has an ID and a state.
Think of a restaurant kitchen. An API is the recipe card: exact steps, written for someone who already knows the kitchen. MCP is the labelled tool wall: every knife and pan has a label saying what it does, so any new cook can pick the right one. A2A is calling the bakery down the road and ordering a cake: you say what you want in words, they may call back with a question, and you check on the order by its number. You do not get to see their oven.
The A2A project's own docs put it in one line: "A2A connects the agents to each other; MCP connects each agent to its own tools." Most real MCP servers and A2A agents still call ordinary APIs underneath. So it is rarely API or MCP or A2A. It is which layer you are building.
MCP vs A2A vs API: the comparison table
Versions and dates as of 22 November 2026, from the specifications and release pages listed under Sources.
| REST API | MCP | A2A | |
|---|---|---|---|
| Connects | A program to a service | An AI app (host) to tools, data and prompts | An agent to another, independent agent |
| Who decides what to call | The programmer, at build time | The model, at run time, from the tool list | The calling agent sends a request; the remote agent decides how to do it |
| Discovery | Docs or an OpenAPI file, if one exists | server/discover and tools/list | An Agent Card at /.well-known/agent-card.json |
| Unit of work | One endpoint call | One tool call (tools/call) | A task with an ID, a state and artifacts |
| Input format | Fields the API defines | Arguments that match the tool's JSON Schema | Messages made of parts: text, files or JSON data |
| Asking for missing input | Whatever the API invents (often a 400 or 422 error) | InputRequiredResult, then the client retries with inputResponses | Task state TASK_STATE_INPUT_REQUIRED, then a follow-up message on the same task |
| State between calls | Up to the API | None in the protocol: "MCP is a stateless protocol" (spec 2026-07-28) | Kept by the remote agent: tasks, history, context IDs |
| Long-running work | Up to the API (job IDs, webhooks) | Optional io.modelcontextprotocol/tasks extension | Built in: GetTask, CancelTask, streaming, push notifications |
| Wire format | HTTP + JSON, usually | JSON-RPC 2.0 over stdio or Streamable HTTP | JSON-RPC 2.0, gRPC or HTTP+JSON (REST), all over HTTP(S) |
| Latest version | n/a | 2026-07-28 (released 28 July 2026) | 1.0.1 (released 28 May 2026; 1.0.0 on 12 March 2026) |
| Python SDK | Any HTTP library | mcp 2.3.0 | a2a-sdk 1.3.1 |
| Started by | Anthropic, 25 November 2024 | Google, 9 April 2025 | |
| Governed by | Agentic AI Foundation (Linux Foundation), since 9 December 2025 | Linux Foundation since 23 June 2025; Agentic AI Foundation since 27 August 2026 |
One row in that table is newer than most articles you will find. Older comparisons say MCP keeps a session and A2A is the simple one. Since the 2026-07-28 MCP release the opposite is closer to true: MCP's core is stateless, and A2A is the protocol with built-in state.
What MCP is in 2026 (and what changed on 28 July)
Anthropic open-sourced MCP on 25 November 2024 as "a new standard for connecting AI assistants to the systems where data lives". The MCP docs use a hardware analogy: "Think of MCP like a USB-C port for AI applications." One plug shape, many devices. The problem it set out to fix is in the same docs: "Every new data source requires its own custom implementation, making truly connected systems difficult to scale."
There are three roles. The host is the AI app (Claude, ChatGPT, Cursor, your own agent). The host creates one client per connection, and each client "communicates with exactly one server". The server exposes tools, resources and prompts. Tools are the part most people use, and the spec says they are "designed to be model-controlled": the model reads the tool list and decides when to call one.
On 28 July 2026 version 2026-07-28 shipped, and its release post calls the stateless core "the highlight of this release". The changes that matter when comparing MCP with A2A:
- No handshake, no session. "Make MCP stateless: remove the
initialize/notifications/initializedhandshake." TheMcp-Session-Idheader is gone too. Every request carries its own protocol version, client info and capabilities in_meta. - Discovery is one call. "Add
server/discover: servers MUST implement this RPC to advertise their supported protocol versions, capabilities, and identity." - Asking the user something no longer needs a held-open stream. Multi Round-Trip Requests (MRTR): the server answers with
resultType: "input_required"and an opaquerequestState; the client gets the answer and retries the original call. "Note that the requests in each step are completely independent". - Tasks left the core. "Move experimental tasks out of the core protocol and into an official extension (
io.modelcontextprotocol/tasks)." - Roots, Sampling and Logging are deprecated, with a minimum twelve-month window before removal.
The practical effect, in the release post's words: "Any request can now land on any server instance behind a plain round-robin load balancer without needing shared storage." That is exactly what our test checks below, by killing the MCP server in the middle of a conversation.
Scale: Anthropic counted "more than 10,000 active public MCP servers" when it donated MCP to the Agentic AI Foundation in December 2025, and the July 2026 release post reports "close to half-a-billion downloads a month" across the main SDKs.
What A2A is, and how it works
Google announced A2A on 9 April 2025 "with support and contributions from more than 50 technology partners", and said from day one that "A2A is an open protocol that complements Anthropic's Model Context Protocol (MCP)". Two and a half months later, on 23 June 2025, the Linux Foundation took the project over, by then with "more than 100 leading technology companies" behind it. IBM's competing Agent Communication Protocol (ACP) merged in on 29 August 2025: "ACP is officially merging with the A2A under the Linux Foundation". Version 1.0.0 came out on 12 March 2026, 1.0.1 on 28 May 2026, and on 27 August 2026 A2A "has officially been accepted as a Growth Stage project at the Agentic AI Foundation (AAIF)", the same foundation that holds MCP.
The specification describes the goal as letting agents work together "without needing access to each other's internal state, memory, or tools." The other agent is a black box. You never see its prompts, its model or its tools, only what it says back. Four ideas carry the protocol:
- Agent Card. A JSON file at
https://{server_domain}/.well-known/agent-card.jsonthat says what the agent is, which skills it has (with plain-English examples), which bindings it speaks and how to authenticate. - Messages and parts. The caller sends a message with role
ROLE_USERand parts: text, a file, or structured JSON data. - Tasks. Work that takes more than one reply becomes a task with an ID and a state:
SUBMITTED,WORKING,INPUT_REQUIRED,AUTH_REQUIRED,COMPLETED,FAILED,CANCELEDorREJECTED(each prefixedTASK_STATE_). The caller can check it withGetTask, stop it withCancelTask, list tasks or subscribe to updates. - Artifacts. The results of a task (a report, a booking, a file), made of the same parts as messages.
Version 1.0 has three bindings that must behave the same: JSON-RPC 2.0, gRPC, and HTTP+JSON (REST). Method names are PascalCase (SendMessage, GetTask), and clients send an A2A-Version header so an agent can refuse a version it does not support. By default SendMessage waits until the task finishes or needs input; with returnImmediately: true it returns at once and you poll or subscribe.
The A2A docs explain the split with an auto repair shop. A mechanic agent uses MCP to reach its own diagnostic tools ("agent-to-tool via MCP"). When it needs a part, it uses A2A to talk to a separate parts-supplier agent ("agent-to-agent via A2A"). Or in their shorter version: "MCP is vertical. It deepens a single agent." and "A2A is horizontal. It connects agents across that boundary."
MCP vs API: isn't MCP just an API?
It is a kind of API: JSON-RPC requests and responses. The difference is who it is written for. A REST API is written for a developer who reads the docs once and hard-codes the calls. MCP is written for a model that has never seen the server before and must work out, at run time, which tool to call and with what arguments.
| Question | Plain REST API | MCP server |
|---|---|---|
| How does the caller learn what exists? | Reads the docs before writing code | Asks the server (tools/list) every time it connects |
| What does a new integration cost the AI app? | New code per API | Nothing: one MCP client talks to every MCP server |
| Who fills in the arguments? | Code | The model, guided by the tool's JSON Schema and description |
| How does it ask for something missing? | Its own error format | A standard input_required result the host can show the user |
| Best for | Fixed, known integrations; anything without a model in the loop | Letting an AI app use many tools it was not built for |
An MCP server usually sits on top of an existing API. A GitHub MCP server calls the GitHub REST API. You are not replacing your API, you are adding a model-friendly layer in front of it. If no model is choosing the calls (a cron job, a backend service, a mobile app), a plain API is simpler, smaller and easier to debug. Our test shows the size difference in bytes.
We built the same job three ways and ran it
Comparison tables are easy to write and hard to trust. So we built one small job as a REST API, an MCP server (spec 2026-07-28) and an A2A agent (spec 1.0), ran the same booking through each, and then tried to break them.
The job: book a mock technical interview on 25 November 2026. Four slots exist (10:00, 11:30, 15:00, 17:30 IST); 11:30 is taken. A booking needs a date, a time and a track (backend, frontend or data), and takes 0.3 seconds, as if it were checking an interviewer's calendar. The user's request is "Book me a mock interview on 25 Nov at 10:00". It leaves out the track on purpose, so every version has to ask for it.
Everything is invented, runs on one laptop, and uses only the Python standard library: no SDK, no model, no network calls outside the machine. The shared booking logic:
core.py
"""The one job every server below does: mock-interview slots on 25 Nov 2026 (invented data)."""
import time
SLOTS = {"2026-11-25": {"10:00": None, "11:30": "taken", "15:00": None, "17:30": None}}
TRACKS = ["backend", "frontend", "data"]
WORK_SECONDS = 0.3 # pretend booking needs a call to the interviewer's calendar
def free_slots(date):
return [t for t, who in SLOTS.get(date, {}).items() if who is None]
def book(date, time_, track):
"""Returns (ok, detail). Slow on purpose."""
if track not in TRACKS:
return False, f"unknown track {track!r}"
if SLOTS.get(date, {}).get(time_, "missing") is not None:
return False, f"{date} {time_} is not free"
time.sleep(WORK_SECONDS)
SLOTS[date][time_] = track
return True, f"Booked a {track} mock interview on {date} at {time_} IST"
The REST API. GET /slots, POST /bookings (a 422 error if the track is missing, a 202 and a job ID otherwise) and GET /bookings/{id} to check the job. The caller has to know all of this in advance.
rest_server.py
"""Plain REST API for the same job (stdlib). Usage: python3 rest_server.py PORT"""
import json, sys, threading, itertools
from http.server import ThreadingHTTPServer, BaseHTTPRequestHandler
from urllib.parse import urlparse, parse_qs
import core
JOBS, ids = {}, itertools.count(1)
class H(BaseHTTPRequestHandler):
def send(self, code, body, headers=()):
raw = json.dumps(body).encode()
self.send_response(code)
self.send_header("Content-Type", "application/json")
for k, v in headers:
self.send_header(k, v)
self.send_header("Content-Length", str(len(raw)))
self.end_headers()
self.wfile.write(raw)
def do_GET(self):
u = urlparse(self.path)
if u.path == "/slots":
date = parse_qs(u.query).get("date", [""])[0]
return self.send(200, {"date": date, "free": core.free_slots(date)})
if u.path.startswith("/bookings/") and u.path[10:] in JOBS:
return self.send(200, JOBS[u.path[10:]])
self.send(404, {"error": "not_found"})
def do_POST(self):
b = json.loads(self.rfile.read(int(self.headers["Content-Length"])))
if not b.get("track"): # the caller must already know this field exists
return self.send(422, {"error": "missing_field", "field": "track", "allowed": core.TRACKS})
jid = f"b-{next(ids)}"
JOBS[jid] = {"id": jid, "status": "pending"}
def work():
ok, msg = core.book(b["date"], b["time"], b["track"])
JOBS[jid] = {"id": jid, "status": "confirmed" if ok else "failed", "detail": msg}
threading.Thread(target=work).start()
self.send(202, JOBS[jid], [("Location", f"/bookings/{jid}")])
def log_message(self, *a):
pass
if __name__ == "__main__":
ThreadingHTTPServer(("127.0.0.1", int(sys.argv[1])), H).serve_forever()
The MCP server. Two tools, find_slots and book_slot, over stdio. No handshake: every request must carry io.modelcontextprotocol/protocolVersion in _meta or it is refused. When the track is missing, book_slot returns input_required with an elicitation form and a requestState: the request's arguments, signed with an HMAC so the client can carry them but not change them. The server keeps nothing between calls.
mcp_server.py
"""MCP server, protocol 2026-07-28 (stateless), stdio transport, stdlib only.
One JSON-RPC message per line on stdin/stdout. Holds no per-client state."""
import base64, hashlib, hmac, json, os, sys
import core
VERSION = "2026-07-28"
SECRET = os.environ.get("STATE_KEY", "dev-only-key").encode() # same key on every instance
TOOLS = [
{"name": "find_slots", "description": "List free mock-interview slots on a date (YYYY-MM-DD).",
"inputSchema": {"type": "object", "properties": {"date": {"type": "string"}}, "required": ["date"]}},
{"name": "book_slot", "description": "Book a free slot. Asks for the track if it is missing.",
"inputSchema": {"type": "object", "properties": {
"date": {"type": "string"}, "time": {"type": "string"},
"track": {"type": "string", "enum": core.TRACKS}}, "required": ["date", "time"]}},
]
def seal(d): # requestState: the server's memory, carried by the client, signed so it can't be edited
body = base64.urlsafe_b64encode(json.dumps(d).encode()).decode()
return body + "." + hmac.new(SECRET, body.encode(), hashlib.sha256).hexdigest()
def unseal(s):
body, _, sig = s.partition(".")
if not hmac.compare_digest(sig, hmac.new(SECRET, body.encode(), hashlib.sha256).hexdigest()):
raise ValueError("requestState was modified")
return json.loads(base64.urlsafe_b64decode(body))
def text(t, data=None):
r = {"resultType": "complete", "content": [{"type": "text", "text": t}], "isError": False}
if data is not None:
r["structuredContent"] = data
return r
def call(name, args, p):
if name == "find_slots":
free = core.free_slots(args["date"])
return text(f"Free on {args['date']}: {', '.join(free)}", {"free": free})
if name == "book_slot":
if "requestState" in p: # a retry: rebuild context from the client's copy
args = {**unseal(p["requestState"]), **p["inputResponses"]["track"]["content"]}
if not args.get("track"):
return {"resultType": "input_required", "requestState": seal(args), "inputRequests": {
"track": {"method": "elicitation/create", "params": {
"mode": "form", "message": "Which track is this mock interview for?",
"requestedSchema": {"type": "object", "required": ["track"], "properties": {
"track": {"type": "string", "enum": core.TRACKS}}}}}}}
ok, msg = core.book(args["date"], args["time"], args["track"])
return {**text(msg), "isError": not ok}
raise KeyError(name)
def handle(m):
p = m.get("params", {})
v = p.get("_meta", {}).get("io.modelcontextprotocol/protocolVersion")
if v != VERSION: # every request carries its version; there is no handshake
return {"code": -32022, "message": "Unsupported protocol version",
"data": {"supported": [VERSION], "requested": v}}, None
meta = {"io.modelcontextprotocol/serverInfo": {"name": "mock-interviews", "version": "1.0.0"}}
if m["method"] == "server/discover":
return None, {"resultType": "complete", "supportedVersions": [VERSION], "capabilities": {"tools": {}},
"_meta": meta, "ttlMs": 3600000, "cacheScope": "public"}
if m["method"] == "tools/list":
return None, {"resultType": "complete", "tools": TOOLS, "ttlMs": 3600000, "cacheScope": "public"}
if m["method"] == "tools/call":
try:
return None, call(p["name"], p.get("arguments", {}), p)
except ValueError as e:
return {"code": -32602, "message": str(e)}, None
return {"code": -32601, "message": "Method not found"}, None
for line in sys.stdin:
msg = json.loads(line)
err, res = handle(msg)
out = {"jsonrpc": "2.0", "id": msg["id"], **({"error": err} if err else {"result": res})}
sys.stdout.write(json.dumps(out) + "\n")
sys.stdout.flush()
The A2A agent. An Agent Card at /.well-known/agent-card.json and the JSON-RPC methods SendMessage, GetTask and CancelTask. It takes plain English, works out the date and time itself, keeps each task in memory, and asks for whatever is missing by setting the task to TASK_STATE_INPUT_REQUIRED.
a2a_server.py
"""A2A agent, protocol 1.0, JSON-RPC binding over HTTP, stdlib only.
Usage: python3 a2a_server.py PORT. Tasks live in this process's memory."""
import json, re, sys, threading, uuid
from http.server import ThreadingHTTPServer, BaseHTTPRequestHandler
import core
TASKS = {}
PORT = int(sys.argv[1])
CARD = {
"name": "Mock Interview Scheduler", "version": "1.0.0",
"description": "Books mock technical interviews. Tell it a date and time in plain English.",
"supportedInterfaces": [{"url": f"http://127.0.0.1:{PORT}/a2a", "protocolBinding": "JSONRPC",
"protocolVersion": "1.0"}],
"capabilities": {"streaming": False, "pushNotifications": False},
"defaultInputModes": ["text/plain"], "defaultOutputModes": ["text/plain", "application/json"],
"skills": [{"id": "book-mock-interview", "name": "Book a mock interview",
"description": "Finds a free slot and books it; asks for anything missing.",
"tags": ["scheduling", "interviews"],
"examples": ["Book me a backend mock interview on 25 Nov at 10:00"]}],
}
def say(text):
return {"role": "ROLE_AGENT", "messageId": str(uuid.uuid4()), "parts": [{"text": text}]}
def send_message(p):
msg = p["message"]
words = " ".join(part.get("text", "") for part in msg["parts"]).lower()
t = TASKS.get(msg.get("taskId")) if msg.get("taskId") else None
if msg.get("taskId") and t is None:
raise LookupError(msg["taskId"])
if t is None: # a new task: this agent decides what the words mean
d, hm = re.search(r"(\d{1,2}) nov", words), re.search(r"(\d{1,2}:\d\d)", words)
t = {"id": str(uuid.uuid4()), "contextId": str(uuid.uuid4()), "history": [],
"want": {"date": f"2026-11-{int(d.group(1)):02d}" if d else None,
"time": hm.group(1) if hm else None, "track": None}}
TASKS[t["id"]] = t
t["history"].append(msg)
t["want"]["track"] = t["want"]["track"] or next((k for k in core.TRACKS if k in words), None)
missing = [k for k, v in t["want"].items() if not v]
if missing:
t["status"] = {"state": "TASK_STATE_INPUT_REQUIRED", "message": say(
f"I still need: {', '.join(missing)}. Tracks: {', '.join(core.TRACKS)}.")}
return view(t)
t["status"] = {"state": "TASK_STATE_WORKING"}
def work():
ok, text = core.book(t["want"]["date"], t["want"]["time"], t["want"]["track"])
t["artifacts"] = [{"artifactId": str(uuid.uuid4()), "name": "booking",
"parts": [{"text": text}, {"data": {"ok": ok, **t["want"]}}]}]
t["status"] = {"state": "TASK_STATE_COMPLETED" if ok else "TASK_STATE_FAILED"}
th = threading.Thread(target=work)
th.start()
if not p.get("configuration", {}).get("returnImmediately"):
th.join() # blocking is the default in A2A 1.0
return view(t)
def view(t):
return {"task": {k: t[k] for k in ("id", "contextId", "status", "artifacts") if k in t}}
class H(BaseHTTPRequestHandler):
def reply(self, body):
raw = json.dumps(body).encode()
self.send_response(200)
self.send_header("Content-Type", "application/json")
self.send_header("Content-Length", str(len(raw)))
self.end_headers()
self.wfile.write(raw)
def do_GET(self): # discovery: a public, cacheable card at a well-known URL
if self.path == "/.well-known/agent-card.json":
return self.reply(CARD)
self.send_error(404)
def do_POST(self):
m = json.loads(self.rfile.read(int(self.headers["Content-Length"])))
out = {"jsonrpc": "2.0", "id": m["id"]}
if self.headers.get("A2A-Version") != "1.0":
out["error"] = {"code": -32009, "message": "Version not supported"}
return self.reply(out)
try:
p = m["params"]
if m["method"] == "SendMessage":
out["result"] = send_message(p)
elif m["method"] == "GetTask":
if p["id"] not in TASKS:
raise LookupError(p["id"])
out["result"] = view(TASKS[p["id"]])["task"]
elif m["method"] == "CancelTask":
if p["id"] not in TASKS:
raise LookupError(p["id"])
if TASKS[p["id"]]["status"]["state"] in ("TASK_STATE_COMPLETED", "TASK_STATE_FAILED"):
out["error"] = {"code": -32002, "message": "Task cannot be canceled"}
else:
TASKS[p["id"]]["status"] = {"state": "TASK_STATE_CANCELED"}
out["result"] = view(TASKS[p["id"]])["task"]
else:
out["error"] = {"code": -32601, "message": "Method not found"}
except LookupError:
out["error"] = {"code": -32001, "message": "Task not found"}
self.reply(out)
def log_message(self, *a):
pass
if __name__ == "__main__":
ThreadingHTTPServer(("127.0.0.1", PORT), H).serve_forever()
The test run. A 169-line script (run.py, not shown) starts each server as its own process, runs the booking from a cold start, counts every call and every byte of JSON in both directions, and then tries five ways to break things: kill the server in the middle of a conversation, send a request without a protocol version, edit the signed state, cancel a finished task, and use the wrong A2A version. Its output, unedited:
run.out
== REST: plain HTTP API (the client must know every endpoint and field in advance)
GET /slots -> 200 {'date': '2026-11-25', 'free': ['10:00', '15:00', '17:30']}
POST /bookings (no track) -> 422 {'error': 'missing_field', 'field': 'track', 'allowed': ['backend', 'frontend', 'data']}
POST /bookings -> 202 {'id': 'b-1', 'status': 'pending'}
GET /bookings/b-1 x2 -> 200 {'id': 'b-1', 'status': 'confirmed', 'detail': 'Booked a backend mock interview on 2026-11-25 at 10:00 IST'}
restart during a pending booking, then GET /bookings/b-2 -> 404 {'error': 'not_found'}
== MCP 2026-07-28 over stdio (no handshake; every request carries its version)
server/discover -> versions ['2026-07-28'], capabilities {'tools': {}}
tools/list -> ['find_slots', 'book_slot']
tools/call find_slots -> {'free': ['10:00', '15:00', '17:30']}
tools/call book_slot (no track) -> resultType=input_required, asks: 'Which track is this mock interview for?'
(server process killed; a new one started)
tools/call book_slot (retry + inputResponses) -> complete: Booked a backend mock interview on 2026-11-25 at 10:00 IST
request without _meta version -> error -32022 Unsupported protocol version
retry with an edited requestState -> error -32602 requestState was modified
== A2A 1.0, JSON-RPC binding (the remote side is an agent that keeps the task)
GET /.well-known/agent-card.json -> 'Mock Interview Scheduler', skills ['book-mock-interview']
SendMessage 'Book me a mock interview on 25 Nov at 10:00' -> TASK_STATE_INPUT_REQUIRED: 'I still need: track. Tracks: backend, frontend, data.'
SendMessage 'backend' (same taskId, returnImmediately) -> TASK_STATE_WORKING
GetTask x2 -> TASK_STATE_COMPLETED: Booked a backend mock interview on 2026-11-25 at 10:00 IST
CancelTask on the finished task -> error -32002 Task cannot be canceled
GetTask with A2A-Version: 0.5 -> error -32009 Version not supported
(agent process killed while that task waited for input; a new one started)
SendMessage 'frontend' to the old taskId -> error -32001 Task not found
== Same booking, three ways (cold start to confirmed booking)
calls of which polls bytes sent bytes back
REST 5 2 146 323
MCP 5 0 1860 1806
A2A 5 2 708 1864
MCP: 1055 of its 1860 bytes sent are the _meta block (version, client info, capabilities) repeated on all 5 requests
Polls depend on timing (0.3 s of work, a check every 0.12 s); the other calls do not.
What a model reads up front: MCP tools/list 501 bytes of JSON Schema; A2A agent card 689 bytes; REST: nothing (docs)
What the run shows
| Cold start to confirmed booking | REST | MCP | A2A |
|---|---|---|---|
| Calls | 5 | 5 | 5 |
| Bytes sent | 146 | 1,860 | 708 |
| Bytes received | 323 | 1,806 | 1,864 |
| Learned what exists at run time | No | Yes (tools/list) | Yes (Agent Card) |
| Server restarted mid-conversation | Job lost (404) | Booking completed | Task lost (-32001) |
- Stateless MCP survives a restart; the other two did not. We killed the MCP server right after it asked for the track and started a new process. The retry still booked the slot, because everything the server needed was in the signed
requestStatethe client sent back. The A2A agent, killed while its task waited for input, answered the follow-up with-32001 Task not found. The REST job, killed while pending, came back404. This is the 2026-07-28 change working as the release post promised: any instance can answer any request. - A2A does not remove state; it standardises it. The REST API and the A2A agent both had to remember a job, and both lost it the same way. The difference is that every A2A agent exposes that job through the same
GetTaskandCancelTaskcalls and the same eight states, where every REST API invents its own/bookings/{id}. A production A2A agent needs a durable task store; our in-memory one shows why. - Statelessness costs bytes. MCP sent 1,860 bytes against 708 for A2A and 146 for REST. 1,055 of those bytes are the
_metablock (protocol version, client name, capabilities) repeated on all 5 requests, because there is no session to remember them. On a laptop that is nothing. For a host making thousands of tool calls a minute, it is worth knowing. - Both protocols now have a standard way to ask a question. MCP asked with a typed form: a JSON Schema with
"enum": ["backend", "frontend", "data"], which a host can turn into a dropdown. A2A asked in words ("I still need: track"), which another agent or a person can read but a program has to interpret. MCP's way suits a user filling in a field; A2A's suits two agents talking. - The signed state did its job. Changing one character of
requestStategot-32602 requestState was modified, and nothing was booked. Without the HMAC, a client could have edited the date or time inside it. The spec requires servers to treatrequestStateas attacker-controlled input. - Versions are enforced on every call. MCP refused a request without a version (
-32022); A2A refusedA2A-Version: 0.5(-32009) and refused to cancel a finished task (-32002). REST had no version check at all, which is normal and is also how APIs break their callers. - What a model reads up front is similar in size, different in kind. The MCP tool list was 501 bytes of JSON Schema: exact field names and allowed values. The A2A Agent Card was 689 bytes, mostly plain-English descriptions and an example sentence. The REST API told the caller nothing; a programmer had to read the code.
When to use MCP, A2A or a plain API
| You want to... | Use | Why |
|---|---|---|
| Let your AI app read your database, files or Jira | MCP | Tools with clear inputs; the model picks them; any MCP host can reuse the server |
| Offer your product's actions inside Claude, ChatGPT, Cursor or VS Code | MCP | That is what those hosts connect to |
| Hand a whole job to another team's or company's agent | A2A | You send the goal, not the steps; their agent keeps its prompts and tools private |
| Track work that takes minutes or hours, with questions in the middle | A2A | Task IDs, states, cancel, streaming and push notifications are part of the protocol |
| Call a service from ordinary code, no model involved | REST API | Smallest messages, best tooling, nothing to learn |
| Build a multi-agent system inside one codebase | Neither, at first | Function calls between your own agents are simpler; add A2A when an agent crosses a team or company boundary |
| Expose your agent to others and give it tools | Both | An A2A front door for other agents, MCP behind it for its own tools |
Using MCP and A2A together: one example
Picture a placement assistant at a training company. A student types: "Book me a backend mock interview next week and send me the prep sheet."
- The assistant (the host) uses MCP to reach its own tools: the student database to look up their track, and the course content server to fetch the prep sheet.
- Interviews are run by a partner company with its own scheduling agent. The assistant finds that agent's Agent Card, sees a
book-mock-interviewskill and sends an A2A message. - The partner's agent replies
TASK_STATE_INPUT_REQUIRED: which day? The assistant asks the student, sends the answer on the same task, and the task moves toWORKING, thenCOMPLETEDwith a booking artifact. - Inside the partner company, their scheduling agent uses its own MCP servers (calendars, video links) that the assistant never sees.
Underneath all of it, REST APIs: the calendar, the database and the video service each have one. MCP and A2A decide who is allowed to talk to them and how.
Interview questions on MCP and A2A
1. In one sentence each, what do MCP and A2A connect?
MCP connects an AI application to tools and data; A2A connects an agent to another, independent agent that it delegates work to.
2. Is MCP stateful?
Not since spec version 2026-07-28. The initialize handshake and session header were removed; every request carries its version and capabilities. Servers that need state across calls return server-minted handles as ordinary tool arguments, or use requestState during a multi round-trip request.
3. How does an A2A client find out what an agent can do?
It fetches the Agent Card, usually at /.well-known/agent-card.json, which lists skills with examples, supported bindings, capabilities such as streaming, and security schemes.
4. A server needs one more value from the user. How does each protocol handle it?
MCP returns an input_required result with an elicitation request and a signed requestState; the client retries the same call with inputResponses. A2A sets the task to TASK_STATE_INPUT_REQUIRED with a message; the client sends a new message with the same taskId.
5. Why must an MCP server protect requestState?
The client carries it, so the client (or an attacker) can change it. The spec says servers must treat it as attacker-controlled input and protect its integrity, for example with an HMAC, if it affects authorization or business logic.
6. When would you not use A2A between two agents?
When both agents live in the same codebase and team. A function call or a framework's built-in hand-off is simpler. A2A pays off when the other agent is owned, deployed or secured by someone else.
Limits of this test
- No model ran. The A2A "agent" reads dates and times with two regular expressions, and the MCP host's arguments are written by hand. The test is about what the protocols carry, not about how smart an agent is.
- No SDKs. All three servers are hand-written with the Python standard library, so they implement only the parts of each spec this job needs. The official SDKs (
mcp2.3.0,a2a-sdk1.3.1) add authentication, streaming, validation and a lot more. - Byte counts are JSON bodies only. HTTP headers are not counted, and MCP ran over stdio while REST and A2A ran over HTTP. Over Streamable HTTP, MCP also sends
Mcp-MethodandMcp-Nameheaders on every POST. - The restart results are about our servers. The A2A task and the REST job were lost because both servers keep them in memory. A production A2A agent would store tasks in a database and survive a restart. The point is that A2A needs that storage and MCP's retry did not.
- Polls depend on timing. The booking takes 0.3 s and the client checks every 0.12 s, so the poll count can differ by one between runs. Every other number in the output is the same on every run.
- One small job. Real gaps show up in authentication, streaming large outputs and agents that run for hours, which this test does not cover.
Frequently asked questions
What is the difference between MCP and A2A?
MCP (Model Context Protocol) connects an AI application to tools, data and prompts, and the model decides which tool to call. A2A (Agent2Agent) connects one agent to another independent agent: you send a goal, the other agent decides how to do it, and the work is tracked as a task with a state.
Is A2A a replacement for MCP?
No. Google launched A2A in April 2025 as a protocol that complements MCP, and both are now projects of the Agentic AI Foundation under the Linux Foundation. A typical system uses MCP for an agent's own tools and A2A when it delegates work to an agent owned by another team or company.
What is the difference between MCP and an API?
An API is written for a programmer who reads the docs and hard-codes the calls. MCP is written for a model: the server lists its tools with JSON Schema at run time, the model picks one and fills in the arguments, and one MCP client can use any MCP server. Most MCP servers call ordinary APIs underneath.
Is MCP stateless?
Yes, since specification version 2026-07-28, released on 28 July 2026. It removed the initialize handshake and the Mcp-Session-Id header, so every request carries its protocol version and capabilities. To ask the user for input, a server returns an input_required result with a requestState that the client sends back on retry.
What is an A2A Agent Card?
An Agent Card is a JSON document, usually served at /.well-known/agent-card.json, that describes an A2A agent: its name, skills with example requests, the protocol bindings and versions it supports (JSON-RPC, gRPC or HTTP+JSON), capabilities such as streaming, and the authentication it needs. Clients read it to decide whether and how to call the agent.
What is the latest version of MCP and A2A?
As of 22 November 2026 the latest MCP specification is 2026-07-28 and the latest A2A release is 1.0.1, published on 28 May 2026 after 1.0.0 on 12 March 2026. On PyPI the Python SDKs are mcp 2.3.0 and a2a-sdk 1.3.1. Check the official release pages before relying on these.
When should I use A2A instead of MCP?
Use A2A when the other side is an agent you do not control and the job may need questions, minutes or hours, or cancelling, such as a partner's scheduling or procurement agent. Use MCP when your own agent needs tools with clear inputs, such as a database, files or a ticketing system.
Crio AI Engineering
Build agents that work outside a demo
Crio's AI Engineering program is project-first: you build LLM apps, RAG pipelines and tool-using agents, then learn to evaluate, secure and ship them. Talk to the team about whether it fits you.
Sources
- Agent2Agent (A2A) Protocol Specification, v1.0.1 · A2A Project (Linux Foundation)
- A2A releases on GitHub (v1.0.0, v1.0.1) · A2A Project
- A2A and MCP: Detailed Comparison · A2A Project
- MCP specification 2026-07-28: Key Changes · Model Context Protocol
- MCP specification 2026-07-28: Tools · Model Context Protocol
- MCP specification 2026-07-28: Multi Round-Trip Requests · Model Context Protocol
- MCP specification 2026-07-28: Architecture · Model Context Protocol
- The 2026-07-28 Specification (MCP blog), 28 July 2026 · Model Context Protocol
- What is the Model Context Protocol (MCP)? · Model Context Protocol
- Introducing the Model Context Protocol, 25 November 2024 · Anthropic
- Donating the Model Context Protocol and establishing the Agentic AI Foundation, 9 December 2025 · Anthropic
- Announcing the Agent2Agent Protocol (A2A), 9 April 2025 · Google for Developers
- Linux Foundation launches the Agent2Agent Protocol project, 23 June 2025 · The Linux Foundation
- ACP joins forces with A2A under the Linux Foundation's LF AI & Data, 29 August 2025 · LF AI & Data
- A New Chapter for A2A: Joining the Agentic AI Foundation, 27 August 2026 · A2A Project
- a2a-sdk on PyPI · PyPI
- mcp on PyPI · PyPI
The test ran on 22 November 2026 with Python 3 and the standard library only; no language model, MCP SDK or A2A SDK was used. The servers, slots and tracks in it are invented. Versions, dates, quotes and figures were read from the specifications, release pages, PyPI and announcements above on 22 November 2026.
Last updated: