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.
subscriptions/listen opens a server-to-client notification stream that stays open until one of the parties closes it. It replaces the legacy Streamable HTTP GET stream and resources/subscribe/unsubscribe. It is the only channel through which, in the modern era, a server can speak without a "normal" request in progress.
{ "jsonrpc": "2.0", "id": 1, "method": "subscriptions/listen", "params": {
"_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {} },
"notifications": { "toolsListChanged": true, "resourceSubscriptions": ["file:///project/config.json"] } } }
| Field | Type | Receives |
|---|---|---|
toolsListChanged |
boolean | notifications/tools/list_changed |
promptsListChanged |
boolean | notifications/prompts/list_changed |
resourcesListChanged |
boolean | notifications/resources/list_changed |
resourceSubscriptions |
string[] | notifications/resources/updated for those URIs |
All optional; omitting = not subscribing. The server MUST NOT send types the client did not request. Extensions add types (e.g. notifications/tasks).
The server MUST send notifications/subscriptions/acknowledged as the first message of the subscription, with io.modelcontextprotocol/subscriptionId in _meta, and MUST NOT send any notification for that subscription before it. The acknowledgement's notifications field reflects the subset the server accepts (unsupported entries are omitted); the client SHOULD compare it with what it requested.
{ "jsonrpc": "2.0", "method": "notifications/subscriptions/acknowledged", "params": {
"_meta": { "io.modelcontextprotocol/subscriptionId": 1 },
"notifications": { "toolsListChanged": true, "resourceSubscriptions": ["file:///project/config.json"] } } }
Over stdio, ordering is defined per subscription, not per channel: messages from other subscriptions may be interleaved before the acknowledgement.
All of them carry io.modelcontextprotocol/subscriptionId = the JSON-RPC id of the subscriptions/listen. Over stdio, the client MUST use it to correlate. A client MAY have several concurrent subscriptions.
{ "jsonrpc": "2.0", "method": "notifications/resources/updated", "params": {
"_meta": { "io.modelcontextprotocol/subscriptionId": 1 }, "uri": "file:///project/config.json" } }
What does not travel over this stream: notifications/progress and notifications/message, which go on the stream of the request they belong to.
A subscription ends when:
notifications/cancelled carrying the listen's id (stdio).subscriptions/listen with a complete result (which carries subscriptionId in _meta) and then close; this is the only situation in which the server sends notifications/cancelled (see lesson 5.4).A client that receives the complete response knows it was an orderly close; if the transport drops without it, the client MAY reconnect. Over stdio, after reconnecting the client MUST resend subscriptions/listen: the server does not keep subscriptions across connections.
The response to the subscriptions/listen POST is an SSE stream that stays open. Servers should emit periodic SSE comments (:) as keep-alives and X-Accel-Buffering: no. There is no resumability: after a drop, the stream is reopened and whatever was in flight is lost (invalidation is recovered via ttlMs and a refetch).
subscriptionId per host.list_changed as an audit signal: trigger an immediate tools/list, compare hashes and alert on schema/description changes (rug pull).resources/subscribe. Your era translator covers both.1. What must the first message of a subscription be?
The acknowledgement is mandatory and precedes any notification for that subscription.
2. What value does io.modelcontextprotocol/subscriptionId hold?
It correlates with the id of the listen request that opened the stream.
3. Does notifications/progress travel over the listen stream?
Progress and logs are request-scoped and never go over the listen.
4. After reconnecting a stdio process, what happens to the subscriptions?
The server keeps no subscription state across connections.