If your MCP server keeps anything in memory between calls, the 2026-07-28 revision of the spec makes that a design flaw. Move cross-call state into handles that a tool mints and the model passes back, serve old and new clients from one endpoint, and let the old session lane drain before you delete it. Nothing forces the move today, but the new stateless MCP design is what the 2026-07-28 spec now defines, and a server that still depends on Mcp-Session-Id will be the one that breaks when a client pins the new version. This post is the migration order we would follow, built from the spec text and the SDK migration guides rather than from a client project of ours.
What the 2026-07-28 spec actually removed
The spec dropped protocol-level sessions and moved state into each request. The release post on the MCP blog says MCP is “transforming from a bidirectional stateful protocol into a request/response stateless protocol.” The initialize handshake and the Mcp-Session-Id header are gone, and all four Tier 1 SDKs (TypeScript, Python, Go and C#) spoke the new revision on release day. The post puts their combined downloads at close to 500 million a month, so this is not a niche change. Each request now carries its protocol version and client capabilities in _meta, and the spec changelog lists the diff against the previous revision, 2025-11-25.
For a server author the practical list is short:
| Before (2025-11-25) | Now (2026-07-28) |
|---|---|
initialize handshake, then calls |
no handshake; version and capabilities ride in _meta on every request |
Mcp-Session-Id header ties calls together |
removed; a request can land on any instance |
| server asks the client questions mid-call (elicitation, sampling, roots) | the server returns input_required and the client retries with answers |
SSE resumability with Last-Event-ID |
removed; a dropped request is re-issued as a new one |
| gateway must parse the JSON body to route | Mcp-Method required on every POST, Mcp-Name on calls that name a tool, resource or prompt |
The second row is the one that changes your load balancer story. The release post says any request can now land on any server instance “behind a plain round-robin load balancer without needing shared storage.” Cloudflare’s write-up of the same release names the cost this removes: autoscaling had to preserve active sessions and deployments had to drain or migrate them.
Find every place your server remembers something
Before touching code, grep for what the session was holding. In a server written against the 2025 transport the usual suspects are four: a per-session object map (a basket, a cursor, an open file), a capability flag cached at initialize time, a lookup keyed on the session id, and anything that pushes a request to the client (elicitation, sampling, roots). Each one needs a different replacement, so list them first.
The spec is explicit about the first kind. The changelog says servers that need cross-call state use “explicit, server-minted handles passed as ordinary tool arguments”, and SEP-2567, the proposal behind it, uses a shopping basket as its example: create_basket() returns a basket_id, and the model threads it into add_item(basket_id, ...). The same SEP is careful to say this is not a protocol change, with no handles/* method and no handle type in the schema. It is a convention in your tool design.
Mint handles that carry their own state, or point at storage you own
Cross-call state becomes a handle your tool mints and the model returns. The release post says to mint an explicit handle from a tool and have the model pass it back as an argument, because the model can see the handle and thread it between tools. A handle is now part of your tool’s public contract, so it needs the properties any public identifier needs.
The trap: a handle is not a capability by itself. Anyone who can guess or replay one gets the state behind it, unless every use checks who is asking.
- Scope it. A handle minted for one user’s basket must fail for another user’s call. This is an authorization check on every use, not a property of the transport, and the MCP security post covers where that check belongs.
- Expire it. The session used to die with the connection. A handle lives until you say it does, so give it a time to live and a way to close it.
- Make the writes safe to retry. Without a session, a client that times out simply sends the request again, possibly to another instance. Every tool behind a handle should be an idempotent tool call, keyed on the handle plus a client-supplied operation id.
- Keep the state where every instance can reach it. That is either a database row the handle points at, or the state itself, signed.
The TypeScript SDK ships the second option for one case. Its migration guide describes requestState as an opaque string the server returns with inputRequired(...) and the client echoes back on the retry. It warns that this value “round-trips through the client and is therefore untrusted input” and offers createRequestStateCodec({ key, ttlSeconds?, bind? }) to sign it. The guide’s wording is “signed, not encrypted”, so anything secret still belongs in your database, not in the string.
Replace server-to-client questions with input_required
A tool that used to call elicitation mid-flight needs a rewrite, because servers no longer initiate requests. The release post describes the replacement as multi-round-trip requests: the server returns resultType: "input_required" with the questions it needs answered, and the client retries the original call with the answers attached in inputResponses.
This is also where tool approval flows land. A “confirm before sending” step is now two calls instead of one suspended call, which sounds worse and is better for you: nothing is held open on your side while a person decides, so a deploy in the middle of the wait costs nothing. The price is that your tool body must be written to run twice from the top, which is the idempotency rule from the last section again. If you run durable execution underneath, the approval can map onto a resumable step there, though nothing in the protocol asks for one.
Serve both eras from one endpoint while sessions drain
You do not have to flip clients in one move. The spec’s versioning page defines a dual-era server and states that “There is no negotiation handshake. Every request carries its protocol version, and the server accepts or rejects each request independently”. A dual-era server serves a request with per-request _meta statelessly, and an initialize request selects legacy behavior. A version the server does not speak is refused with UnsupportedProtocolVersionError, code -32022, which lists the versions it does. The compatibility matrix on the same page is the reason to bother: a modern client against a legacy-only server fails, and a legacy client against a modern-only server fails over HTTP with a 400 for the missing headers. Only a dual-era server works with both.
If your v1 server was already stateless (a fresh transport per request), the TypeScript SDK’s default createMcpHandler(factory) covers both eras from one factory. If it was sessionful, the guide shows the lane split, which is the shape of the whole migration.
The figure below shows the split, and the code after it is the SDK guide’s version of it.
const modern = createMcpHandler(factory, { legacy: 'reject' });
export default {
async fetch(request: Request) {
if (await isLegacyRequest(request)) return myExistingLegacyHandler(request);
return modern.fetch(request);
}
};
isLegacyRequest is true only for requests with no per-request _meta claim, so old clients keep hitting the code you have, and everything else goes to the strict stateless handler. Cloudflare’s migration guide lists what keeps a server on that legacy lane: protocol sessions, event replay, standalone GET streams, pushed elicitation, sampling or roots requests, and session deletion over HTTP DELETE. Its instruction for the end of the process is to remove the lane after clients migrate and existing sessions drain.
Watch the drain with a number, not a date: count requests per day on the legacy lane, and delete the lane when that count stays at zero for a full release cycle of your slowest client.
Teach your gateway the new headers
Streamable HTTP now requires Mcp-Method on every POST and Mcp-Name on tools/call, resources/read and prompts/get, per the transport spec. The same page says a request with missing or mismatched headers gets a 400 and a HeaderMismatch error, code -32020. An example request from the release post looks like this:
POST /mcp HTTP/1.1
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: search
Two things follow. A gateway, rate limiter or WAF can meter per tool without parsing the body, so a per-tool rate limit becomes a header rule. And a proxy that strips unknown headers will now break modern traffic, so check what your edge forwards before you ship, not after the first 400.
Roots, Sampling and Logging can wait
The deprecations do not need to ride along with this migration. The deprecated registry marks Roots, Sampling, Logging, Dynamic Client Registration and the legacy HTTP+SSE transport as deprecated, and the release post says Roots, Sampling and Logging keep working for at least twelve months. The registry’s earliest removal for the first four is the first revision released on or after 2027-07-28, and it states that no feature has been removed under the policy yet. HTTP+SSE has its own, shorter schedule in that registry (three months after SEP-2596 reaches Final), so move off it first. Treat the rest as a deadline for new work, not an emergency for old work: stop adopting those features, and plan their replacement when you next touch the code. The SDK team makes the same point about the release itself: nothing breaks on July 28, because that date only publishes the normative text.
The six-step migration order
Six steps cover the whole move, written as a plan and not as a report of one we ran:
- Inventory session state and server-initiated requests (the grep above).
- Put handle-based tools next to the old ones and make the writes idempotent.
- Move the server to the dual-era handler and route legacy traffic to the old lane.
- Add the two headers to gateway rules and dashboards.
- Rewrite each elicitation as an
input_requiredround trip. - Watch the legacy lane’s request count and delete it at zero.
For context, our own krs-mcp server runs over stdio and holds no session of its own, so it has no state to move. It is still a legacy-era server, though: its npm package depends on the 1.x TypeScript SDK, and per the versioning page a modern client against a legacy-only server fails. So it needs the dual-era step too, and a server with no state is the cheap case. The ones that kept a basket in memory pay more, once, and then scale like any other HTTP service. If you also expose MCP through an agent framework, the LangChain integration post covers the client side.
The takeaway
The spec removed the session, not your need for state. Put that state in handles you own, make every call safe to repeat, serve both eras from one endpoint, and delete the legacy lane when its traffic reaches zero.
Sources
- MCP blog: the 2026-07-28 release
- MCP blog: SDK betas for 2026-07-28
- MCP specification 2026-07-28: changelog
- MCP specification 2026-07-28: versioning
- MCP specification 2026-07-28: Streamable HTTP transport
- MCP specification 2026-07-28: deprecated features
- SEP-2567: Sessionless MCP via explicit state handles
- MCP TypeScript SDK: migration support for 2026-07-28
- Cloudflare: The next generation of MCP
- Cloudflare: migrate to MCP SDK v2
- krs-mcp on npm