How the Model Context Protocol fits together

This is an independent reference page. It is not affiliated with the Model Context Protocol project or any AI company.
It describes specification revision 2026-07-28, the revision marked current. Facts checked November 2026.

The Model Context Protocol (MCP) is a JSON-RPC protocol that lets an AI application reach external tools and data through a uniform interface. The authoritative text is the specification, and the machine-readable source of truth is the TypeScript schema in the specification repository.

Three roles

The architecture is client, host, server.

A host is the application the person actually uses. It creates and manages clients, enforces security policy and consent, and coordinates the language model. A client lives inside the host and has a one-to-one relationship with exactly one server. A server exposes tools, resources and prompts, and may be a local process or a remote service.

The isolation is deliberate. A server is not supposed to be able to read the whole conversation or see into other servers. The host does the aggregation.

The wire format

Every message is JSON-RPC 2.0, encoded as UTF-8. Requests go from client to server. A request id is a string or an integer, never null, and unique among requests in flight. Notifications carry no id and get no reply. Servers do not initiate JSON-RPC requests in this revision.

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "get_weather",
    "arguments": { "location": "New York" },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Every result carries a resultType, either "complete" or "input_required":

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "resultType": "complete",
    "content": [{ "type": "text", "text": "72F, partly cloudy" }],
    "isError": false
  }
}

No handshake: metadata rides on every request

Readers who learned MCP from earlier revisions will look for initialize. It is gone. Revisions up to 2025-11-25 opened a connection with an initialize request, a reply, and a notifications/initialized notification, and negotiated version and capabilities once. The 2026-07-28 changelog removes that handshake, along with protocol-level sessions, the Mcp-Session-Id header and ping.

The base protocol is now stateless. Each request declares what it needs in _meta:

KeyStatus
io.modelcontextprotocol/protocolVersionrequired
io.modelcontextprotocol/clientCapabilitiesrequired
io.modelcontextprotocol/clientInforecommended
io.modelcontextprotocol/logLeveloptional

A server must not rely on anything it learned from an earlier request on the same connection. State that spans requests has to be named by an explicit identifier that the client passes each time. A stdio process is not a session.

Capability discovery moved to server/discover, which every server must implement and which a client may call first. Its request has only _meta. The result lists what the server supports:

{
  "jsonrpc": "2.0",
  "id": "discover-1",
  "result": {
    "resultType": "complete",
    "supportedVersions": ["2026-07-28"],
    "capabilities": { "tools": {}, "resources": {} },
    "instructions": "This server provides weather and resource utilities.",
    "ttlMs": 3600000,
    "cacheScope": "public"
  }
}

If a request names a version the server does not speak, the server answers with error code -32022 and a data object holding supported and requested. The client picks from supported and retries. A request that needs a client capability the client did not declare fails with -32021.

What a server offers

Three primitives, distinguished by who decides to use them (server features):

PrimitiveControlled byMethods
Toolsthe modeltools/list, tools/call
Resourcesthe applicationresources/list, resources/read, resources/templates/list
Promptsthe userprompts/list, prompts/get

A tool has a name, a description, an inputSchema and optionally an outputSchema and annotations. Schemas default to JSON Schema 2020-12. A call returns a content array (text, image, audio, resource link or embedded resource) and may return structuredContent. There are two kinds of failure: a protocol error such as an unknown tool (JSON-RPC code -32602), and a tool that ran and failed, reported inside a normal result with isError: true so the model can see it.

List methods paginate with an opaque cursor and nextCursor. List results and resources/read results carry ttlMs and cacheScope ("public" or "private") so clients know how long to cache.

What a client offers, and how a server asks for it

Since servers no longer send requests, a server that needs something from the client answers with an InputRequiredResult. This is the multi round-trip request pattern, allowed only on tools/call, resources/read and prompts/get. The result holds inputRequests, a map of server-chosen keys to embedded requests, and optionally an opaque requestState string. The client gathers answers and sends the original request again under a new id, adding inputResponses and echoing requestState unchanged.

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "get_weather",
    "arguments": { "location": "New York" },
    "inputResponses": {
      "github_login": { "action": "accept", "content": { "name": "octocat" } }
    },
    "requestState": "eyJsb2NhdGlvbiI6Ik5ldyBZb3JrIn0..."
  }
}

Three kinds of request can be embedded:

Sampling and roots, together with protocol logging, are deprecated as of 2026-07-28. They still work. The earliest they can be removed is the first revision published on or after 2027-07-28.

Change notifications

A client that wants to hear about changes opens one long-lived request, subscriptions/listen, with a filter: toolsListChanged, promptsListChanged, resourcesListChanged, and resourceSubscriptions (a list of URIs). The server first sends notifications/subscriptions/acknowledged, then only the notification types that were asked for, such as notifications/tools/list_changed or notifications/resources/updated. This replaces the earlier resources/subscribe and resources/unsubscribe methods.

Transports

Two are standard (transports). Custom ones are permitted.

stdio. The client launches the server as a subprocess and exchanges newline-delimited JSON-RPC over stdin and stdout. A message must not contain an embedded newline. The server must write nothing but MCP messages to stdout and may log to stderr. To stop the server the client closes stdin, waits, then terminates the process.

Streamable HTTP. The server exposes one endpoint that accepts POST. Each JSON-RPC message is its own POST. The server replies with either application/json or a text/event-stream scoped to that one request. A notification that is accepted gets 202 Accepted. Routing information is repeated in headers so intermediaries need not parse the body:

POST /mcp HTTP/1.1
Host: example.com
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: get_weather

If MCP-Protocol-Version disagrees with the body, the server returns HTTP 400 with error -32020. Servers must validate the Origin header to block DNS rebinding and should bind to localhost when running locally. Closing the response stream cancels the request.

HTTP+SSE, the original remote transport from revision 2024-11-05, was replaced by Streamable HTTP in 2025-03-26 and has been deprecated since. The GET stream, Last-Event-ID resumption and HTTP DELETE session termination that Streamable HTTP itself had through 2025-11-25 are also absent from this revision.

Versions are dates

A revision identifier is the YYYY-MM-DD date of the last backwards-incompatible change. Compatible changes do not bump it (versioning). Published revisions so far: 2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25, 2026-07-28.

The specification calls 2026-07-28 and later "modern" and 2025-11-25 and earlier "legacy". The two meet like this: a server that supports both treats a request carrying modern _meta as stateless and treats an initialize request as the start of a legacy connection. A client that supports both probes with server/discover. A discover result, or a recognised modern error, means modern. Any other error, or a timeout on stdio, means legacy, and the client falls back to initialize.

Optional additions are negotiated as named extensions through an extensions field in capabilities. Tasks, for example, moved out of the core into the io.modelcontextprotocol/tasks extension in this revision.