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
{{ message }}
Repository navigation
Streamable HTTP: a Base64-encoded Mcp-Name is rejected as a header mismatch instead of decoded #1234
validateMcpHeaders compares Mcp-Name with the body value as the raw header string. The 2026-07-28 spec lets a client Base64-wrap a name or resource URI that is not header-safe, and requires the server to decode it before comparing; the SDK decodes Mcp-Param-* that way but not Mcp-Name, so an encoded name is refused as a header mismatch.
mcp/streamable_headers.go (main): line 377 reads nameInHeader := header.Get(nameHeader) and compares it directly; decodeHeaderValue at line 496 exists and is applied only to Mcp-Param-* values at line 431.
Transport page, "Value encoding":
Servers and intermediaries that need to inspect these values MUST decode them accordingly. In particular, servers MUST decode an encoded Mcp-Name or Mcp-Param-{Name} value before comparing it to the corresponding request body value during Server Validation.
Tool names are usually header-safe, so this mostly bites resources/read: a resource template with a path argument that contains non-ASCII, which the spec allows, forces a conformant client to encode the URI, and every such read is then rejected.
Activity
mcp: decode a Base64-wrapped Mcp-Name before comparing it to the body (…
Record where each upstream contribution stood on 2026-09-24 (#936)