You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support dual-era servers (legacy + 2026-07-28 on the same endpoint) #1203
The 2026-07-28 revision defines a dual-era implementation as one that supports both modern (stateless, per-request _meta) and legacy (initialize handshake, 2025-11-25 and earlier) protocol versions. See Versioning: Backward Compatibility.
Requirements
Let users run one server that serves both eras, picking the era from how the client opens, as the spec describes:
A request carrying modern per-request _meta is served statelessly under 2026-07-28.
An initialize request selects legacy semantics, scoped to the session (HTTP) or the process (stdio).
Existing server (McpServer, McpAsyncServer and McpSyncServer) must remain single-era, the multi-era composition happens at a higher level.
Notes
At minimum this covers Streamable HTTP (one endpoint, both eras at the same time) and stdio (the era is fixed by the first message). The spec also asks dual-era servers to list their supported protocol versions in any error returned to initialize.
Ideally users register tools, resources and prompts once and the SDK serves them under either era, so they don't maintain two server definitions. This might not be 100% possible, some edge cases are acceptable.
Activity