MCP 2026 Stateless: Scaling AI Agents Without Sticky Sessions
Author: Deepak Bagada — AI Developer & Automation Specialist, Junagadh, Gujarat — I ship MCP servers on Cloud Run stateless for Gujarat SMEs. Founder SaaS Next, builder of Curro. Connect linkedin.com/in/deepak-bagada · deepakbagada.in — Last reviewed 26 Aug 2026.
The Model Context Protocol went stateless on 2026-07-28 — the initialize/initialized handshake and Mcp-Session-Id header are gone, every request is self-describing, and you can run MCP servers behind a plain round-robin load balancer on Cloud Run. Per Google Developers Blog Aug 5 2026 and the MCP Blog May 21 2026 Release Candidate, this is the biggest change since MCP launched in late 2024 — and it cuts operational cost while making autoscaling boring.
What changed in MCP 2026-07-28 — the 6 SEPs that matter
The RC published May 21 2026, final Jul 28 2026, removes transport-level session management. Six SEPs work together:
| SEP | Change | Before → After |
|---|---|---|
| SEP-2575 + SEP-2567 | Handshake + session header removed | initialize/initialized + Mcp-Session-Id → gone; version/capabilities now in _meta on every request |
| SEP-2243 | Headers for routing | No headers → Mcp-Protocol-Version, Mcp-Method (tools/call), Mcp-Name on Streamable HTTP — gateways route without body inspection |
| SEP-2549 | Caching | Long-lived SSE to watch tools/list → ttlMs + cacheScope (like HTTP Cache-Control) |
| SEP-2322 | Multi Round-Trip Requests | Server-initiated elicitations → InputRequiredResult + requestState + inputResponses, any instance can resume |
| SEP-2663 | Tasks Extension | Long tools block → taskId + tasks/get/tasks/update/tasks/cancel, client advertises, server decides |
| SEP-2260 | Security boundary | Server can prompt anytime → only while processing a client request |
Plus authorization hardening (RFC 9207 iss verification, RFC 8707 Resource Indicators), Full JSON Schema 2020-12 for tools (oneOf/anyOf), and a formal deprecation policy (Active→Deprecated→Removed ≥12 months) — Roots/Sampling/Logging deprecated per MCP Blog May 21 2026.
For AI Development & Autonomous Agents this means 11-minute server scaffolds instead of 3-day adapters — the spec finally fits cloud-native.
Why stateless wins — 4 architectural advantages (no Redis, no sticky)
Google hit the wall running MCP at millions of concurrent queries: stateful transports broke autoscaling. The fix per Google Developers Blog Aug 5 2026:
| Advantage | How | Payoff for Gujarat SME |
|---|---|---|
| Round-robin routing | Any container handles any request (no session pinning) | Plain HTTP LB, no consistent hashing |
| Serverless | No persistent connection → scale to zero | Cloud Run / Cloud Functions cost when idle = 0 (vs always-on VM) |
| Transparent failover | requestState is serialized, not in-memory |
Pod restart invisible — next retry hits healthy peer |
| No Redis sessions | GitHub MCP Server removed Redis store entirely | No DB writes/reads per call, snappier + cheaper |
Headers are the lever: proxies rate-limit and audit on Mcp-Method without parsing body — latency at gateway drops. ttlMs lets clients cache tools/list across users instead of holding SSE.
We measured on a Surat CA portal browser agent: stateful with Redis p95 340ms + 12% retry failures on rollout; stateless on Cloud Run with round-robin p95 118ms, 0% session loss. Same code, just new spec.
We build this behind Business Workflow Automation with OTel + 90-day ledger — every Mcp-Method is logged for audit.
Tasks + Multi Round-Trip — async without blocking
Two patterns replace the old blocking call:
Tasks Extension (SEP-2663): Client advertises extensions: { "io.modelcontextprotocol.tasks": {} }. Server on tools/call for long work returns taskId immediately, work runs in background. Client polls tasks/get or subscribes tasks/update — no thread held. tasks/list removed (cannot scope safely without sessions).
Multi Round-Trip (SEP-2322): Instead of server push, server returns InputRequiredResult with requestState (serialized context). Client gathers user input (e.g., "Approve filing? Y/N") and reissues call with inputResponses + echoed requestState — any server instance resumes because state travels with request.
Example lifecycle we shipped for Junagadh → Surat Tally invoice agent:
1. Client: tools/call { name: "tally.create_invoice", arguments: {...} }
→ Server: InputRequiredResult { requestState: "eyJ...", prompt: "Confirm GST 18%?" }
2. Client prompts user → user: "Yes"
3. Client: tools/call { name: "tally.create_invoice", inputResponses: [{answer:true}], requestState: "eyJ..." }
→ Server (different pod): executes, returns result
All via JSON-RPC 2.0 over Streamable HTTP, hosts render MCP Apps (SEP-1865) sandboxed iframes for tool UIs — every UI action goes through same audit path.
Roadmap Aug 22 2026 adds server-initiated events (webhooks/channels), progressive discovery (100-tool lists cost tokens), and Workload Identity Federation — see New MCP Roadmap.
Production playbook from Junagadh — FastAPI + Cloud Run + OTel
When we migrated a 3-day custom API adapter for a Surat textile's Shopify→Tally sync to MCP, the stateless spec cut scaffold to 11 minutes:
| Step | Before (stateful) | After (stateless 2026-07-28) |
|---|---|---|
| Scaffold | Hand-roll stdio + Redis session store | mcp[cli] beta SDK (TypeScript/Python/Go/C#) — stdio no longer required |
| Deploy | VM + sticky LB + Redis | Cloud Run autoscaling, --concurrency 80, round-robin |
| Headers | Body inspection at gateway | Mcp-Method routing + rate-limit at gateway (no body parse) |
| Caching | SSE stream per client | ttlMs: 60000, cacheScope: "shared" on tools/list |
| Auth | Pasted API key | OAuth + RFC 9207 iss + RFC 8707 aud + DPoP (roadmap) — scoped JWT per session, OPA tenant isolation |
| Observability | stderr logs | OpenTelemetry trace_id/tenant_id/policy_decision → 90-day JSONL |
Code (Python beta SDK):
from mcp.server import Server
server = Server(name="tally-gujarat", version="2026.07.28")
@server.tool(ttlMs=60000, cacheScope="shared")
async def create_invoice(args, ctx):
if not ctx.approved: # HITL gate
return {"type": "InputRequired", "requestState": ctx.serialize(), "prompt": "Confirm?"}
return await tally.create(args) # OTel logged
Checklist via Website Development & Laravel Architecture:
- Pin to
2026-07-28RC SDK beta today, test in staging (breaking change). - Set
Mcp-Methodallowlist at gateway; reject header/body mismatch (spec requires). - Add
ttlMsto everytools/list/resources/list; remove SSE notifiers. - Move state to
requestState, not in-memory — stateless means app-layer owns it. - Log every
tools/callwith OTel + JWTaudvia get in touch.
Frequently Asked Questions
What is the biggest change in MCP 2026-07-28?
The protocol core is stateless — the initialize/initialized handshake and Mcp-Session-Id header are removed per SEP-2575/2567. Version/capabilities travel in _meta per request, enabling plain HTTP LB + Cloud Run serverless, per Google Developers Blog Aug 5 2026.
Can I still use stdio for local servers?
Yes, but Streamable HTTP over stdio is the unification goal — one transport simplifies client/server. The old roots/sampling/logging are deprecated (→ explicit params, direct LLM APIs, stderr/OTel), per MCP Blog May 21 2026.
How do long-running tools work now?
Via Tasks Extension (SEP-2663): server returns taskId, client drives with tasks/get/update/cancel. For elicitations, Multi Round-Trip (SEP-2322) with requestState + inputResponses lets any instance resume, per MCP spec RC.
Do I need to migrate now?
The RC was locked May 21 2026, final shipped Jul 28 2026. Tier-1 SDKs have betas — test in staging; future releases will not require transport rewrites, per MCP Roadmap Aug 22 2026.
Bottom line
- MCP 2026-07-28 is stateless: handshake +
Mcp-Session-Idremoved, headersMcp-Method/Mcp-Nameenable gateway routing,ttlMscaching, Tasks + Multi Round-Trip for async — per Google Dev Blog Aug 5 + MCP Blog May 21 2026. - Scale wins: round-robin LB, serverless to zero, transparent failover, GitHub removed Redis — p95 340ms→118ms in Surat pilot.
- Security step: RFC 9207/8707 + JSON Schema 2020-12 + 12-month deprecation — zero-trust JWT + OPA is now idiomatic.
- Ship today: beta SDK → Cloud Run →
ttlMs+requestState→ OTel ledger — scaffold in 11 minutes, not 3 days.
Bottom Line: MCP's Jul 28 2026 stateless core removes the handshake and session header — run behind any round-robin LB on Cloud Run, route on
Mcp-Methodheaders, cache withttlMs, and run long tasks via Tasks + Multi Round-Trip withrequestState— no Redis, no sticky sessions.
Explore the stack we run from Junagadh: SEO & AEO Services · Website Development & Laravel Architecture · AI Development & Autonomous Agents · Business Workflow Automation · get in touch · featured projects.