Skip to content
MCP Goes Stateless July 28: What Agent Builders Need to Audit Now
TutorialsJuly 25, 20269 min read

MCP Goes Stateless July 28: What Agent Builders Need to Audit Now

MCP 2026-07-28 goes stateless, removing sessions and deprecating Roots, Sampling, Logging. Here's what breaks in your stack and how to migrate before Monday.

The MCP 2026-07-28 spec removes protocol-level sessions entirely -- the initialize handshake is gone, the Mcp-Session-Id header is gone, and three features (Roots, Sampling, Logging) are formally deprecated. Beta SDKs are live in Python (mcp 2.0.0b1), TypeScript (2.0.0-beta.1), Go, and C#. If you run stateful MCP servers in production, you have three days to audit your stack.

The MCP spec release candidate dropped this month and it is the most significant protocol revision since MCP launched. I have been tracking the spec discussion threads and beta SDK notes for two weeks. Here is what actually changes for builders running MCP in production -- and what to check before Monday.

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

The 2026-07-28 RC is the largest MCP revision since launch. Two SEPs remove sessions: SEP-2567 drops the Mcp-Session-Id header and protocol-level session tracking, and SEP-2575 drops the initialize/initialized handshake that previously negotiated protocol version, client info, and capabilities at connection start. Each request now carries protocol version and client info in _meta fields instead of a session header.

Three additional SEPs round out the release. SEP-2577 formally deprecates Roots, Sampling, and Logging with a minimum 12-month removal window. SEP-1865 (MCP Apps) lets servers declare sandboxed iframe UIs. The Tasks extension ships as an optional extension -- not core spec -- for async long-running work. OAuth 2.1 and OpenID Connect alignment tightens enterprise auth: MCP servers are now formally defined as OAuth 2.1 resource servers, and clients must validate the iss parameter per RFC 9207 to prevent mix-up attacks.

The full changelog is on the MCP blog. The RC is live now; stable v2 is targeted for July 27, with the final specification shipping July 28.

Community

Stop building alone.

Join the Skool community. Ask questions, share what you're building, and learn from other people actually shipping AI agents.

Join Skool →

What breaks in your current MCP setup?

If your MCP server uses the Mcp-Session-Id header to track state across requests, or relies on the initialize handshake to negotiate client capabilities, those code paths break under the new spec. Load balancer sticky routing and shared session stores still work for now but become unnecessary -- and you need to audit that infrastructure before you can safely remove it.

Three categories to check now:

Session routing at the load balancer. Any routing rule that pins a client to a specific MCP instance based on session ID needs to be replaced with round-robin load balancing after migration. In AWS ALB, remove target group stickiness. In nginx, remove ip_hash. In Azure App Service, disable ARR affinity (which is on by default). None of this can be removed until your server code is free of session-scoped state.

Initialize handshake handling in server code. Any code that explicitly handles the initialize/initialized message exchange is dead code under v2. Protocol version and capabilities move to _meta fields. The beta SDKs handle the transition automatically, but test that your handlers do not depend on handshake-phase state being set before they receive tool calls.

Active use of Roots, Sampling, or Logging primitives. These are deprecated, not removed -- the 12-month window means nothing breaks immediately. Starting the migration now avoids a harder cutoff when the removal deadline lands. All three have clear replacement paths.

What gets cheaper after migration?

The operational benefit from going stateless is structural: fewer moving parts, cheaper infrastructure, and standard horizontal scaling. A remote MCP server that needed sticky sessions and a shared session store can run behind a plain round-robin balancer after migration -- no shared state tier between instances, no session pinning at the gateway, no specialist routing configuration.

For teams on managed cloud infrastructure, this translates to concrete candidates for removal: Redis or Memcached instances kept alive purely for MCP session storage, custom gateway rules for session affinity, and the autoscaling blockers that came from session pinning (you could not spin up a new instance mid-session without forcing a client reconnect).

The Microsoft Azure App Service team published a breakdown on the Azure App Service blog -- specific ARR affinity config changes and what the stateless model means for serverless MCP deployments. The dollar savings depend on your setup: if MCP shares a Redis cluster with other services, the win is minimal. If you have a dedicated session store for MCP alone, the math is real.

Want this built for your business?

Venti Scale builds AI automation systems for businesses that want results without the learning curve. One operator, AI-powered, full marketing stack.

See What We Build

The 3 deprecated features and what replaces them

Roots, Sampling, and Logging are deprecated via SEP-2577 with the 2026-07-28 spec. All three remain functional for a minimum 12 months, so nothing breaks immediately -- but the migration paths are clear and each replacement is an improvement over what it replaces.

Roots declared scope at the session level -- which directories or resource boundaries the server was authorized to work within. The replacement: pass scope explicitly as tool parameters or resource URIs on each call. More verbose per-call, but the right shape for a stateless model where there is no session to attach scope to.

Sampling let the server ask the client to make a model call and return the result. In practice, client support was patchy -- not all MCP clients implemented sampling, making it unreliable in production. The replacement is calling your LLM provider directly from the server. For Claude-based workflows, that is a direct Anthropic API call from your MCP server code. The model call moves server-side, removing the dependency on client capability flags that made sampling fragile.

Logging gave servers a way to send log messages back through the MCP protocol. The replacements: stderr for stdio-based servers, OpenTelemetry for everything else. The 2026-07-28 spec now documents W3C Trace Context propagation -- traceparent, tracestate, and baggage -- flowing through _meta fields. That gives you distributed trace context across the full agent call chain. If you are already on OTel, this is a config update. If you are not, the migration is an upgrade.

How to migrate your MCP server before July 28

The beta SDKs are the fastest migration path. Python is mcp 2.0.0b1 on PyPI; TypeScript is 2.0.0-beta.1; Go and C# betas are also live. Stable v2 is targeted for July 27. The v2 server answers both the 2026-07-28 and 2025-11-25 specs from one endpoint -- your existing clients keep connecting without a coordinated cutover.

Seven-step audit checklist for a typical remote MCP server:

1. Update to the beta SDK: mcp 2.0.0b1 for Python, 2.0.0-beta.1 for TypeScript, set StreamableHTTPOptions.Stateless = true for Go. 2. Remove session-scoped state from your server handlers -- any state that survives between requests needs to move to an explicit persistence layer or be eliminated. 3. Document load balancer sticky session rules and plan their removal once the server is stateless. 4. Replace Roots with explicit tool parameters carrying scope inline. 5. Replace Sampling with direct LLM provider API calls from the server. 6. Swap MCP Logging for stderr (stdio) or OpenTelemetry spans (HTTP). 7. Validate OAuth 2.1: confirm iss parameter validation per RFC 9207 and that Dynamic Client Registration includes the required application_type declaration.

The mcpplaygroundonline.com migration guide walks through TypeScript-specific SDK changes. The official SDK beta announcement has Python and Go specifics. For backward compatibility during rollout: the v2 beta server handles the old initialize handshake automatically, giving you a clean transition window before forcing clients to upgrade.

MCP Apps and the Tasks extension: what they add

Two new capabilities ship alongside the stateless core: MCP Apps (SEP-1865) for server-rendered iframe UIs, and the Tasks extension for async long-running work. Neither breaks existing setups -- both are additive and opt-in. You can adopt them independently and on your own timeline, separate from the stateless migration work.

MCP Apps (SEP-1865) lets servers declare sandboxed iframe UIs. The rendered UI communicates back to the host over the same JSON-RPC base protocol used everywhere else in MCP. Every UI-initiated action goes through the same audit and consent path as a direct tool call -- not a separate channel that bypasses tool-call logging. In practice, this lets an MCP server expose configuration panels, forms, or dashboards without a separate web app or webhook endpoint.

The Tasks extension handles async long-running work. The flow: tools/call returns a task handle immediately, the client drives the lifecycle with tasks/get, tasks/update, and tasks/cancel. One notable removal: tasks/list is not in the extension because it cannot be scoped safely without protocol-level sessions. If your workflow needs to enumerate all in-flight tasks globally, track that in your own application layer.

FAQ

Is the MCP 2026-07-28 spec backward compatible with existing clients?

Yes. The v2 server answers both the 2026-07-28 spec and the legacy 2025-11-25 initialize handshake from a single endpoint. This dual-mode behavior is built into the beta SDKs by default. You can migrate your server to v2 without coordinating with every client simultaneously -- clients on the old spec keep connecting until they update.

What happens to my existing MCP servers after July 28?

Nothing breaks immediately. July 28 is the spec publication date, not an enforcement cutoff. The deprecation timeline for Roots, Sampling, and Logging is a minimum 12-month window from the spec version that deprecated them, per the formal Active to Deprecated to Removed lifecycle. Your servers keep working; the migration clock starts from July 28.

How do I find out if my setup uses sticky sessions?

Check your load balancer for session affinity rules. In AWS ALB, look for stickiness on your target group. In nginx, check for ip_hash or the sticky module. In Azure App Service, look for ARR affinity -- it is on by default. Any config existing purely for MCP session pinning can be removed after migrating to stateless.

What replaces MCP Sampling after it is removed?

Sampling is replaced by direct LLM provider calls from the server side. If you used Claude via sampling, call the Anthropic API directly from your server code and handle the response in your tool logic. This moves the model call from client-coordinated to server-initiated -- more reliable since sampling client support was inconsistent across MCP clients.

Want this built for your business?

Venti Scale builds AI automation systems for businesses that want results without the learning curve. One operator, AI-powered, full marketing stack.

See What We Build
AI Agents First

The daily signal from the frontier of AI agents.

Join builders, founders, and researchers getting the sharpest one-email read on what's actually shipping in AI — every morning.

No spam — unsubscribe anytime