On Streamable HTTP, the client must send specific headers on every POST request. Every POST must include an MCP-Protocol-Version header whose value matches the protocol version field in the request body, and the Mcp-Method header plus the Mcp-Name header for tool calls and resource reads. If the header value does not match the body, the server must reject the request with 400 Bad Request. Checking the headers first saves you from debugging a connection that was never going to work.
What you need
- The protocol version the client and server agreed on, for example 2026-07-28
- The tool or resource name for the request
- A way to inspect the outgoing request headers
Step 1: Check the protocol version header
Confirm every POST carries MCP-Protocol-Version with the agreed version, and that it matches the protocolVersion field in the request body. A mismatch must be rejected by the server.
Step 2: Check the method and name headers
Confirm the Mcp-Method header carries the method, and Mcp-Name carries the tool name or resource URI for tools/call, resources/read and prompts/get requests.
Step 3: Check the Accept header
Confirm the Accept header lists both application/json and text/event-stream, since the client must support both reply types. A client that only accepts one type may fail on servers that reply with the other.
Worked example: synthetic header check for one request
The table below is a synthetic example. It shows the expected result of checking request headers; no request was sent.
| Header | Value | Check |
|---|---|---|
| MCP-Protocol-Version | 2026-07-28 | Matches body |
| Mcp-Method | tools/call | Pass |
| Mcp-Name | search_contacts | Pass |
| Accept | application/json, text/event-stream | Pass |
Expected result (UNTESTED). all four headers are present and the protocol version matches the body, so the request is accepted. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- The body remains the source of truth; headers mirror selected body fields so intermediaries can route without parsing the body.
- If the server does not implement the requested protocol version, it must respond with 400 Bad Request and an UnsupportedProtocolVersionError.
- If the server does not implement the requested method, it must respond with 404 Not Found and error code -32601.
- Tool parameter values that cannot be safely represented as plain ASCII must be Base64-encoded with the =?base64? sentinel format.
