Skip to content

Support dual-era servers (legacy + 2026-07-28 on the same endpoint) #1203

Description

@Kehrlann

Context

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

  1. added
    P2Moderate issues affecting some users, edge cases, potentially valuable feature
    on Oct 20, 2026
  2. added this to the 2.2.0-M2 milestone on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Moderate issues affecting some users, edge cases, potentially valuable featurearea/serverenhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions