Not Acceptable: Client must accept both application/json and text/event-stream
- Spec
2026-07-28- Evidence
- E2Reproducedarm64
- TypeScript SDK v2 (Node HTTP)
@modelcontextprotocol/node@2.1.2- Python SDK
mcp@2.3.0- Verified
What it means
Section titled “What it means”The Streamable HTTP specification says the client must send an Accept header that lists both application/json and text/event-stream, because the server may answer either way. Servers built with the official SDKs enforce it. Without the header we got HTTP 406:
| Server | Response body |
|---|---|
| TypeScript SDK v2, 2025-style request | {"jsonrpc":"2.0","error":{"code":-32000,"message":"Not Acceptable: Client must accept both application/json and text/event-stream"},"id":null} |
| Python SDK 2.3.0, 2025-style request | {"jsonrpc":"2.0","id":null,"error":{"code":-32600,"message":"Not Acceptable: Client must accept both application/json and text/event-stream"}} |
Python SDK 2.3.0, 2026-07-28 request with Accept: application/json |
406 with an empty body |
Which requests get checked differs between servers. In our tests:
- A TypeScript server built with
createMcpHandlerchecked only 2025-style requests (withinitialize). A 2026-07-28 request passed with anyAccept, or none. - Python 2.3.0 also rejected 2026-07-28 requests whose
Acceptnamed only one of the two types, with no message at all. The same request with noAcceptheader, or with*/*, passed. - A TypeScript server wired with the older per-request transport pattern checked every request.
So a request that works against one server can get 406 from another. The empty-body case is the hard one to recognise: the client usually reports just the status code.
The request has no or a narrow Accept header
Section titled “The request has no or a narrow Accept header”Typical with curl, Postman, or a client written by hand that sends only Accept: application/json. Send both types:
curl -X POST http://127.0.0.1:8000/mcp \ -H 'content-type: application/json' \ -H 'accept: application/json, text/event-stream' \ ...The official client SDKs and the MCP Inspector already send this header, so if they work and your own request does not, compare the headers.
A proxy rewrites the header
Section titled “A proxy rewrites the header”If a client that works locally fails only through an API gateway or reverse proxy, check that the proxy forwards Accept unchanged. Some gateways replace it with their own default.
Related
Section titled “Related”- From HTTP+SSE to Streamable HTTP: complete curl requests that work.
- Run a server behind Docker and a reverse proxy
Sources
MCPDev is community documentation. It is not affiliated with the Model Context Protocol project or with the vendors of the clients it covers.