Skip to content
Get 600 trial creditsGet 600 credits

What is MCP? The Model Context Protocol, from wire format to security

MCP is an open standard that connects AI apps to outside tools and data over JSON-RPC. Its 2026-07-28 version made it stateless. Here is how it works, end to end.

Share

Share on X (Twitter) (opens in a new tab)Share on LinkedIn (opens in a new tab)Share by email

Summarize with AI

Summarize in ChatGPT (opens in a new tab)Summarize in Claude (opens in a new tab)Summarize in Perplexity (opens in a new tab)

Get a short summary from ChatGPT, Claude or Perplexity.

Add as a preferred source

Add Aibuku as a preferred source on Google (opens in a new tab)

Pick Aibuku on Google to see more of our posts in Top Stories.

The Model Context Protocol (MCP) is an open standard for connecting AI applications to outside tools and data. A server describes what it offers: tools to call, resources to read, prompts to run. Any MCP client, such as ChatGPT, Claude, Gemini or an editor like VS Code, can then use it without custom glue code. The messages are JSON-RPC 2.0, sent over standard input and output for local servers, or over HTTP for remote ones.

This post covers the protocol as it stands in the current version, dated 2026-07-28: the parts, the wire format, what changed when MCP became stateless, authorization, extensions and the security model. Three related posts go deeper on MCP Apps, WebMCP and Skills.

Where it comes from, and who runs it

Anthropic released MCP as open source in November 2024, as “a new standard for connecting AI assistants to the systems where data lives”. Its design borrows from the Language Server Protocol, which lets one code editor work with many programming languages. The MCP specification.

In December 2025, Anthropic donated MCP to the Agentic AI Foundation, a fund under the Linux Foundation. Anthropic, Block and OpenAI co-founded it, with support from Google, Microsoft, AWS, Cloudflare and Bloomberg. The MCP team’s announcement. Changes go through public proposals called SEPs (Specification Enhancement Proposals), each with a number and a sponsor.

The specification is versioned by date. Each version changed something a builder has to know about. From each version’s changelog:

VersionWhat it added or changed
2024-11-05First release: tools, resources, prompts, stdio and HTTP with Server-Sent Events
2025-03-26OAuth 2.1 authorization; Streamable HTTP replaces HTTP+SSE; tool annotations such as read-only or destructive
2025-06-18Structured tool output; servers become OAuth resource servers; elicitation (asking the user for input); JSON-RPC batching removed
2025-11-25Icons; URL-mode elicitation; Client ID Metadata Documents; experimental tasks
2026-07-28Stateless core: no handshake, no sessions; server/discover; multi round-trip requests; tasks move to an extension

The MCP team calls 2026-07-28 “the largest revision of the protocol since its launch”. MCP turns two. It is the current version.

The parts

The specification names three roles:

  • Host: the AI application the person uses, such as Claude or ChatGPT.
  • Client: a connector inside the host. It holds one connection to one server.
  • Server: the program that offers capabilities. One host can talk to many servers at once.

Each client and its server talk by sending each other JSON-RPC messages, shown in the next section.

A server can offer three primitives:

  • Tools are functions the model may call, such as check_availability or create_order. The model decides when.
  • Resources are data the host can read by URI, such as file:///menu.json. The application decides when.
  • Prompts are templates the person picks, often shown as slash commands. The person decides when.

That split of control matters. A tool runs because a model chose it, so tools carry the risk, and most of the security rules below are about tools.

The host holds a client per server; a server offers three kinds of things

Each client holds one connection to one server. Who decides to use a thing differs: the model for tools, the app for resources, the person for prompts.

Source: MCP specification 2026-07-28.

The wire format

Every message is a JSON-RPC 2.0 request, response or notification. To find out what a server offers, a client calls tools/list. The answer from the tools chapter, shortened:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "resultType": "complete",
    "tools": [
      {
        "name": "get_weather",
        "title": "Weather Information Provider",
        "description": "Get current weather information for a location",
        "inputSchema": {
          "type": "object",
          "properties": {
            "location": { "type": "string", "description": "City name or zip code" }
          },
          "required": ["location"]
        }
      }
    ],
    "ttlMs": 300000,
    "cacheScope": "public"
  }
}

The description and inputSchema are what the model reads to decide whether and how to call the tool. In practice they are prompts. Since 2026-07-28, inputSchema and outputSchema may use any JSON Schema 2020-12 keyword, and list results carry ttlMs and cacheScope, so clients can cache them.

The call itself. Since 2026-07-28, every request carries its protocol version and the client’s details in _meta (more on that below):

{
  "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/clientInfo": { "name": "ExampleClient", "version": "1.0.0" },
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

The result holds content: text, images or links to resources. With structured output, it also holds structuredContent that matches the tool’s outputSchema. A tool that fails returns isError: true inside a normal result, so the model can read the error and try again. A JSON-RPC error is for protocol problems, such as an unknown tool.

A client lists the tools once, then calls the one the model picked

Every arrow is one JSON-RPC message. A dashed arrow is the answer to the request above it.

Source: MCP specification: tools.

Two transports

stdio is for local servers. The client starts the server as a subprocess and they exchange newline-delimited JSON-RPC on standard input and output. The server must write nothing else to stdout, and may log to stderr. The stdio transport.

Streamable HTTP is for remote servers. Each message is an HTTP POST to one endpoint. The server answers with either a single JSON object or a Server-Sent Events stream, for example when it sends progress before the result. Since 2026-07-28, every POST carries the method in an Mcp-Method header, and calls to tools/call, resources/read and prompts/get also carry the name in Mcp-Name, so gateways and load balancers can route and log without reading the body. The Streamable HTTP transport:

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

What “stateless” changed

Until 2025-11-25, every connection began with an initialize handshake. Client and server agreed on a version and capabilities, and a remote server handed out an Mcp-Session-Id header. That tied each client to one server instance, which made scaling behind a load balancer hard.

The 2026-07-28 version removed all of that. From its changelog:

  • No handshake. Each request carries its protocol version, client information and capabilities in _meta. A server that does not support the version returns UnsupportedProtocolVersionError.
  • No sessions. The Mcp-Session-Id header is gone. A server that needs state across calls mints its own handle and passes it as an ordinary tool argument.
  • server/discover. Servers must implement it. It returns supported versions, capabilities and server information in one cacheable call.
  • Multi round-trip requests. A server used to send its own requests to the client mid-call, for example to ask the user a question. Now it returns a result with resultType: "input_required" and the questions in inputRequests. The client asks the user, then retries the original call, such as tools/call, with inputResponses.
  • Subscriptions. One long-lived subscriptions/listen stream replaces the old GET endpoint and resources/subscribe / resources/unsubscribe for change notifications.
  • Deprecated: Roots, Sampling and Logging; the old HTTP+SSE transport; and Dynamic Client Registration. Deprecated features get a minimum twelve-month window before removal.

Here is a multi round-trip request from the spec. The server needs a login name before it can answer:

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "resultType": "input_required",
    "inputRequests": {
      "github_login": {
        "method": "elicitation/create",
        "params": {
          "mode": "form",
          "message": "Please provide your GitHub username",
          "requestedSchema": {
            "type": "object",
            "properties": { "name": { "type": "string" } },
            "required": ["name"]
          }
        }
      }
    },
    "requestState": "eyJsb2NhdGlvbiI6Ik5ldyBZb3JrIn0..."
  }
}

The requestState is opaque to the client: the server encodes whatever it needs to pick up where it left off. Any server instance can handle the retry. That is the point of the redesign.

A server that needs more answers with a question, and the client asks again

The server sends no request of its own. Everything it needs to pick up comes back in the retry, so any server instance can answer it.

Source: MCP 2026-07-28 changelog.

If you built against an earlier version, the migration is mostly mechanical: drop the handshake and sessions, add server/discover, add resultType to results, and replace server-initiated requests with input_required. A client that supports old and new stdio servers should send server/discover first. If the server answers with UnsupportedProtocolVersionError, it is a modern server that does not speak that version: pick another, and do not fall back. If it answers with some other error or not at all, it is a legacy server: fall back to initialize. Discovery · stdio.

Authorization

Authorization is optional. A local stdio server usually reads its credentials from the environment. A remote server that holds user data uses OAuth 2.1, and the rules are strict. From the authorization chapter:

  1. The MCP server is an OAuth resource server. It does not issue tokens; a separate authorization server does.
  2. The client finds the server’s Protected Resource Metadata (RFC 9728), whose authorization_servers field names the authorization server. The 401 response’s WWW-Authenticate header may point to it; if it does not, the client must try the well-known URIs. Authorization server discovery.
  3. The client runs the authorization code flow with PKCE, and must send the resource indicator (RFC 8707). The token is then bound to this one MCP server and cannot be replayed against another.
  4. Clients that are not pre-registered should use a Client ID Metadata Document: the client ID is a URL that serves the client’s metadata. Dynamic Client Registration is now deprecated in its favour.
  5. When the authorization response includes iss, clients must check it against the issuer they recorded.

From a 401 to a token that works on this one server

The MCP server does not issue tokens. The client trades a code for one at the authorization server, and the resource indicator binds it to this server.

Source: MCP specification: authorization.

The audience binding in step 3 closes a real hole. Without it, a malicious server could take the token a user granted it and use it against another service. The spec’s security best practices also forbid token passthrough, which it calls “explicitly forbidden”: a server must not accept a token minted for someone else and forward it upstream.

Extensions

Since 2026-07-28, client and server capabilities carry an extensions field. Optional features now live outside the core, each with its own ID and its own process:

  • MCP Apps (io.modelcontextprotocol/ui), Stable: interactive HTML interfaces inside the chat. MCP Apps.
  • Tasks (io.modelcontextprotocol/tasks), Beta, headed for the core: long-running work that the client polls.
  • Skills (io.modelcontextprotocol/skills), Beta: a server ships instructions for using its tools. Skills vs MCP.

Stages are from the extensions overview. The pattern is deliberate. The core stays small and stable, and hosts can adopt an extension when they are ready.

Who supports it

In December 2025, the MCP team counted “first-class client support across major AI platforms like ChatGPT, Claude, Cursor, Gemini, Microsoft Copilot, Visual Studio Code and many more”. The MCP team. By November 2026, its SDKs had passed 5 billion downloads, “more than 4.5 billion of those came in the past year alone”. MCP turns two.

Each large host now has a directory of remote servers:

  • Claude lists “over 950 MCP servers in the connectors directory”. Anthropic, July 2026.
  • ChatGPT replaced its App Directory with a Plugin Directory in July 2026. Plugins can package skills, apps and app templates. ChatGPT release notes.
  • Google opened its Connected Apps Platform in preview in October 2026, “a unified way for more app developers to bring their capabilities directly into Gemini and Search”. Google.

There is also an official MCP Registry, a public catalog and API of servers, launched in preview in September 2025 and still marked as a preview. Publishers submit their own entries, and moderation is community-driven, so treat it as a list of what exists, not a review of quality.

The security model

MCP lets a model take actions, and the model reads text that an attacker may control: a web page, an email, a tool result. So the spec puts a person in the loop. From the tools chapter: “there SHOULD always be a human in the loop with the ability to deny tool invocations.” Hosts should show which tools are exposed, show when one runs, and ask for confirmation.

Three points matter most when you build a server:

  • Annotations are hints, not facts. readOnlyHint or destructiveHint help a host decide when to ask. A host cannot verify them, and the spec says clients “MUST consider tool annotations to be untrusted unless they come from trusted servers.” The tools chapter · Tool annotations.
  • Expect prompt injection. OpenAI’s guidance for ChatGPT builders: “Assume prompt injection and malicious inputs will reach your server.” Validate every argument on the server, keep audit logs, and require confirmation for anything that cannot be undone. OpenAI.
  • Scope your tools. A tool that does one narrow thing is easier to confirm and harder to misuse than one that runs arbitrary queries.

In practice

If you build an MCP server today:

  1. Target 2026-07-28 and Streamable HTTP for anything remote. Stateless requests let you run it like any HTTP API behind a load balancer.
  2. Design tools for a model, not a person. Clear names, one job each, a description that says when to use it and when not to, and strict input schemas.
  3. Return structured output with an outputSchema, and readable text beside it for hosts that ignore it.
  4. Use OAuth properly if you hold user data: Protected Resource Metadata, PKCE, resource indicators, and no token passthrough.
  5. Mark tools honestly with annotations, and keep anything irreversible behind a confirmation.

Our own Aibuku app is a remote MCP server, a directory of businesses at https://mcp.aibuku.com/directory/mcp. A person can add it to Claude or ChatGPT by that address, ask for a business in their own words, and see its offers and free times. The Aibuku app.

Keep reading

  1. AI apps and agents

    MCP Apps: how interactive UI inside ChatGPT and Claude works

    MCP Apps is the official MCP extension for interactive screens inside an AI chat. A tool points to a ui:// HTML resource, and the host runs it in a sandboxed iframe.

  2. AI apps and agents

    What is WebMCP? Tools for AI agents, inside your web page

    WebMCP is a draft web standard that lets a page declare tools for a browser’s AI agent. Agents call them instead of clicking through the page. Chrome has it in an origin trial.

  3. AI apps and agents

    Skills vs MCP: Agent Skills, Skills over MCP, and when to use which

    MCP gives an agent access to systems. A skill teaches it how to do a task. Skills over MCP lets a server ship both, as MCP resources.

Your business could be the name AI says.

A customer asks AI: Who does the best bike repair in Amsterdam Oost?

An AI answer: The best bike repair in Amsterdam Oost is your business here.

Use them within 7 days. Card required. Your paid plan starts after that unless you cancel.