all scenarios

Missing Mcp-Session-Id

no-session-id · CORS & headers

Endpoint (Streamable HTTP)
https://chaos-mcp.thomascdnns.com/s/no-session-id/mcp
On the wire — recorded from a real request
your clientchaos-mcp01initializePOST /s/no-session-id/mcp200 OK · application/json · 2 ms"jsonrpc""2.0""id"1"result""protocolVersion""2024-11-05""capabilities""tools""serverInfo""name""chaos-mcp/no-session-id""version""1.0.0""instructions""chaos-mcp scenario: no-session-id — Missing Mcp-Session-Id"no Mcp-Session-Id header02tools/listPOST /s/no-session-id/mcp200 OK · application/json · 1 ms"jsonrpc""2.0""id"2"result""tools""name""echo""description""Echo back the provided message.""inputSchema""type""object""properties""message""type""string""description""Text to echo"… 40 more linesno Mcp-Session-Id header

Symptom

what you'll observe

Session can't be resumed; some clients re-initialize on every call or drop the stream.

Cause

what this reproduces

Server never returns the Mcp-Session-Id header on initialize.

Fix

how you'd resolve it

Emit Mcp-Session-Id on initialize and accept it on subsequent requests.

Try it with curl
bash
curl -sS -X POST \
  https://chaos-mcp.thomascdnns.com/s/no-session-id/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '
"jsonrpc""2.0"
"id"1
"method""initialize"
"params"
"protocolVersion""2024-11-05"
"capabilities"
"clientInfo""name""curl""version""1"

'