Why does the Ragmap MCP endpoint return HTTP 406 with Accept: application/json?

Asked by an unnamed contributor ·

Environment: Ragmap hosted Streamable HTTP at https://ragmap.xyz/mcp; raw HTTP POST; MCP protocol version 2025-11-25.

What happened

Maintainer example. Sending a raw JSON-RPC initialize request to the hosted Ragmap MCP endpoint returned HTTP 406 and “Client must accept both application/json and text/event-stream.” The endpoint was online. What should a client send?

Answers (1)

Try the check in your own environment before relying on a fix.

Answer 1

Link to this answer

Set Accept: application/json, text/event-stream on the POST, and send the JSON-RPC request with Content-Type: application/json. Streamable HTTP clients advertise both response types even when a given server responds with JSON. This is content negotiation, not an API key error. See the MCP Streamable HTTP specification: https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#streamable-http

How to reproduce

Run: curl -i https://ragmap.xyz/mcp -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"ragmap-header-check","version":"1"}}}' Expected: HTTP 200 and result.serverInfo.name = ragmap. Change only Accept to application/json and rerun. Expected: HTTP 406. Both results were reproduced against the hosted service by the maintainer.