part…
Building governance for MCP?
The gateway applies what the guide teaches: policies on discovery, invocation and authorisation.
The gateway applies what the guide teaches: policies on discovery, invocation and authorisation.
Streamable HTTP is the transport for remote servers. In 2026-07-28 it changed shape: a single endpoint that accepts POST, no GET, no DELETE, no sessions, no resumability, and with mandatory headers that mirror the body so that load balancers and gateways can route without parsing JSON.
https://example.com/mcp) that MUST accept POST.subscriptions/listen.Origin on every connection; if present and invalid, 403 Forbidden (the body MAY be a JSON-RPC error without id).127.0.0.1.Accept: application/json, text/event-stream.202 Accepted with no body; rejected → an error status (e.g. 400).Content-Type: application/json or text/event-stream; the client MUST support both.Note from the spec: the core defines no client→server notifications over HTTP (cancelling means closing the stream), so the header requirements for notification POSTs are not defined in this revision.
progress, message) before the final response; they MUST relate to that request.X-Accel-Buffering: no; on long streams, SSE comments as keep-alives.Last-Event-ID is not supported; if a stream breaks, the request is lost and the client MUST reissue it with a new id.Closing the response stream MUST be treated as cancellation; the server SHOULD stop and MUST NOT send further messages for that request.
MCP-Protocol-VersionMandatory on every POST; MUST match _meta.protocolVersion; otherwise 400 + -32020. Unsupported version → 400 + -32022. Unknown method → 404 + -32601 (the JSON-RPC body distinguishes it from the 404 of an old HTTP+SSE server). Servers serving clients < 2025-06-18 MAY assume 2025-03-26 if it is missing.
Mcp-Method and Mcp-Name| Header | Source | Mandatory on |
|---|---|---|
Mcp-Method |
method |
All requests |
Mcp-Name |
params.name or params.uri |
tools/call, resources/read, prompts/get |
Mcp-Param-{Name} from x-mcp-headerA server MAY annotate inputSchema properties with "x-mcp-header": "Region"; the HTTP client MUST mirror the value in Mcp-Param-Region. Constraints on the x-mcp-header value: non-empty; an HTTP token (tchar); no CR/LF; unique case-insensitively within the schema; only on string, integer or boolean properties (not number; integers within ±2^53−1); only on properties statically reachable through a chain of properties (not through items, oneOf/anyOf/allOf/not, if/then/else or $ref). An absent or null value → header omitted. HTTP clients MUST reject tools with invalid annotations by excluding them from tools/list and SHOULD log the reason. stdio clients MAY ignore the annotation. Servers SHOULD NOT annotate sensitive parameters.
Conversion: string as is, integer in decimal, boolean true/false. If the value is not safe ASCII (non-ASCII, control characters, leading/trailing whitespace) =?base64?{base64 of the UTF-8}?= MUST be used (markers in lower case, exact). The same applies to Mcp-Name. An ASCII value that already looks like a sentinel MUST be encoded too. Servers and intermediaries MUST decode before comparing.
| Value | Header |
|---|---|
us-west1 |
Mcp-Param-Region: us-west1 |
Hello, 世界 |
Mcp-Param-Greeting: =?base64?SGVsbG8sIOS4lueVjA==?= |
line1\nline2 |
Mcp-Param-Text: =?base64?bGluZTEKbGluZTI=?= |
Every server that processes the body MUST reject with 400 + -32020 HeaderMismatch if: a required standard header is missing; a value does not match the body (decoding sentinels; integers compared numerically); or it contains invalid characters. If the client omits an Mcp-Param-* header whose value is present in the body, it is non-conformant and MUST be rejected. Intermediaries MUST return an HTTP error (not necessarily JSON-RPC) and, if they apply header-based policy, SHOULD check that the MCP-Protocol-Version mandates header-body validation (if it is old or missing, reject rather than trust). Header names are case-insensitive; values are case-sensitive. On a HeaderMismatch for Mcp-Param-*, the client SHOULD refresh tools/list and retry.
Era detection: attempt a modern request; on 400, inspect the body (modern error → continue modern; empty/unrecognised → initialize). Earlier revisions of Streamable HTTP (2025-03-26..2025-11-25) had Mcp-Session-Id (+DELETE), GET for the server stream, server requests over SSE and Last-Event-ID; none of that exists now. A modern-only server SHOULD: 405 to GET/DELETE; ignore Mcp-Session-Id without minting or returning one; ignore Last-Event-ID. HTTP+SSE (2024-11-05) is Deprecated: compatible clients, after a 400/404/405 without a modern error, perform a GET expecting the endpoint event.
Mcp-* headers are your routing plane: you can route by method, by tool and by annotated parameters without parsing the body at the load balancer. But the component that processes the body MUST validate header against body, and your header-based policies must require a version that guarantees it.x-mcp-header when taking inventory; exclude and audit the invalid ones.id and make it idempotent where you can (idempotentHint).1. Which HTTP methods does the modern MCP endpoint accept?
GET (stream) and DELETE (session) were removed; a modern-only server responds 405.
2. On which requests is Mcp-Name mandatory?
Mcp-Method goes on all requests; Mcp-Name only where there is a name or uri.
3. What must an HTTP client do with a tool whose x-mcp-header is "Bad Header"?
The value is not a valid HTTP token; the tool is rejected, not the whole listing.
4. What happens if a request's SSE stream breaks?
2026-07-28 removed resumability.
5. How is a header value containing non-ASCII characters marked?
The spec defines the base64 sentinel for Mcp-Name and Mcp-Param-*.