Section650

Writing

TopicAI
Reading8 min

What Is MCP? How the Model Context Protocol Works and What Its New Spec Changed

The Model Context Protocol is an open standard that lets AI applications connect to tools and data through MCP servers. How it works, when it’s worth using, what the stateless new spec revision changed, and how to run servers safely.

By Ka Lun Chan · AI / Architecture

What is MCP?

The Model Context Protocol (MCP) is an open standard for connecting AI applications to external tools and data. An application such as Claude, an IDE or your own agent connects to MCP servers, and each server offers tools to call, resources to read and prompts to reuse. The current revision, dated 2026-07-28 and often called “MCP 2.0”, made the protocol stateless, so servers scale like ordinary web services.

Anthropic introduced MCP in November 2024. In December 2025 it donated the protocol to the Agentic AI Foundation, a fund under the Linux Foundation that Anthropic co-founded with Block and OpenAI. It’s now a shared standard, with governance outside any one vendor.

Three things are worth understanding before you build on it:

  1. How the pieces fit: hosts, clients, servers, and the three kinds of thing a server can offer.
  2. What the 2026-07-28 revision changed, which matters most if you run servers over HTTP.
  3. How to run servers safely, because an MCP server is code that acts with someone’s permissions.

I’ve written a hands-on example before, connecting Strava to Claude with MCP. This post is the background behind it.

How does MCP work?

An AI application, the host, runs one MCP client per server it connects to. Clients and servers exchange JSON-RPC 2.0 messages over either standard input and output for local servers or Streamable HTTP for remote ones. Servers offer tools, resources and prompts.

The architecture overview defines three roles:

  • Host: the AI application that coordinates everything, such as Claude Desktop, Claude Code or an IDE.
  • Client: a component inside the host that holds the connection to one server.
  • Server: a program that provides context. It can run on your machine, like a file system server, or remotely, like a hosted GitHub or database server.

A server can offer three kinds of thing. Tools are actions the model can call, such as creating an issue or running a query. Resources are data the application can read, such as a file or a record. Prompts are reusable templates a user can pick. In the other direction, a server can use elicitation to ask the user for missing information partway through a request.

The protocol only covers that exchange. Which tools the model is allowed to call, how it decides, and what the user approves are all up to the host. That’s why the design of the tools themselves still matters as much as the protocol.

When is MCP worth using?

When the same integration should work in more than one AI application, or when someone has already published an MCP server for the system you need. For one application calling one API, ordinary tool use is simpler.

Every major model API lets you define tools directly in your application code. If you’re building one product that calls your own backend, that’s fewer moving parts: no separate server, no transport and no second deployment. I’d start there.

MCP earns its place in three situations:

  • You want the same tools available in Claude, an IDE and your own agent without writing three integrations.
  • A vendor already publishes an MCP server for the system, so connecting it is configuration work instead of new code.
  • Different teams own the tools and the agents, and a protocol boundary between them is cleaner than shared code.

What changed in the 2026-07-28 MCP specification?

The protocol core became stateless. With the initialize handshake and the Mcp-Session-Id header gone, every request now carries its own version and capabilities. This revision also added multi round-trip requests, routing headers, cacheable list results, stricter authorization and an extensions framework.

The maintainers’ announcement describes MCP moving from a bidirectional, stateful protocol to a stateless request and response one. The specification was locked as a release candidate on 21 May 2026 and published on 28 July. MCP names each revision by date, so there’s no official “MCP 2.0”. The nickname comes from the SDKs, several of which moved to version 2.0 to implement it.

Fig. 752-1 What the 2026-07-28 revision changed, from the official changelog
AreaBefore (2025-11-25)After (2026-07-28)What it means in practice
Starting a conversationAn initialize handshake set the version and capabilities onceEach request carries its version and capabilities; servers must answer server/discoverAny server instance can answer any request
SessionsAn Mcp-Session-Id header tied a client to one server instanceRemoved. Anything stateful uses an explicit handle the server managesNo sticky sessions behind a load balancer
Asking the user mid-requestThe server sent its own request back to the clientMulti round-trip requests: the result says input_required and the client calls again with answersPlain request and response, easier to retry and proxy
RoutingGateways parsed the JSON body to see the methodMcp-Method and Mcp-Name headersRouting, rate limits and logs work from headers
ListsFetched again every timetools/list and similar results carry a time-to-live and cache scopeClients and gateways can cache them
Optional featuresBuilt into the core specA formal extensions framework, with Tasks moved into oneThe core stays small; extras are opt-in
Deprecatedn/aRoots, sampling, logging, HTTP+SSE and Dynamic Client RegistrationStill work for at least twelve months

The operational difference is the reason for the change. Under the old design, every request in a session had to reach the server instance that held that session, so scaling meant sticky sessions and shared session storage. Now any instance can answer any request. Cloudflare’s write-up says MCP servers can run in a single Worker with no stateful infrastructure, and gateways can route on headers without parsing JSON bodies.

Multi round-trip requests replace the awkward case where a server needed to ask the client something mid-request. The server now returns a result marked as needing input, and the client sends the request again with the answers, which proxies and retries handle without special treatment.

Do you need to migrate existing MCP servers?

Eventually, and the SDKs do most of it. Deprecated features keep working for at least twelve months. The real work is in servers that kept per-session state or relied on sampling, roots or the old HTTP+SSE transport.

The four Tier 1 SDKs, TypeScript, Python, Go and C#, support the new revision. Microsoft says the C# SDK v2.0 is backward compatible apart from the redesigned Tasks extension, and its HTTP transport now defaults to stateless. The Python mcp package released 2.0.0 the same day as the spec.

What I’d check in an existing server:

  1. Session state. Anything kept in memory per session, such as a selected project or a draft in progress, needs a proper home: a database or cache keyed by an explicit handle, with an expiry and a check that the caller owns it.
  2. Deprecated features. Find uses of sampling, roots and logging, and plan replacements within the twelve-month window.
  3. Transport. Move remote servers from HTTP+SSE to Streamable HTTP.
  4. Authorization. Prefer Client ID Metadata Documents over Dynamic Client Registration, and validate the issuer on responses.
  5. Infrastructure. Once the server is stateless, drop sticky sessions and scale it like any other HTTP service.

The first item is where a database decision hides. Session state that used to vanish when a process restarted now outlives it, so it needs the same care as any other user data: who can read it, how long it lives, and what happens when two requests update it at once.

How do you run MCP servers safely?

Treat every MCP server as code acting with someone’s permissions. Use OAuth 2.1 for remote servers, give tokens the narrowest scope that works, never pass a user’s token through to another service, and run local servers with as little access as possible.

The specification’s security best practices name the risks to design against:

  • Confused deputy: a server uses its own broad credentials on behalf of a user who shouldn’t have that access.
  • Token passthrough: a server forwards the token it received to a downstream API instead of getting its own.
  • Server-side request forgery: a server fetches URLs it was handed, including internal ones.
  • State handle hijacking: someone reuses another user’s handle to stateful data, which replaces the old session hijacking concern.
  • Local server compromise: a server on your machine runs with your user’s access to files and credentials.
  • Scope minimization: asking for no more permission than the task needs.

For remote servers, the authorization spec requires OAuth 2.1, protected resource metadata (RFC 9728) on the server, and resource indicators (RFC 8707) from the client, so a token is issued for one specific server. Local servers over standard input and output don’t use that flow. They usually read credentials from the environment, which makes it more important to know exactly what you installed.

The host matters too. Claude Code’s sandbox, for example, doesn’t cover MCP servers, as I noted in harness engineering. Before adding a server, read what it can do, check who publishes it, and treat what its tools return as untrusted input to the model.

Sources

Checked in November against the 2026-07-28 specification, its changelog, architecture, security and authorization pages, the MCP blog, Microsoft, Cloudflare, Anthropic and PyPI. The comparison table summarises the official changelog. The advice on when to use MCP and how to migrate is mine.

Short answers

What is MCP?

The Model Context Protocol (MCP) is an open standard for connecting AI applications to external tools and data. An AI application such as Claude acts as the host, and MCP servers expose tools, resources and prompts to it over JSON-RPC 2.0. Anthropic introduced it in November 2024 and donated it to the Agentic AI Foundation under the Linux Foundation in December 2025.

Is there an MCP 2.0?

Not officially. MCP versions are named by date, and “MCP 2.0” is an informal name for the 2026-07-28 specification. Several official SDKs moved to version 2.0 to implement it, including the C# SDK and the Python mcp package.

What changed in the 2026-07-28 MCP specification?

The protocol core became stateless. The initialize handshake and the Mcp-Session-Id header were removed, so each request carries its own version and capabilities. The revision also added multi round-trip requests, routing headers, cacheable list results, stricter authorization and a formal extensions framework, and deprecated roots, sampling, logging and the old HTTP+SSE transport.

Do I need MCP instead of normal function calling?

Not always. If one application calls one API, ordinary tool use or function calling is simpler. MCP pays off when the same integration should work across several AI applications, or when you want to use tools other people have already published as MCP servers.

Before you add the next server

Ask what it can reach with your credentials, and whether a plain tool definition in your own code would do the job. MCP is worth the extra moving parts when the integration has to work in more than one place.

Tell me what you’re building