all scenarios

No CORS headers

no-cors · CORS & headers

Endpoint (Streamable HTTP)
https://chaos-mcp.thomascdnns.com/s/no-cors/mcp
On the wire — recorded from a real request
your clientchaos-mcp01browser preflightOPTIONS /s/no-cors/mcp403 Forbidden · text/plain · 2 msCORS not allowed! body does not parse as JSON — expecting valueContent-Type: text/plain; charset=utf-802initializePOST /s/no-cors/mcp200 OK · application/json · 4 ms"jsonrpc""2.0""id"1"result""protocolVersion""2024-11-05""capabilities""tools""serverInfo""name""chaos-mcp/no-cors""version""1.0.0""instructions""chaos-mcp scenario: no-cors — No CORS headers"

Symptom

what you'll observe

Browser-based clients fail with a CORS error; curl/CLI clients work fine.

Cause

what this reproduces

Server never sets Access-Control-Allow-* headers and rejects the preflight.

Fix

how you'd resolve it

Set Access-Control-Allow-Origin and friends; answer OPTIONS preflight with 204.

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

'