all scenarios

HTML login wall instead of JSON

html-login-wall · Transport & framing

Endpoint (Streamable HTTP)
https://chaos-mcp.thomascdnns.com/s/html-login-wall/mcp
On the wire — recorded from a real request
your clientchaos-mcp01initializePOST /s/html-login-wall/mcp200 OK · text/html · 20 ms<!DOCTYPE html><html><head><title>Sign in</title></head><body><h1>Single Sign-On</h1><form><input name=user><input name=pass type=password><button>Log in</button></form></body></html>! body does not parse as JSON — expecting valueContent-Type: text/html; charset=utf-8tools/list answers identically — every request does

Symptom

what you'll observe

Client reports 'Unexpected token < in JSON' — the body is HTML.

Cause

what this reproduces

An auth proxy / SSO gateway intercepts the request and returns its login page with HTTP 200.

Fix

how you'd resolve it

Exclude the MCP path from the HTML auth redirect; return 401 JSON for unauthenticated API calls.

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

'