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.
In the legacy era, Streamable HTTP could maintain sessions identified by Mcp-Session-Id. The 2025-11-25 security guide devotes a section to their hijacking. In 2026-07-28 sessions disappear and the equivalent threat becomes state handle hijacking (lesson 10.2), but your gateway will continue issuing and consuming sessions with legacy counterparts.
Mcp-Session-Id.tools/call) or, in prompt injection variants, injects events into the SSE stream associated with the session (if the server routes by session without verifying the caller) so that the victim receives malicious content.<user_id>:<session_id> where user_id is derived from the verified token, so that a guessed id is of no use to another principal.400 without an id, 404 on expiry, DELETE to terminate.| With sessions (legacy) | Without sessions (modern) |
|---|---|
| The session id correlates requests and streams; it is a hijacking target. | There is nothing to hijack at the protocol level; state is referenced with explicit application handles. |
| The server stores version and capabilities per session. | They travel in every request. |
| The GET stream and resumability depend on the session. | subscriptions/listen per request; no resumability. |
| The guide asks to bind the session to the user. | The guide asks to bind handles to the user and not to treat them as authentication. |
404 to force re-initialisation.Mcp-Session-Id in the clear; store it encrypted alongside the token; rotate the session when you rotate credentials.1. Can a legacy server use Mcp-Session-Id as proof of identity?
The session correlates; authentication is provided by the token.
2. Which key pattern does the guide recommend for session state?
That way a guessed id is of no use to another user.
3. What is the equivalent threat in 2026-07-28?
Without sessions, state is referenced with application handles.