Skip to content

StreamableHttpHandler rejects concurrent GET SSE streams despite spec allowing them #1492

@deyanp

Description

@deyanp

Description

StreamableHttpHandler enforces a single active GET SSE stream per session via TryStartGetRequest(). When a second GET arrives (without Last-Event-ID), the server returns:

{"error":{"code":-32000,"message":"Bad Request: This server does not support multiple GET requests. Start a new session or use Last-Event-ID header to resume."},"id":"","jsonrpc":"2.0"}

However, the MCP spec (2025-06-18) explicitly allows multiple concurrent SSE streams:

Multiple Connections

  1. The client MAY remain connected to multiple SSE streams simultaneously.
  2. The server MUST send each of its JSON-RPC messages on only one of the connected streams; that is, it MUST NOT broadcast the same message across multiple streams.

Observed behavior

In production, the Anthropic/ClaudeAI MCP client opens a GET SSE stream and then attempts to open a second one a few seconds later. The server rejects it with 400.

19:46:28 GET /api/v1/mcp → 200 text/event-stream (SSE stream opened)
19:46:36 GET /api/v1/mcp → 400 "does not support multiple GET requests"

Expected behavior

Either:

  1. Support multiple concurrent GET streams per the spec's "Multiple Connections" section, or
  2. Provide a configuration option (e.g., HttpTransportOptions.AllowMultipleGetStreams) so server implementers can opt in

Environment

  • ModelContextProtocol.AspNetCore v1.2.0
  • .NET 10.0
  • MCP client: Anthropic/ClaudeAI 1.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions