Model Context Protocol (MCP)

Protocol · Last verified 2026-09-30 · Install verified 2026-09-30

TL;DR

The Model Context Protocol is an open JSON-RPC protocol through which AI applications (hosts) connect to servers that offer tools, resources and prompts. It is run as a Series of LF Projects, LLC, has official SDKs in ten languages, and its current revision is 2026-07-28. It suits anyone exposing tools or data to agents and assistants.

Key facts

Model Context Protocol (MCP) key facts. Data as of 2026-10-04.
Type Protocol
Languages / SDKs TypeScript, Python, C#, Go, Rust, Ruby, Java, Swift, PHP, Kotlin
License unknown
Pricing model Open source, free
Orchestration pattern Other
GitHub stars 9,375 (as of 2026-10-04)
GitHub forks 1,852
Last push 2026-10-03
Latest release 2026-07-28
Repository modelcontextprotocol/modelcontextprotocol
Website modelcontextprotocol.io
Documentation modelcontextprotocol.io
Last verified 2026-09-30

Key features

  • Three roles exchange JSON-RPC 2.0 messages: a host (the AI application), one client per server connection inside the host, and servers that provide context and capabilities. (source)
  • Servers can offer resources (data for the user or model), prompts (templated messages) and tools (functions the model can call); clients can offer elicitation to collect input from the user. (source)
  • Since revision 2026-07-28 the protocol is stateless: there is no initialize handshake, every request carries its protocol version and client capabilities in _meta, and servers must answer server/discover. (source)
  • Two standard transports are defined: stdio for a client-launched subprocess and Streamable HTTP, where each message is a POST to one endpoint; the older HTTP+SSE transport is deprecated. (source)
  • When a server needs more input mid-request, it returns an input_required result listing what it needs (Multi Round-Trip Requests), replacing server-initiated requests. (source)
  • Authorization for HTTP transports is optional and based on OAuth 2.1, with MCP servers acting as resource servers; stdio implementations should not use it. (source)
  • Opt-in extensions, negotiated through capabilities, add features such as Tasks for long-running work and MCP Apps for interactive UI rendered in the host. (source)
  • Official SDKs exist for ten languages, graded by tier: TypeScript, Python, C#, Go, Rust and Ruby are Tier 1, Java is Tier 2, and Swift, PHP and Kotlin are Tier 3. (source)

Architecture and orchestration pattern

Pattern: Other

MCP is a client-server protocol. A host such as an IDE, a chat app or a coding agent (the architecture guide names Claude Code, Claude Desktop and VS Code) creates one MCP client per server it connects to. The spec splits into a data layer, which defines JSON-RPC 2.0 messages, capability discovery and the primitives (tools, resources, prompts, notifications), and a transport layer, which frames and delivers those messages over stdio or Streamable HTTP.

Revision 2026-07-28 made the protocol stateless. The initialize handshake, protocol-level sessions and the Mcp-Session-Id header are gone; each request carries its protocol version and client capabilities in _meta, and a server rejects versions it does not support. Servers that need cross-call state mint explicit handles and pass them as ordinary tool arguments. Server-to-client requests (elicitation, and the now-deprecated sampling and roots) happen only as interim input_required results the client answers by retrying, and change notifications flow over an opt-in subscriptions/listen stream.

There is no orchestration model in the protocol: MCP connects an agent to tools and context, and how agents coordinate is left to the host. Revisions are named by release date. The project is established as Model Context Protocol a Series of LF Projects, LLC, with Lead, Core and regular Maintainers, Specification Enhancement Proposals (SEPs) for changes, and a feature lifecycle policy that keeps deprecated features for at least twelve months.

Human in the loop

The specification puts people in control rather than defining an approval API. Hosts must get explicit user consent before exposing user data or invoking any tool, and the tools section says there should always be a human in the loop who can deny tool invocations, with applications showing which tools are exposed, marking invocations and offering confirmation prompts. Servers that need information from the user use elicitation: form mode for structured, schema-validated input, and URL mode for sensitive steps such as credentials that must not pass through the client; users can review and decline. The spec notes that it cannot enforce these principles at the protocol level, so enforcement depends on each host.

Protocols

MCP, A2A and AG-UI support for Model Context Protocol (MCP). See the full matrix.
ProtocolSupportNote
MCP Yes evidence
checked 2026-09-30
This is the MCP specification itself; the current revision is 2026-07-28.
A2A Unknown
checked 2026-09-30
The MCP docs index (llms.txt) and specification do not describe any relationship to A2A; code search in modelcontextprotocol/modelcontextprotocol found only unrelated matches (a URL hash, package-lock).
AG-UI Unknown
checked 2026-09-30
No defined bridge in the specification; the MCP Apps Working Group charter only lists interoperability with external protocols such as AG-UI and A2UI as in scope.

Best for

  • Exposing an internal API or data source once so that any MCP host (IDE, chat app or coding agent) can call it. (shortlist)
  • TypeScript services that want a Tier 1 SDK for building servers or clients. (shortlist)
  • JVM teams using the Java SDK (Tier 2) or the Kotlin SDK (Tier 3). (shortlist)
  • Giving one agent a consistent way to reach many tools across stdio and HTTP.

Not for

  • Peer-to-peer messaging between independent agents; the spec defines host, client and server roles for tools and context, not agent-to-agent tasks.
  • Code that depends on the initialize handshake, session IDs or server-initiated requests without migrating; revision 2026-07-28 removed them.
  • New designs built on Roots, Sampling or Logging, which are deprecated as of 2026-07-28.

Quickstart

pip install "mcp[cli]"

Install verified 2026-09-30 (uv venv, Python 3.12.13, macOS arm64: uv pip install mcp[cli] ok, from mcp.server import MCPServer ok, mcp 2.2.0. Packages came from the mirrors.aliyun.com mirror, so the version is the one that mirror served on this date. Install and import check only; not a functional test.). What this means

# server.py  (MCP Python SDK 2.x; FastMCP is now MCPServer)
from mcp.server import MCPServer

mcp = MCPServer("Notes")
NOTES: dict[str, str] = {}

@mcp.tool()
def save_note(title: str, body: str) -> str:
    """Store a note and return its title."""
    NOTES[title] = body
    return title

@mcp.resource("note://{title}")
def read_note(title: str) -> str:
    """Return a stored note, or 'not found'."""
    return NOTES.get(title, "not found")

# Serve over Streamable HTTP: uv run mcp run server.py --transport streamable-http
# Or open it in MCP Inspector:  uv run mcp dev server.py

Common pitfalls

  • The example uses the Python SDK (Python 3.10+). pip install mcp now installs the 2.x line; v1.x is maintained on the v1.x branch for critical fixes. Pin mcp>=1.28,<2 if you are not ready to migrate (see the python-sdk README).
  • In 2.x, FastMCP is renamed MCPServer (from mcp.server import MCPServer), McpError is MCPError, and the default server name changed; follow the migration guide.
  • The cli extra is needed for the mcp dev / mcp run / mcp install commands.
  • Revision 2026-07-28 is a breaking change for hand-written implementations: no initialize handshake or sessions, _meta on every request, server/discover, and input_required results instead of server-initiated requests.
  • SSE stream resumption was removed: if a Streamable HTTP response stream breaks, the client must re-issue the request with a new ID.

Official quickstart

Pros

  • Vendor-neutral governance: the project is a Series of LF Projects, LLC, and changes go through public SEPs. (source)
  • A feature lifecycle policy guarantees a deprecation window of at least twelve months before removal. (source)
  • Official SDKs cover ten languages, six of them at Tier 1. (source)
  • Stateless requests remove connection setup, and list results carry cache hints (ttlMs, cacheScope) for clients and intermediaries. (source)
  • Security principles (user consent, data privacy, tool safety) are written into the spec itself. (source)

Cons

  • Revision 2026-07-28 is a breaking change: the handshake, sessions, server-initiated requests and SSE resumability were removed. (source)
  • Roots, Sampling, Logging and Dynamic Client Registration are deprecated, so servers relying on them need migration plans. (source)
  • The Python SDK's 2.x line renamed core APIs (FastMCP to MCPServer), and unpinned installs now pull 2.x. (source)
  • The spec states that it cannot enforce its security principles at the protocol level; hosts must implement consent and safety. (source)
  • Licensing is mid-transition from MIT to Apache-2.0, with documentation under CC-BY-4.0 and some older contributions still MIT. (source)

Alternatives

FAQ

What is the current MCP specification version?

Revision 2026-07-28. MCP versions are YYYY-MM-DD strings marking the last backwards-incompatible change, and since this revision every request declares the protocol version it uses.

Who governs MCP?

The project is established as Model Context Protocol a Series of LF Projects, LLC. Technical decisions sit with Lead Maintainers, Core Maintainers and Maintainers, and changes are proposed as SEPs.

How does MCP relate to A2A and AG-UI?

The MCP specification defines no bridge to either. MCP covers how a host reaches tools, resources and prompts; the MCP Apps Working Group charter lists interoperability with AG-UI as in scope, but nothing is specified yet.

Which languages have official MCP SDKs?

TypeScript, Python, C#, Go, Rust and Ruby (Tier 1), Java (Tier 2), and Swift, PHP and Kotlin (Tier 3).

Is MCP still stateful?

No. Revision 2026-07-28 removed the initialize handshake and protocol-level sessions; servers that need state pass explicit handles as tool arguments.

Sources

Unknown fields: license: GitHub reports NOASSERTION, so the field is 'unknown'. The LICENSE file says the project is moving from the MIT License to Apache-2.0: new code and specification contributions are Apache-2.0, documentation (excluding specifications) is CC-BY-4.0, and contributions whose authors have not agreed to relicensing stay MIT. protocols.a2a: searched the MCP docs llms.txt, the specification and GitHub code search in modelcontextprotocol/modelcontextprotocol; no A2A relationship is described. protocols.agui: the only mention is the MCP Apps Working Group charter scope, which is not a defined bridge.

Something wrong or out of date, or do you maintain Model Context Protocol (MCP) and want this page removed? Report a correction or request removal.