Skip to main content

Module subscriptions

Module subscriptions 

Source
Expand description

MCP resource subscription manager.

Tracks which resource URIs have been subscribed to by the connected MCP client. When a tool call mutates state that corresponds to a subscribed resource, the server sends a notifications/resources/updated notification to the client so it can re-fetch the resource.

Because MCP stdio transport is single-client, we only need to track one peer’s subscriptions. The manager stores the set of subscribed URIs and provides a method to determine which URIs should be notified after a particular category of mutation.

Structs§

SubscriptionManager
Manages resource subscriptions for the connected MCP client.

Enums§

MutationKind
Categories of mutations that affect resources. When a tool call completes, it reports which categories of data changed, and the SubscriptionManager maps those to affected resource URIs.