Model Context Protocol, Explained for Backend Engineers The Model Context Protocol's 2026-07-28 specification revision, finalized on July 28, 2026, removes the `initialize` handshake and the `Mcp-Session-Id` header so every request stands alone, letting any server instance serve any request without sticky sessions or a shared session store. Servers must now implement `server/discover`, return `400` with error `-32020` (`HeaderMismatch`) when `Mcp-Method` and `Mcp-Name` headers do not match the body, and use Multi Round-Trip Requests returning `input_required` for server-initiated asks, while HTTP+SSE is formally marked Deprecated. The article's author reports GitHub removed its Redis-backed protocol sessions after adopting the new spec, and publishes a standard-library Python 3.13 demo, `stateless_mcp_demo.py`, with 19 checks covering discovery, headers, version errors, auth, Origin validation, and retries. MCP is how AI agents call your services. In July 2026 it dropped protocol-level sessions, which changes how you scale, authenticate, and migrate an MCP server. It also leaves one problem untouched: the model is the attack surface. What MCP is MCP is an open protocol, introduced by Anthropic in 2024, that lets an AI application discover and call tools and data in other systems through one standard interface. Without it, every model needs its own integration with every system. Three roles: - Host: the AI app the user works in, such as an IDE or chat client. - Client: a connector inside the host. Each client holds one connection to one server. - Server: your service, exposing capabilities over JSON-RPC 2.0. A server offers three primitives, and the difference is who is in control: | Primitive | What it is | Who decides when it's used | |---|---|---| | Prompts | Reusable templates | The user | | Resources | Read-only context | The host application | | Tools | Functions that act | The model | Tools are the risky one. The model chooses when to call them, so a bad call can modify the wrong record or hit the wrong system. The 2026 change: MCP went stateless The 2026-07-28 spec revision, finalized on July 28, 2026, removes the initialize handshake and the Mcp-Session-Id header. Each request now stands alone. | | Before up to 2025-11-25 | After 2026-07-28 | |---|---|---| | Startup | initialize / initialized handshake | None | | Client context | Exchanged once at startup | Sent in every request's meta | | Routing | Sticky sessions or a shared session store | Any instance can serve any request | | Capability discovery | Returned by initialize | server/discover , which servers must implement | | List results | Could vary per connection | No longer vary; carry ttlMs and cacheScope cache hints | | Change notifications | HTTP GET stream, resources/subscribe | subscriptions/listen : one long-lived POST response stream, opt-in by notification type | | Broken stream | Resume with Last-Event-ID | Not resumable; the client re-issues the request with a new request ID | | Server-initiated asks e.g. elicitation | Requests sent to the client | Multi Round-Trip Requests: the server returns input required , the client retries with the answers | | Remote transport | HTTP+SSE superseded by Streamable HTTP in 2025-03-26 | HTTP+SSE formally marked Deprecated | GitHub reportedly removed its Redis-backed protocol sessions when it adopted the new spec. What a request looks like now Every HTTP request is a self-contained POST. The headers mirror body fields so gateways and load balancers can route without parsing JSON: POST /mcp HTTP/1.1 Authorization: Bearer