Hands-on·15 min read

MCP vs A2A vs API: Which Agent Protocol Does What (Tested)

The difference between MCP (Model Context Protocol), A2A (Agent2Agent) and a plain REST API: who each one is for, a full comparison table as of November 2026, what the stateless MCP 2026-07-28 release changed, how A2A tasks and Agent Cards work, when to use each, and the same booking job built three ways in stdlib Python and broken on purpose.

By the Crio.Do team · Last updated 22 November 2026

Short answer

MCP connects an AI app to tools and data so a model can call them; A2A lets one agent hand a whole job to another, independent agent and track it as a task; a REST API is for code a programmer writes. Since MCP 2026-07-28 the MCP core is stateless, while A2A keeps task state. In our test of one booking built all three ways, MCP finished after a mid-conversation server restart, the A2A task and the REST job were lost, and MCP sent the most bytes (1,860 vs 708 vs 146).

On this page
  1. MCP vs A2A vs API in one minute
  2. Comparison table
  3. What MCP is in 2026
  4. What A2A is
  5. MCP vs API
  6. Same job, three ways
  7. What the run shows
  8. When to use which
  9. Using MCP and A2A together
  10. Interview questions
  11. Limits of this test
  12. FAQ

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 /bookings with 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 APIMCPA2A
ConnectsA program to a serviceAn AI app (host) to tools, data and promptsAn agent to another, independent agent
Who decides what to callThe programmer, at build timeThe model, at run time, from the tool listThe calling agent sends a request; the remote agent decides how to do it
DiscoveryDocs or an OpenAPI file, if one existsserver/discover and tools/listAn Agent Card at /.well-known/agent-card.json
Unit of workOne endpoint callOne tool call (tools/call)A task with an ID, a state and artifacts
Input formatFields the API definesArguments that match the tool's JSON SchemaMessages made of parts: text, files or JSON data
Asking for missing inputWhatever the API invents (often a 400 or 422 error)InputRequiredResult, then the client retries with inputResponsesTask state TASK_STATE_INPUT_REQUIRED, then a follow-up message on the same task
State between callsUp to the APINone in the protocol: "MCP is a stateless protocol" (spec 2026-07-28)Kept by the remote agent: tasks, history, context IDs
Long-running workUp to the API (job IDs, webhooks)Optional io.modelcontextprotocol/tasks extensionBuilt in: GetTask, CancelTask, streaming, push notifications
Wire formatHTTP + JSON, usuallyJSON-RPC 2.0 over stdio or Streamable HTTPJSON-RPC 2.0, gRPC or HTTP+JSON (REST), all over HTTP(S)
Latest versionn/a2026-07-28 (released 28 July 2026)1.0.1 (released 28 May 2026; 1.0.0 on 12 March 2026)
Python SDKAny HTTP librarymcp 2.3.0a2a-sdk 1.3.1
Started byAnthropic, 25 November 2024Google, 9 April 2025
Governed byAgentic AI Foundation (Linux Foundation), since 9 December 2025Linux 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/initialized handshake." The Mcp-Session-Id header 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 opaque requestState; 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:

  1. Agent Card. A JSON file at https://{server_domain}/.well-known/agent-card.json that says what the agent is, which skills it has (with plain-English examples), which bindings it speaks and how to authenticate.
  2. Messages and parts. The caller sends a message with role ROLE_USER and parts: text, a file, or structured JSON data.
  3. 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, CANCELED or REJECTED (each prefixed TASK_STATE_). The caller can check it with GetTask, stop it with CancelTask, list tasks or subscribe to updates.
  4. 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.

QuestionPlain REST APIMCP server
How does the caller learn what exists?Reads the docs before writing codeAsks the server (tools/list) every time it connects
What does a new integration cost the AI app?New code per APINothing: one MCP client talks to every MCP server
Who fills in the arguments?CodeThe model, guided by the tool's JSON Schema and description
How does it ask for something missing?Its own error formatA standard input_required result the host can show the user
Best forFixed, known integrations; anything without a model in the loopLetting 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 bookingRESTMCPA2A
Calls555
Bytes sent1461,860708
Bytes received3231,8061,864
Learned what exists at run timeNoYes (tools/list)Yes (Agent Card)
Server restarted mid-conversationJob lost (404)Booking completedTask lost (-32001)
  1. 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 requestState the 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 back 404. This is the 2026-07-28 change working as the release post promised: any instance can answer any request.
  2. 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 GetTask and CancelTask calls 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.
  3. Statelessness costs bytes. MCP sent 1,860 bytes against 708 for A2A and 146 for REST. 1,055 of those bytes are the _meta block (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.
  4. 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.
  5. The signed state did its job. Changing one character of requestState got -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 treat requestState as attacker-controlled input.
  6. Versions are enforced on every call. MCP refused a request without a version (-32022); A2A refused A2A-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.
  7. 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...UseWhy
Let your AI app read your database, files or JiraMCPTools 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 CodeMCPThat is what those hosts connect to
Hand a whole job to another team's or company's agentA2AYou 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 middleA2ATask IDs, states, cancel, streaming and push notifications are part of the protocol
Call a service from ordinary code, no model involvedREST APISmallest messages, best tooling, nothing to learn
Build a multi-agent system inside one codebaseNeither, at firstFunction 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 toolsBothAn 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."

  1. 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.
  2. Interviews are run by a partner company with its own scheduling agent. The assistant finds that agent's Agent Card, sees a book-mock-interview skill and sends an A2A message.
  3. 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 to WORKING, then COMPLETED with a booking artifact.
  4. 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 (mcp 2.3.0, a2a-sdk 1.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-Method and Mcp-Name headers 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

  1. Agent2Agent (A2A) Protocol Specification, v1.0.1 · A2A Project (Linux Foundation)
  2. A2A releases on GitHub (v1.0.0, v1.0.1) · A2A Project
  3. A2A and MCP: Detailed Comparison · A2A Project
  4. MCP specification 2026-07-28: Key Changes · Model Context Protocol
  5. MCP specification 2026-07-28: Tools · Model Context Protocol
  6. MCP specification 2026-07-28: Multi Round-Trip Requests · Model Context Protocol
  7. MCP specification 2026-07-28: Architecture · Model Context Protocol
  8. The 2026-07-28 Specification (MCP blog), 28 July 2026 · Model Context Protocol
  9. What is the Model Context Protocol (MCP)? · Model Context Protocol
  10. Introducing the Model Context Protocol, 25 November 2024 · Anthropic
  11. Donating the Model Context Protocol and establishing the Agentic AI Foundation, 9 December 2025 · Anthropic
  12. Announcing the Agent2Agent Protocol (A2A), 9 April 2025 · Google for Developers
  13. Linux Foundation launches the Agent2Agent Protocol project, 23 June 2025 · The Linux Foundation
  14. ACP joins forces with A2A under the Linux Foundation's LF AI & Data, 29 August 2025 · LF AI & Data
  15. A New Chapter for A2A: Joining the Agentic AI Foundation, 27 August 2026 · A2A Project
  16. a2a-sdk on PyPI · PyPI
  17. 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: