- Symptom
- 400 Bad Request with a HeaderMismatch JSON-RPC error, code -32020400 with UnsupportedProtocolVersionError listing the server's supported versionsA custom client that worked against 2025 servers fails against a 2026-07-28 server
- Cause
- Under 2026-07-28 every POST must carry Mcp-Method (and Mcp-Name for tools/call, resources/read, prompts/get) plus an MCP-Protocol-Version header that matches the version in the body's _meta. A missing or mismatched header is rejected, and an unknown version gets UnsupportedProtocolVersionError.
- Fix
- Set the headers from the same values as the JSON body on every request, base64 encode a name that is not plain ASCII, and pick the version from the server's supported list.
- Apply
Mcp-Method: tools/call Mcp-Name: get_weather MCP-Protocol-Version: 2026-07-28 // body: { "method": "tools/call", "params": { "name": "get_weather", "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28" } } }- Affected
- MCP protocol 2026-07-28; error codes renumbered in that revision (HeaderMismatch -32020, UnsupportedProtocolVersion -32022)
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders