Awesome Testing

MCP lesson 04 · Build stateless MCP

How does the 2026-07-28 stateless core change server design?

2026-07-28 core · deterministic JSON-RPC fixtures

Atlas Release Evidence Server. Read-only evidence, deterministic scoring, and an explicit evaluation Task across replicas and protocol eras.

01 · Smallest useful mechanism

Remove hidden protocol sessions; preserve workflow state through explicit handles.

The modern revision removes initialize, initialized notifications, and Mcp-Session-Id. Each request declares version, capabilities, and client information; servers mint explicit handles when later calls need state.

Stateless describes request processing, not an absence of application state.

02 · Experiment

Test the prediction

Deterministic protocol fixture

This workbench uses inspectable JSON-RPC fixtures and injected failures. It does not make live calls or execute external effects.

Protocol workbench · atlas-stateless-2026-07-28

Choose the server design that survives three requests landing on three replicas.

Injected failure

Replica A disappears after returning a workflow identifier.

Choose the implementation

The trace has not run.

Commit to an implementation, then inject the failure and inspect the actual state transitions.

03 · Implementation brief

Build it, break it, prove the outcome.

Implement
Create a three-replica simulation with opaque, tenant-bound, expiring handles.
Break it on purpose
Kill replica A, replay a handle across tenants, revoke access, and duplicate a request.
Completion evidence
Healthy replicas continue, invalid uses fail closed, and traces identify handle lifecycle without exposing handle values.

Your learning artifact

Write the argument you would defend

Stored only in this browser. No account required; course reset does not delete it.

04 · Check your understanding

What replaced the modern initialize session?

Primary sources · verified 2026-08-02

What the fixture does not prove

Self-contained requests simplify horizontal scaling and recovery, while explicit handles make lifetime, ownership, authorization, and retry behavior testable.

Common mistake: A stateless MCP server must recompute everything and cannot support workflows. Servers may keep durable state, but later requests refer to it through explicit, scoped handles rather than implicit protocol sessions.

Transfer exercise: Send three workflow steps to three replicas and prove that only the explicit handle connects them.

Optional referenceDeep dive / reference chapterOpen the complete essay, diagrams, mathematics, exercises, glossary, and sources when you want more depth.

Next: Self-contained requests still need compatibility; discovery and version negotiation make the modern/legacy boundary explicit.