- 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