all scenarios

Validates header against the wrong version

version-header-mismatch · Protocol versioning

Endpoint (Streamable HTTP)
https://chaos-mcp.thomascdnns.com/s/version-header-mismatch/mcp
On the wire — recorded from a real request
your clientchaos-mcp01initializePOST /s/version-header-mismatch/mcp200 OK · application/json · 1 ms"jsonrpc""2.0""id"1"result""protocolVersion""2024-11-05""capabilities""tools""serverInfo""name""chaos-mcp/version-header-mismatch""version""1.0.0""instructions"02tools/listPOST /s/version-header-mismatch/mcpMCP-Protocol-Version: 2024-11-05400 Bad Request · application/json · 1 ms"jsonrpc""2.0""id"null"error""code"-32600"message""protocol version mismatch: header 2024-11-05 != server 2025-03-26"

Symptom

what you'll observe

The handshake negotiates one version, but later requests 400 with 'protocol version mismatch' even when you send the version you just negotiated.

Cause

what this reproduces

The server checks the MCP-Protocol-Version header against a hard-coded constant (2025-03-26) instead of the version actually negotiated for the session.

Fix

how you'd resolve it

Validate the header against the session's negotiated version, not a global constant.

Try it with curl
bash
curl -sS -X POST \
  https://chaos-mcp.thomascdnns.com/s/version-header-mismatch/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"

'