You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 2026 Streamable HTTP header validation rejects a valid Mcp-Name when its value has leading or trailing HTTP optional whitespace. Header field values are subject to HTTP whitespace normalization; a client or intermediary that sends Mcp-Name: tools/call is rejected with JSON-RPC error -32020, although the trimmed value names the registered method.
This also fails the official conformance case sep-2243 (header validation).
Reproduction
Send a valid 2026 request with:
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: tools/call
a valid tools/call JSON-RPC body
On mcp 2.3.0, the SDK returns -32020 rather than accepting the header value after HTTP whitespace handling.
Expected
Normalize permitted surrounding HTTP whitespace before comparing the header value, while continuing to reject values that differ after normalization.
Environment
Python SDK 2.3.0; reproduced by the MCP conformance suite's sep-2243 header-validation case.
Thanks for the focused reproduction. I’d normalize only permitted HTTP optional whitespace around Mcp-Name before comparing it with the registered method, then add regression coverage for leading and trailing whitespace while keeping mismatched values rejected. I used Codex to help review the issue and will review and own any change. Does that match the intended spec handling, and would it be okay for me to take this once assigned?
Activity
aritejhg commentedon Oct 26, 2026
Thanks for the focused reproduction. I’d normalize only permitted HTTP optional whitespace around
Mcp-Namebefore comparing it with the registered method, then add regression coverage for leading and trailing whitespace while keeping mismatched values rejected. I used Codex to help review the issue and will review and own any change. Does that match the intended spec handling, and would it be okay for me to take this once assigned?