You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP: let the application turn resource subscriptions off #1751
Follow-up to #1700. Found while moving an MCP server onto org.restlet.ext.mcp (naftiko/ikanos#838).
As soon as an McpServerAdapter has a resource or a resource template, server/discover advertises capabilities.resources.subscribe: true. The application can't turn it off: McpModernFeatures.Resources.supportsSubscribe() returns true unconditionally, and the SDK's ResourcesFeature passes it on to the capabilities.
A server that serves resources but never broadcasts resource updates then makes a false promise. A client that reads the capability subscribes to a resource and waits for notifications/resources/updated that never come, instead of polling or re-reading.
The other subscription fields are already under the application's control: getSubscriptions() declares the application's own fields, and setSubscriptionRestriction narrows what a client may subscribe to. Only this capability flag is fixed.
Delivery:
Let the application say whether resource subscriptions are served, for example a setter on McpServerAdapter (default true, so nothing changes for existing applications), read by Resources.supportsSubscribe().
When it is off, server/discover advertises resources without subscribe, and a subscriptions/listen that asks for resource updates is answered as for any field the server doesn't honour.
Check what the legacy 2025-11-25 edge advertises in initialize and answers to resources/subscribe, so both eras agree.
Document the setting next to getChanges() in the McpServerAdapter javadoc.
Activity
MCP: let the application turn resource subscriptions off
jlouvel commentedon Dec 1, 2026
Fixed by #1775, merged into 3.0.