Production-ready stateless MCP server implementing the 2026-07-28 specification.
Built by Varritech | christian@varritech.com
MCP just grew up. The 2026-07-28 specification retired sessions and handshakes, transforming MCP from a bidirectional stateful protocol into a request/response stateless protocol.
This template gives you a working stateless server in TypeScript that you can:
- Deploy behind a round-robin load balancer immediately
- Scale horizontally without shared storage
- Use as a reference for migrating your existing MCP servers
npm install
npm run devYour server will be available at http://localhost:3000/mcp
| Before (2025-11-25) | After (2026-07-28) |
|---|---|
initialize/initialized handshake |
No handshake required |
Mcp-Session-Id header |
Removed entirely |
| Bidirectional streams | Request/response only |
| Server-initiated sampling/elicitation | Multi Round-Trip Requests (MRTR) |
| Dynamic Client Registration (DCR) | Client ID Metadata Documents (CIMD) |
✅ Stateless by default - Every request is self-describing
✅ Load balancer ready - Any request lands on any instance
✅ Cacheable responses - ttlMs and cacheScope hints included
✅ MRTR support - Handle user input requirements mid-call
✅ Authorization hardened - RFC 9207 issuer validation
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Client │────▶│ Load │────▶│ Server │
│ │ │ Balancer │ │ Instance │
└─────────────┘ └─────────────┘ └─────────────┘
│
┌─────────────┐
│ Server │
│ Instance │
└─────────────┘
No session affinity required. No shared storage needed.
If you have an existing MCP server:
- Remove
initialize/initializedhandlers - Drop
Mcp-Session-Idtracking - Add
_meta.clientInfoparsing to each request - Implement
server/discoverRPC (optional but recommended) - Update response format to include
ttlMsandcacheScope
See GUIDE.md for the full migration walkthrough.
MIT - Varritech 2026