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.
The earlier form of Streamable HTTP shared the single endpoint, but added GET for a server stream, DELETE for sessions, Mcp-Session-Id, server requests over SSE and resumability. A dual-era gateway has to implement all of this on its north side (legacy hosts) and its south side (legacy servers).
Same as in modern (one POST per message, dual Accept, body with one request, notification or response: here the client does send responses to server requests). Notification or response accepted → 202. Request → JSON or SSE.
If the server opens SSE for a request:
id and empty data to prepare for reconnection.id, it MAY close the connection without ending the stream; the client SHOULD reconnect ("polling", SEP-1699); before closing it SHOULD send retry and the client MUST honour it.notifications/cancelled. To avoid losses, the stream MAY be resumable.The client MAY issue a GET to the endpoint (with Accept: text/event-stream) to open a stream through which the server sends requests and notifications unrelated to any request in progress. The server returns SSE or 405. It MUST NOT send responses over this stream except when resuming. Either side may close it; the same polling applies.
The client MAY maintain several streams; the server MUST send each message over exactly one (no broadcast).
Servers MAY attach an id to SSE events (unique per session or per client; SHOULD encode the originating stream). After a disconnection, the client SHOULD issue a GET with Last-Event-ID; the server MAY replay the subsequent messages of that stream and MUST NOT replay those of others. Resumption is always via GET, whether the stream started with POST or with GET.
initialize with the Mcp-Session-Id header (SHOULD be globally unique and cryptographically secure; MUST contain only visible ASCII 0x21–0x7E; secure handling in the client).400 if it is missing (except on initialize).404 to requests with that id.404 with Mcp-Session-Id, the client MUST start a new session with initialize without an id.DELETE with the id; the server MAY respond 405.After initialize, MCP-Protocol-Version MUST be present in every request with the negotiated version. Without the header and with no other way of knowing, the server SHOULD assume 2025-03-26. Invalid version → 400.
Servers: keep the old SSE and POST endpoints alongside the new one. Clients: POST initialize; if it fails with 400/404/405, GET expecting the endpoint event and use the old transport.
| Legacy | Modern |
|---|---|
| POST, GET, DELETE | POST only |
Mcp-Session-Id |
No sessions |
| Server requests over SSE | MRTR |
| GET stream for notifications | subscriptions/listen |
Last-Event-ID, retry, polling |
No resumability; re-emit |
| Disconnection ≠ cancellation | Disconnection = cancellation |
| Client sends responses via POST | Never |
404, DELETE on retirement), keep a GET open if the server offers it, process server requests and respond via POST, and support resumption with Last-Event-ID if the server provides ids.Mcp-Session-Id, require and validate the session, serve GET if you want to push notifications to legacy hosts, and remember that their disconnection is not cancellation.1. What does a legacy client do when it receives a 404 on a request with Mcp-Session-Id?
The 404 indicates that the session has been terminated.
2. Via which method is a stream resumed with Last-Event-ID?
Resumption is always via GET, regardless of how the stream started.
3. In legacy, does an SSE disconnection amount to cancelling the request?
It is one of the key differences from 2026-07-28.
4. Can the legacy server send the same message over several streams?
No broadcast; loss is mitigated with resumability.