Stateless MCP does not make your agent stateless

Imagine an agent that prepares a production change, pauses for approval, and resumes after the person reviewing it has closed their laptop. The MCP server involved in that workflow may be stateless. The workflow cannot be.

Something still has to remember which change was proposed, what the reviewer saw, whether the approval applies to this exact version, and what should happen after a reconnect. None of that needs to live in a sticky server session. None of it disappears when the session does.

This is where the word "stateless" causes trouble. It sounds like a property of the whole system when it usually describes one boundary inside the system. The 2026-07-28 MCP specification makes that boundary easier to narrow: it moves away from a mandatory initialize-and-session shape while adding explicit support for capabilities such as multi-round-trip work and cacheable discovery results. Implementations can depend less on an implicit conversation with one server instance.

That can make an MCP service easier to route and scale. It also makes a previously avoidable question unavoidable: if the server no longer owns the session, who owns the work?

A session was hiding several different lifetimes

A session object is convenient because it can hold almost anything. Negotiated capabilities go in there. So does routing context, progress on a long-running operation, an authorization decision, and whatever else the first version of the service needs to remember.

The code stays simple for a while. Every request returns to the same logical session, and the session becomes the answer to every state question. The cost appears later. Requests may need sticky routing. A failed server instance can take unfinished work with it. Expiration becomes a single blunt setting even though different records have different useful lifetimes.

Removing that session object does not solve those design problems by itself. It exposes them.

I find it useful to separate the hidden state by how long it must live and what would go wrong if it were lost. These are architectural categories, not terms defined by MCP.

Request and connection coordination

Some state only helps one request reach the right code with the right context. Request identifiers, negotiated protocol details, logging fields, and similar coordination data may be carried with a request or derived again. Once the request is complete, much of it can expire.

This is the state most people mean when they call a service stateless. Any suitable instance can handle the next request because correctness does not depend on private memory left inside the previous instance.

Even here, "stateless" does not mean "context-free." A request can contain headers, credentials, identifiers, and capability information. The useful claim is narrower: the service does not require a hidden server-side conversation to interpret the next request.

Work that must survive a reconnect

Long-running agent work has a different lifetime. A task may pause, retry, wait for another system, or return control to a user before it finishes. Resuming it correctly may require a task identifier, the accepted inputs, current status, partial output, and enough version information to reject a stale continuation.

That record can live in a task service, a database, an event log, or another durable component. The right owner depends on the system. What matters is that the owner is named. If the only copy lives in one process or in the model's current context window, a routable transport has merely made the loss harder to notice.

The new MCP shape is helpful here because multi-round-trip work no longer has to be confused with a permanent connection to one server instance. A protocol can support work that continues across requests while the application gives that work a durable home.

Human decisions and authority

Approval state deserves separate treatment from task progress. "Waiting" is a task status. "Hefty approved revision 17 for deployment before 18:00" is a record of authority.

The difference matters when the underlying proposal changes. A generic approved: true flag attached to a long-lived session is easy to reuse accidentally. A reviewable decision should identify what was shown, what action was permitted, who made the decision, and whether the permission has expired or been revoked.

Audit evidence may need to outlive both the request and the task. It also has different mutation rules. A worker can update its progress, but it should not quietly rewrite the evidence that granted it permission to continue.

Collapsing these records into "agent memory" makes ownership vague. Model context can help the agent reason about prior events, but it should not become the only record of an approval or the authoritative status of a resumable task.

GitHub's migration is a useful concrete example

GitHub's MCP Server update for the next specification removed Redis-backed sessions. The implementation now uses request headers for context needed by logging and secret scanning.

It would be tempting to summarize that change as "GitHub removed state." That is too broad. The specific result is that this server no longer needs Redis to preserve its former session shape. Some context travels with each request instead.

That is a meaningful operational change. A request carrying its own relevant context can be handled without locating the Redis session associated with an earlier connection. The server has less implicit coordination to recover and less reason to route a client back to the same session owner.

The example does not prove that every MCP server can delete its state store. It does not tell another product where pending jobs, approvals, credentials, or audit records should live. Those concerns depend on what that product does.

This is why implementation stories are more useful when they name the state that moved. "We removed Redis-backed sessions and now carry these fields in request headers" is an inspectable claim. "We became stateless" leaves readers to guess whether the word applies to transport coordination, task progress, or the whole agent system.

The active mcp-use release trail points to the same practical phase of the transition: implementers are rebuilding around the new protocol shape rather than discussing statelessness only as a specification ideal. Project release notes show implementation activity, not broad adoption or measured reliability, but they make the migration question immediate for builders.

Cleaner routing does not choose a durable owner

A stateless service boundary can remove sticky routing and make horizontal scaling less awkward. If any healthy instance can process the next request, replacing an instance becomes a routing event instead of a session-recovery event.

That benefit is real, but it stops at the service boundary. A resumable workflow still needs a durable owner somewhere. Moving task state into a dedicated store may improve failure recovery, or it may create a new consistency problem. Passing context in headers may remove a lookup, or it may expose fields that now need careful validation. Cacheable discovery results may reduce repeated coordination, but somebody still has to define when those results become stale.

The protocol does not choose these policies for the application. That is not a flaw. It is the point of making the boundary explicit. The mistake is treating a cleaner boundary as evidence that the surrounding responsibilities were handled automatically.

There is also a security consequence to state placement, although this is not an MCP security checklist. Once ownership is explicit, mutation rights can be explicit too. A task worker may advance progress. An authorization component may issue or revoke permission. An audit store may accept append-only evidence. Those roles are harder to distinguish when every fact is an untyped field in one session object.

Treat the migration as an ownership review

Changing to a stateless MCP service should involve more than deleting session middleware. Before removing the old store, inventory what the session contained and classify each field by behavior rather than by name.

For each piece of state, write down:

  • its old owner and intended lifetime;
  • whether the new design eliminates it, recomputes it, carries it with each request, or moves it to a durable owner;
  • which component can create or mutate it;
  • how it expires or is revoked;
  • what a new server instance needs in order to resume safely;
  • what evidence must remain after the work finishes or fails.

This review tends to uncover ambiguous fields. A user_id might only label logs, or it might select credentials and determine authority. A task_id might be a tracing convenience, or it might be the key to durable progress. A cached tool list might be harmless to refresh, while a cached permission decision may become dangerous when its revocation behavior is unclear.

The same field can also have two representations with different owners. A request may carry an approval reference so any server instance can locate the decision, while the decision itself remains in a trusted store. The header makes the request routable. It does not become the source of truth merely because it contains an identifier.

Failure testing becomes more precise after this review. Instead of asking whether the stateless service "survives a restart," test the handoffs separately. Kill an instance after a task is created. Reconnect after an approval is granted. Retry with an older revision. Expire the authority before resumption. Check which records survive and which operations the new instance refuses.

These tests are less dramatic than claiming the system has no state. They are much closer to the failures users will experience.

Statelessness is useful when the boundary is named

A service can be stateless while the workflow around it remains deliberately stateful. In fact, that separation is often the reason to make the service stateless: short-lived instances handle requests, while components designed for durability own progress, authority, and evidence.

The 2026-07-28 MCP transition gives implementers a cleaner way to make that split. GitHub's removal of Redis-backed sessions shows one concrete version of it. Neither tells every agent platform how to persist long-running work or record human decisions.

A precise architecture description should name the boundary: the MCP service retains no transport session between requests; task progress lives with a durable task owner; approval evidence lives with the system that grants authority; a reconnect carries enough identity to find both.

That sentence is less catchy than "the agent is stateless." It is also specific enough to review, test, and trust.

Source notes

Comments

Popular posts from this blog

The Agent Shift Is Showing Up in Workflows, Not Prompts

The Invisible Wall of Vibe Coding: The Rise of Control Debt

Code Review Is Becoming a Routing Problem