all scenarios

Wrong Content-Type

wrong-content-type · Transport & framing

Endpoint (Streamable HTTP)
https://chaos-mcp.thomascdnns.com/s/wrong-content-type/mcp
On the wire — recorded from a real request
your clientchaos-mcp01initializePOST /s/wrong-content-type/mcp200 OK · text/plain · 7 ms"jsonrpc""2.0""id"1"result""protocolVersion""2024-11-05""capabilities""tools""serverInfo""name""chaos-mcp/wrong-content-type""version""1.0.0""instructions""chaos-mcp scenario: wrong-content-type — Wrong Content-Type"Content-Type: text/plain; charset=utf-802tools/listPOST /s/wrong-content-type/mcp200 OK · text/plain · 10 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 linesContent-Type: text/plain; charset=utf-8

Symptom

what you'll observe

Strict clients reject the response; some hang waiting for a stream.

Cause

what this reproduces

Handler writes correct JSON-RPC but never sets Content-Type, so it defaults to text/plain.

Fix

how you'd resolve it

Set Content-Type: application/json (or text/event-stream when streaming).

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

'