new·Earn with mozg — 20% of every monthSend somebody here and take a fifth of every plan payment they make, for as long as they keep paying — not a bounty on the first invoice. Your handle is the link, the window is thirty days, and the commission lands on your balance the second they pay. Free to join: if you have signed in, you already have the link. mozg.sh/earnall news →
mozg.beta
Sign in

MCP · Specification · all subjects

subscriptions & notifications

9 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

subscriptions/listen server rules for notifications

The server MUST NOT send notification types the client has not explicitly requested. The server MUST send notifications/subscriptions/acknowledged as the first message with the subscription's ID in _meta under io.modelcontextprotocol/subscriptionId, and MUST NOT send any notification on the subscription before it. The notifications field in the acknowledgment reflects the subset the server agreed to honor, with omitted notification types the server does not support.

Subscription ID correlation in notifications

All notifications delivered on the stream carry io.modelcontextprotocol/subscriptionId in _meta, identifying the subscriptions/listen request that opened the stream. The value is the JSON-RPC ID of the subscriptions/listen request. On stdio where all messages share a single channel, clients MUST use this field to correlate notifications with their originating subscription.

Multiple concurrent subscriptions support

A client MAY have multiple active subscriptions concurrently. Each subscription is identified by the JSON-RPC request ID of its subscriptions/listen request, and every notification on the stream carries that ID in io.modelcontextprotocol/subscriptionId so clients can demultiplex them.

Notification filter: toolsListChanged field

The toolsListChanged field is a boolean in the notifications filter that indicates the client wants to receive notifications/tools/list_changed when tools change.

Notification filter: promptsListChanged field

The promptsListChanged field is a boolean in the notifications filter that indicates the client wants to receive notifications/prompts/list_changed when prompts change.

Notification filter: resourcesListChanged field

The resourcesListChanged field is a boolean in the notifications filter that indicates the client wants to receive notifications/resources/list_changed when the resources list changes.

Notification filter: resourceSubscriptions field

The resourceSubscriptions field is a string array of resource URIs in the notifications filter that indicates the client wants to receive notifications/resources/updated for those specific resource URIs.

Client handling of unsupported notification types

The client SHOULD check the acknowledged filter against what it requested and handle any unsupported types gracefully.

stdio subscription ordering rules

On stdio where every subscription shares one channel, the ordering of the acknowledgment message is defined per subscription ID and not per channel. Messages belonging to other subscriptions MAY be interleaved before the acknowledgment.

Give your agent this brain

subscriptions & notifications — MCP · Specification