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

Abierto
#1,203 1 comentario 2 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java

Línea de trabajo

Start by reading the linked protocol versioning section and inspect the server entry points for McpServer, McpAsyncServer, and McpSyncServer. Work out how Streamable HTTP and stdio select a protocol era, including how initialize errors report supported versions. Done means one composed server can serve both eras while the existing server classes remain single-era.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area/server enhancement P2
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.

Lenguaje dominante
Java
Estrellas
3.8k
Forks
1.1k
Merge medio
1 d 3 h
PR fusionados (30 d)
38

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de modelcontextprotocol/java-sdk

Todos los issues de modelcontextprotocol/java-sdk

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.