Stateless MCP is mostly a story about deletion, not addition. The 2026-07-28 revision drops the session header and the handshake, which is why a round-robin load balancer can route tool calls without sticky sessions. The parts that still bite are the ones the spec leaves to you: replica keys, approval handles and signed agent cards.
Why stateless MCP fixes the load balancer problem
Stateless MCP is the 2026-07-28 revision of the Model Context Protocol that deletes the session header and the opening handshake, so every request stands on its own and any server instance can answer it. Under the older transport described in the workshop, a client ran a handshake, received a session ID, and every later request had to carry it. That session lived in one machine's memory.
The failure mode is easy to reproduce. A round-robin load balancer sends the second request to a container that never saw the handshake, and the request is rejected. The usual repairs were sticky sessions or a shared session store. Both add infrastructure to a tool call that should not need it.
The MCP changelog for 2026-07-28 is the primary record of what moved. Protocol version and client details travel in per-request metadata, and a new capability lookup lets a client check which versions a service speaks before committing.
Scale-to-zero platforms become a natural fit once no instance has to remember a caller. The trade-off is that any state a tool genuinely needs, such as a pending approval, has to be written somewhere durable instead of parked in process memory.
MCP method and name headers, and the mismatch rule
The Mcp-Method and Mcp-Name headers copy the operation and tool name out of the JSON body so gateways, load balancers and rate limiters can route without parsing it. That lets a security team throttle one expensive tool through a standard proxy rule at the edge.
One rule matters more than the convenience. If the header and the body disagree, the server must reject the request. Without that check, a gateway could approve one tool while the server executes another.
A gateway reading a single header reduces parsing cost per request. It does not remove the need for the server to validate the same field it was routed on.
What the Python SDK v2 changes for servers
The official MCP Python SDK v2 is built around this revision, and the workshop notes that what was previously exposed as FastMCP is now simply the MCP server surface. The same app still answers older clients, which means a server can migrate before its clients do.
List results should now carry a time to live and a cache scope. In the workshop example the server tells clients they may cache the tool list for five minutes, privately. Servers should also return tools in a stable order.
Stable order is not cosmetic. The tool list sits near the top of an agent's prompt, so a shuffled list can miss the model provider's prompt cache on every call.
Tracing also moved into the specification. W3C trace context, the same format OpenTelemetry uses, travels in request metadata, so an agent run can appear as one trace beside backend logs when both sides run the SDK.
Multi Round-Trip Requests versus server-minted handles
Multi Round-Trip Requests let a stateless server pause a call, return what input it needs, and end the exchange, so the client retries later with the answer instead of holding a stream open. Server-minted handles cover the other case: a wait too long for sealed request state to survive, redeemed once when the caller comes back.
Multi Round-Trip Requests replace the old pattern where a server asked a human for input and held an open stream while it waited. Instead the server returns a result saying input is required, lists what it needs, attaches opaque request state, and ends the call. The client gathers the answer and retries the original call with the responses and the same state.
That request state passes through the client, so the specification treats it as attacker-controlled. The server has to integrity-protect it and reject anything that fails the check. The SDK seals it with a key generated when the process starts, which creates a replica trap: run three instances behind a load balancer and the retry can land on one that cannot open the state. The fix is to give every replica the same keys through the SDK setting provided for it.
The sealed state also expires after 10 minutes by default, which bounds think time per round rather than a whole afternoon. A refund approval that waits four hours needs a different mechanism.
For long waits the spec recommends a server-minted handle. The workshop's example tool writes a pending approval to a database when a refund exceeds $500 and returns its ID. The call finishes. Hours later the manager approves, the agent calls again with that ID, and the server redeems it once. Any single-use guarantee has to be enforced on the server, because a token passing through a client cannot provide it alone.
| Mechanism | Who holds the state | Default lifetime | Fits |
|---|---|---|---|
| Multi Round-Trip Request | Sealed request state, passed through the client | 10 minutes | Short think time per round |
| Server-minted handle | ID stored server-side, returned to the caller | Not bounded by the 10-minute default | Waits of hours, single redemption |
- Replica trap: each instance mints its own key at process start, so a retry can hit an instance that cannot open the state. Give every replica the same keys through the SDK setting provided for it.
- Tampering: request state is attacker-controlled, so the server must integrity-protect it and reject anything that fails the check.
- Single use: a token passing through a client cannot enforce redemption alone; the server must enforce it.
WebMCP in a React component, with its status stated
WebMCP is a browser proposal that lets a page register tools on document.modelContext, giving a browser agent a function to call instead of a screenshot to interpret. It remains a draft Community Group report, and in Chrome it runs as an origin trial that began in version 149, so it is not on for every user yet. A React component can register one such tool today, provided the code treats the API as the draft it is.
An earlier draft put the registry on navigator.modelContext. It moved to the document because a tool belongs to a page, not to the whole browser.
A tool registration carries a name, a description, an input schema and an execute function. In a React component the workshop registers a ticket filter inside a useEffect hook. The execute function updates real filter state so the engineer watches the UI change, then returns matching rows from memory with no DOM scraping.
The hints deserve care. A read-only hint tells the agent a tool changes nothing, but the specification does not promise it skips a confirmation, so do not design around that. A consequential hint suits anything significant or hard to undo, such as issuing a refund.
| Hint | Says | What it does not guarantee |
|---|---|---|
| read-only | The tool changes nothing | That a confirmation is skipped |
| consequential | The action is significant or hard to undo | Any other change in agent behaviour |
Pass an AbortController signal when registering and abort it in the effect cleanup. Aborting unregisters the tool, which keeps a logged-out or navigated-away session from leaving tools behind, and it is what lets the effect run again without a duplicate-name rejection.
These tools run inside the page with the user's own login session. That avoids a separate OAuth flow for the agent, and it also means a tool can do anything the user can, so scope tools like an API. By default only your own origin sees them, and other origins must be listed explicitly.
A2A at the company boundary: agent cards and signatures
The A2A Protocol v1.0 governs how one agent works with another agent, where MCP governs how an agent uses tools. The distinction matters at a company boundary: a logistics partner will not expose warehouse systems, but it can expose its own claims agent.
The specification states that agents collaborate without access to each other's internal state, memory or tools. You see what an agent can do, not how it does it.
Discovery starts with an agent card published at a well-known address on the partner's own domain. It names the agent, the interfaces it speaks and its skills, and it can be signed with a JSON Web Signature over a canonical form of the JSON so the bytes verified are the bytes signed.
Signing is optional in the specification. The workshop's recommendation is to make it mandatory for partners: fetch the key, Stripe the signature, canonicalize the rest, verify, and only then let customer data leave the network. An unsigned card leaves the orchestrator unable to tell whether its destination was altered in transit.
Version 1.0 lists JSON-RPC, gRPC and HTTP with JSON among its bindings, so the transport choice follows the partner's stack rather than a single mandated option.
How the three layers divide work
The three layers answer different questions, and keeping them separate prevents most architecture mistakes. MCP connects an agent to tools inside your walls, WebMCP connects a browser agent to the page a user already has open, and A2A connects your agent to another organization's agent. Each layer has its own status and its own constraint to design around.
| Layer | Question it answers | Current status | Main constraint |
|---|---|---|---|
| Stateless MCP (2026-07-28) | How does my agent call internal tools? | Published revision | Shared request-state keys across replicas |
| WebMCP | How does a browser agent act on my page? | Draft Community Group report, Chrome origin trial from version 149 | Not enabled for all users |
| A2A v1.0 | How do two companies' agents cooperate? | Published v1.0 | Card signing optional in spec |
A Monday checklist follows from that table.
- Register browser tools tied to abort signals, mark read-only and consequential hints honestly, and ship a fallback until the origin trial reaches all users.
- Make the MCP server stateless, let the gateway route on method and name headers, return a cacheable tool list in stable order, and share request-state keys across replicas.
- Use round trips for questions answerable in minutes, server-minted handles for anything waiting on a person, and verified agent-card signatures before any cross-company handoff.
A load balancer test is the cheapest way to find what still depends on memory. Put the server behind round-robin routing and break the assumption deliberately.
FAQ
- Does stateless MCP remove the need for any session state? It removes the session header and handshake from the transport, so requests are self-contained. Tools that need state across calls still need durable storage, such as database records behind a server-minted handle.
- How long does Multi Round-Trip Request state last? The SDK seals request state that expires after 10 minutes by default in the workshop's configuration. That bounds a single round of think time, not an approval that waits hours, which should use a server-minted handle instead.
- Is WebMCP a finished standard? No. As of October 2026 it is a draft Community Group report, and in Chrome it runs as an origin trial that began in version 149. Treat it as an experiment with a fallback path.
- Is agent card signing required by A2A v1.0? Signing is optional in the specification. An orchestrator that sends customer data across a company boundary should make verified signatures a requirement for its partners.
- Can a tool call survive a load balancer without sticky sessions? Yes, once the server is stateless and every request carries its own protocol version and client metadata. The remaining failure point is sealed request state, which breaks across replicas unless the keys are shared.
Turning a workshop into written guidance
The thread running through all three layers is the same one: state that lives in one process is the thing that breaks when you add a second process. Stateless MCP removes the session, the browser tools unregister with their component, and the cross-company handoff trusts only a verified card. Anyone who has recorded a walkthrough like this already holds the hard part, which is the sequence of failure and repair that made each decision obvious.
If that knowledge sits inside a YouTube video, Skalablog transcribes it and produces an article draft you can review and edit before it goes anywhere. Paste the video URL at Skala Blog and the same worked example that needed a spoken explanation can reach readers who prefer to scan, link and check the specification themselves.
Fork this article
Start a new branch from the same video, shaped your way. You keep the credit; the original keeps the attribution.
A fork in another language is filed as a translation of this article, so the two pages point at each other. You can unlink it later from the editor.
0/240
You are creating
- Format
- For
- Language
- Source
- Your angle
You will be asked to sign in before it is generated.
Buy credits