Model Context Protocol · api · fg-0533

Streamable HTTP MCP server answers 406 Not Acceptable to a hand-written client

If you see Not Acceptable: Client must accept both application/json and text/event-stream, the cause and the fix for Model Context Protocol are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Not Acceptable: Client must accept both application/json and text/event-streamcurl or fetch POSTs to the MCP endpoint fail while real MCP clients workA JSON-only Accept header is rejected even with enableJsonResponse true
Cause
The Streamable HTTP transport requires every POST to send an Accept header listing both application/json and text/event-stream, because the server may answer either way. The TypeScript SDK server rejects a request that lists only one.
Fix
Send both media types in Accept on every POST and handle both a JSON body and an SSE stream in the response.
Apply
curl -X POST https://example.com/mcp -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
Affected
MCP Streamable HTTP, protocol 2025-03-26 and later; @modelcontextprotocol/sdk StreamableHTTPServerTransport, as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun