MCP vs. A2A: Tools vs. Agent Collaboration
MCP connects one AI application to tools and data. A2A lets independent agents, often run by different companies, hand each other tasks. Most products need MCP first and A2A only at an organization boundary.
5 min read / Updated / Last checked
- Format
- Explainer · Intermediate
- Who it is for
- Founders and the builders they hire
- You leave with
- Choose between MCP, A2A, both or neither for a feature, and publish a minimal MCP server and A2A agent card with tests.
The problem
On December 9, 2025, Anthropic donated the Model Context Protocol (MCP) to the Agentic AI Foundation, a new fund under the Linux Foundation that it co-founded with Block and OpenAI. At that point Anthropic counted more than 10,000 active public MCP servers and over 97 million monthly downloads of the Python and TypeScript SDKs [1]. On April 9, 2026, the Linux Foundation reported that the Agent2Agent protocol (A2A), originally developed by Google, had more than 150 supporting organizations and its first stable specification, version 1.0 [2]. On August 17, 2026, A2A joined MCP in the same foundation [3].
Two open protocols, one foundation, both described as "agent interoperability." Founders hear both names in the same pitch and reasonably ask which one their product needs.
The cost of getting it wrong runs both ways. Adding A2A to a product that only calls its own tools adds a network protocol, an identity scheme and a task lifecycle for nothing. Building custom integrations where an MCP server would do means rebuilding them for every AI client a customer uses. The two protocols answer different questions, and the difference fits in one sentence.
How it works
MCP is how an AI application uses tools and data. An application such as a chat app or IDE (the host) connects to MCP servers. A server offers three kinds of features: tools the model can call, resources (context and data), and prompts (templates for users). Messages are JSON-RPC 2.0, a simple request and response format [4]. The current revision, dated 2026-07-28, makes each request self-contained. Earlier revisions opened a session with an initialize handshake and let servers send requests. Now only clients do [5]. There are two standard transports: stdio, where the host starts the server as a local process, and Streamable HTTP for remote servers [5]. Authorization is optional. When used over HTTP it follows OAuth 2.1, servers must accept only tokens issued for them, and they must not pass other tokens through. Over stdio, servers take credentials from the environment [6]. The spec's safety rules are direct: tools represent arbitrary code execution, tool descriptions from untrusted servers are untrusted, and hosts must get the user's consent before invoking any tool [4].
A2A is how one agent hands work to another agent. Each A2A agent publishes an Agent Card, a JSON document at /.well-known/agent-card.json describing its skills, endpoints and required authentication [7]. A client sends a message, and the remote agent manages a Task through states such as submitted, working, input required, auth required, completed, failed, canceled and rejected. Bindings include JSON-RPC, gRPC and HTTP with JSON, with streaming over server-sent events and push notifications to a webhook [7]. Agents stay opaque: they collaborate "without needing access to each other's internal state, memory, or tools." Cards can be signed, and clients should verify a signature before trusting one [7].
The one-sentence rule: if your agent needs a capability, it is a tool, so use MCP. If it needs another party's agent to own a piece of work, with its own reasoning, state and policies, that is A2A.
MCP and A2A side by side
Fig. 01| Dimension | MCP | A2A |
|---|---|---|
| Connects | App to tools and data | Agent to agent |
| Unit of work | One tool call | A task with states |
| Discovery | Configured by the host | Agent Card at well-known URL |
| Transport | stdio, Streamable HTTP | JSON-RPC, gRPC, HTTP+JSON |
| Trust boundary | User consents per tool | Signed card, declared auth |
By the numbers
- active public MCP servers when Anthropic donated MCP in December 2025 [1]
- 10,000+
- monthly downloads of the MCP Python and TypeScript SDKs at that time [1]
- 97 million
- organizations supporting A2A in April 2026, up from 50+ a year earlier [2]
- 150+
- standard MCP transports: stdio and Streamable HTTP [5]
- 2
| Date | Event |
|---|---|
| December 9, 2025 | Anthropic donates MCP to the new Agentic AI Foundation [1] |
| March 12, 2026 | A2A version 1.0 specification is frozen [3] |
| April 9, 2026 | Linux Foundation reports 150+ A2A supporters and v1.0 as the first stable spec [2] |
| July 28, 2026 | Date of the current MCP specification revision [4] |
| August 17, 2026 | A2A joins the Agentic AI Foundation alongside MCP [3] |
The adoption numbers come from the projects' own announcements [1][2]. They show broad support, with MCP adopted by products such as ChatGPT, Cursor, Gemini, Microsoft Copilot and Visual Studio Code [1] and A2A integrated across Google, Microsoft and AWS platforms [2]. They do not show that every server or agent is safe to connect. A public MCP server is code your agent can run, and a public A2A agent is a party your agent will trust with work. Shared governance under one foundation also matches the division of labor this article recommends: MCP inside an agent, A2A between agents.
Implementation
Start with MCP. The server below exposes one read-only tool with a typed result. It uses the official Python SDK, version 2, where the server class is MCPServer (it was called FastMCP in version 1) [8].
"""MCP server exposing one read-only tool. Uses the official Python SDK, version 2.x."""
from mcp.server.mcpserver import MCPServer
from mcp.types import ToolAnnotations
from pydantic import BaseModel
server = MCPServer("orders", instructions="Order lookups for the support team. Read-only.")
ORDERS = { # stand-in for your database or API, already scoped to the signed-in tenant
"A-100": {"status": "shipped", "carrier": "DHL", "eta": "2026-11-14"},
"A-101": {"status": "processing", "carrier": None, "eta": None},
}
class OrderStatus(BaseModel): # typed output: clients get a schema, not free text
found: bool
order_id: str
status: str | None = None
carrier: str | None = None
eta: str | None = None
@server.tool(annotations=ToolAnnotations(read_only_hint=True))
def get_order_status(order_id: str) -> OrderStatus:
"""Return status, carrier and estimated delivery date for one order id like A-100."""
order = ORDERS.get(order_id.strip().upper())
if order is None:
return OrderStatus(found=False, order_id=order_id)
return OrderStatus(found=True, order_id=order_id, **order)
if __name__ == "__main__":
server.run() # stdio: the host application starts this process locallyThe read-only annotation is only a hint to the host, and the spec treats annotations as untrusted unless the server is trusted, so the tool itself must never write [4]. For a remote server, run it over Streamable HTTP behind OAuth and check that every token was issued for this server [6].
Add A2A only when another organization's agent should own part of the work, for example a retailer's assistant handing returns to a logistics partner's returns agent. That partner publishes a card like this one, following the field names in the A2A 1.0 specification [7]:
{
"name": "Returns Agent",
"description": "Decides return eligibility for orders from Example Shop and creates return labels.",
"supportedInterfaces": [
{"url": "https://returns.example.com/a2a/v1", "protocolBinding": "JSONRPC", "protocolVersion": "1.0"}
],
"provider": {"organization": "Example Logistics", "url": "https://logistics.example.com"},
"version": "1.0.0",
"capabilities": {"streaming": true, "pushNotifications": false},
"securitySchemes": {
"company_sso": {
"openIdConnectSecurityScheme": {
"openIdConnectUrl": "https://login.example.com/.well-known/openid-configuration"
}
}
},
"securityRequirements": [{"schemes": {"company_sso": {"list": ["openid", "returns"]}}}],
"defaultInputModes": ["text/plain", "application/json"],
"defaultOutputModes": ["text/plain", "application/json"],
"skills": [
{
"id": "return-eligibility",
"name": "Return eligibility",
"description": "Checks an order against the return policy and explains the decision.",
"tags": ["returns", "orders", "policy"],
"examples": ["Can order A-100 still be returned?"]
}
]
}Treat everything the remote agent returns as untrusted input, the same as a web page. It is another party's output, and your agent should not follow instructions inside it.
Test it
These tests call the MCP server in-process and check the card's required fields. They passed with version 2.3.0 of the mcp package.
import asyncio
import json
from order_server import server
CARD_REQUIRED = {"name", "description", "supportedInterfaces", "version", "capabilities",
"defaultInputModes", "defaultOutputModes", "skills"}
def test_tool_is_listed_with_read_only_annotation():
tools = {t.name: t for t in asyncio.run(server.list_tools())}
assert tools["get_order_status"].annotations.read_only_hint is True
def test_tool_returns_found_and_not_found():
hit = asyncio.run(server.call_tool("get_order_status", {"order_id": "a-100"}))
miss = asyncio.run(server.call_tool("get_order_status", {"order_id": "Z-999"}))
assert hit.structured_content["status"] == "shipped"
assert miss.structured_content["found"] is False
def test_agent_card_has_required_fields_and_https_endpoints():
card = json.load(open("agent-card.json"))
assert CARD_REQUIRED <= card.keys()
assert all(i["url"].startswith("https://") for i in card["supportedInterfaces"])
assert all({"id", "name", "description", "tags"} <= s.keys() for s in card["skills"])
assert card["securityRequirements"], "an unauthenticated card is a public agent"Run python -m pytest test_contracts.py. Expected: three passing tests. Then check the real setup:
- Connect the server to the AI client your team uses. Expected: the client asks before the first tool call, as the spec requires of hosts [4].
- Send a request to a remote MCP server with a token issued for a different server. Expected: HTTP 401 [6].
- Fetch a partner's agent card. Expected: served over HTTPS, signature verified before use, and authentication required for any skill that touches customer data [7].
Decision
Choose by what crosses the boundary.
- Neither when the tools live in your own codebase and serve one application. A function call is simpler than a protocol.
- MCP when the same tools or data should work across several AI clients, or when you want to offer your product to customers' agents [1][4].
- A2A when an independent agent, usually another company's, should own a task end to end with its own state and policies [7].
- Both in larger systems: MCP inside each agent for tools, A2A between agents for delegation. Either way, consent, scoped tokens and untrusted-output handling are your job, not the protocol's. For permissions per tool, see Tool Permissions and Agent Identity.
Sources
- [1]Donating MCP to the Agentic AI Foundation (opens in a new tab)Anthropic, December 2025
- [2]A2A Protocol surpasses 150 organizations, lands in major cloud platforms and sees enterprise production use in first year (opens in a new tab)Linux Foundation, April 2026
- [3]A2A v1.0 Builder's Guide Part 1: Discovery, Tasks, and Clients (opens in a new tab)Agentic AI Foundation, August 2026
- [4]Specification (opens in a new tab)Model Context Protocol, July 2026
- [5]Transports (opens in a new tab)Model Context Protocol, July 2026
- [6]Authorization (opens in a new tab)Model Context Protocol, July 2026
- [7]Agent2Agent (A2A) Protocol Specification (opens in a new tab)A2A Project, November 2026
- [8]Migration Guide: v1 to v2 (opens in a new tab)MCP Python SDK, November 2026
Technical guidance, not legal or security certification.
Related resources
Need a technical review of an AI-built MVP?
Discuss your build