-
Notifications
You must be signed in to change notification settings - Fork 669
StreamableHttpHandler rejects concurrent GET SSE streams despite spec allowing them #1492
Copy link
Copy link
Open
Labels
needs confirmationUnclear if still relevantUnclear if still relevant
Description
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
- The client MAY remain connected to multiple SSE streams simultaneously.
- 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:
- Support multiple concurrent GET streams per the spec's "Multiple Connections" section, or
- Provide a configuration option (e.g.,
HttpTransportOptions.AllowMultipleGetStreams) so server implementers can opt in
Environment
ModelContextProtocol.AspNetCorev1.2.0- .NET 10.0
- MCP client: Anthropic/ClaudeAI 1.0.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs confirmationUnclear if still relevantUnclear if still relevant