McpServer.layerHttp: optional legacy GET SSE for idle list-change notifications

Abierto
#10,436 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@effect-bot ya está trabajando en esto.

Desde el 7/11/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

Feature request

Please consider an opt-in standalone GET SSE stream for sessionful MCP protocol revisions on McpServer.layerHttp, so an idle connected client can receive notifications/tools/list_changed (and the other list-change notifications).

This is a request for a currently documented limitation, not a claim that returning 405 violates the protocol: the GET event stream is optional. Effect 4.1.2 explicitly excludes GET SSE in the layerHttp documentation.

Reproduction and observed behavior

Environment: [email protected], @effect/[email protected], Node 26.12.1, and the independent @modelcontextprotocol/[email protected] client.

  1. Run a long-lived McpServer.layerHttp endpoint with protocols: [McpProtocol.v2025_11_25] and a registered toolkit.
  2. Connect the SDK Client with StreamableHTTPClientTransport, and register a ToolListChangedNotificationSchema handler.
  3. Initialization, listing and tool calls succeed; the client retains its negotiated session id.
  4. The SDK opens an idle GET stream on the same endpoint. The endpoint returns 405.
  5. Update the registered tool description while the client is idle. A subsequent listTools sees the new description, but the notification handler receives no tools/list_changed (a separate 5-second wait expires).
  6. The same dynamic catalog and SDK client over layerStdio / StdioClientTransport receive the notification without reconnecting.

The downstream proof exercises real HTTP calls and real stdio in a child process, including a live implementation transition. We keep the notification assertion on stdio and document the HTTP limitation rather than implement an alternate transport in the application.

Desired behavior

With an explicit option enabling legacy GET SSE, retain the stream under the MCP session owner and deliver server-initiated notifications independently of an active POST. Scope closure, session termination and client disconnect should close it. This need not include replay, event resumption or session expiry.

An application can change a tool's description or side-effect hints after replacing its implementation. Existing clients need to learn about that change before their next call; polling listTools on every call is not equivalent to the notification mechanism.

This differs from #8060, which covered notifications emitted during an active request, and #8919, which covered optional subscriptions for the 2026 protocol. Stdio and the newer subscription transport remain usable alternatives.

Lenguaje dominante
TypeScript
Estrellas
16.7k
Forks
808
Merge medio
12 h 16 min
PR fusionados (30 d)
809

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 Effect-TS/effect

Todos los issues de Effect-TS/effect

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.