all scenarios

Valid JSON, not JSON-RPC

not-json-rpc · Transport & framing

Endpoint (Streamable HTTP)
https://chaos-mcp.thomascdnns.com/s/not-json-rpc/mcp
On the wire — recorded from a real request
your clientchaos-mcp01initializePOST /s/not-json-rpc/mcp200 OK · application/json · 8 ms"ok"true"status""success""data""message""hello from a non-compliant server"! parses as JSON, but carries no jsonrpc envelopetools/list answers identically — every request does

Symptom

what you'll observe

Client says 'invalid response' / missing jsonrpc field, though the body parses as JSON.

Cause

what this reproduces

Server returns its own REST-style envelope and forgot the JSON-RPC 2.0 wrapper.

Fix

how you'd resolve it

Wrap every response in {"jsonrpc":"2.0","id":<id>,"result":...}.

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

'