Remove Server#notify_progress broadcast API#276
Merged
koic merged 1 commit intomodelcontextprotocol:mainfrom Mar 29, 2026
Merged
Remove Server#notify_progress broadcast API#276koic merged 1 commit intomodelcontextprotocol:mainfrom
Server#notify_progress broadcast API#276koic merged 1 commit intomodelcontextprotocol:mainfrom
Conversation
## Motivation and Context `Server#notify_progress` broadcasts progress notifications to all connected clients. Progress notifications are tied to a specific request's `progressToken` and have no meaningful broadcast use case. Neither the Python SDK nor the TypeScript SDK provides a server-level progress broadcast capability. The MCP specification requires that progress notifications only reference tokens provided in an active request: > Progress notifications MUST only reference tokens that: > - Were provided in an active request > - Are associated with an in-progress operation Ref: https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/progress Broadcasting progress to all clients does not comply with this requirement, since clients that did not originate the request have no matching `progressToken`. The introduction of `ServerSession` for per-connection state (modelcontextprotocol#275) made this removal possible: `Progress` and `ServerContext` now use `notification_target:` (a `ServerSession`) to route notifications to the originating session only. ### Changes - Removed `Server#notify_progress` entirely. The method is no longer needed as `notification_target` in `call_tool_with_args` now passes `session` directly (nil when no session is available, in which case `Progress#report` and `ServerContext#notify_log_message` are no-ops). - Removed `ServerContext#notify_progress` as well. Progress notifications should only be sent via `server_context.report_progress`, which enforces the correct `progressToken` from the originating request. - Added nil guards to `Progress#report` and `ServerContext#notify_log_message` for when no session is available. - Rewrote progress tests to use `ServerSession#handle` instead of `Server#handle`, reflecting that progress notifications are always session-scoped. - Removed 4 tests that called `server.notify_progress` directly as a public broadcast API. - Removed `notify_progress` from the README.md notification methods list. - Removed the "Server-Side: Direct `notify_progress` Usage" section from the README.md. Progress notifications should be sent via `server_context.report_progress` inside tool handlers, which automatically scopes them to the originating client session. ## Breaking Changes Progress notifications are scoped to a specific request via `progressToken` per the MCP specification, so the broadcast behavior of `Server#notify_progress` was a spec violation. This is treated as a bug fix and is made without a deprecation period. This aligns the Ruby SDK with the Python and TypeScript SDKs, neither of which provides a server-level progress broadcast API. `Server#notify_progress` and `ServerContext#notify_progress` are no longer available. Users should use `server_context.report_progress` inside tool handlers instead, which provides session-scoped delivery with the correct `progressToken`. This feature was only recently introduced in mcp 0.9.0: https://github.com/modelcontextprotocol/ruby-sdk/releases/tag/v0.9.0 So an early release should help limit its impact on adoption.
atesgoral
approved these changes
Mar 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Server#notify_progressbroadcasts progress notifications to all connected clients. Progress notifications are tied to a specific request'sprogressTokenand have no meaningful broadcast use case. Neither the Python SDK nor the TypeScript SDK provides a server-level progress broadcast capability.The MCP specification requires that progress notifications only reference tokens provided in an active request:
Ref: https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/progress
Broadcasting progress to all clients does not comply with this requirement, since clients that did not originate the request have no matching
progressToken.The introduction of
ServerSessionfor per-connection state (#275) made this removal possible:ProgressandServerContextnow usenotification_target:(aServerSession) to route notifications to the originating session only.Changes
Server#notify_progressentirely. The method is no longer needed asnotification_targetincall_tool_with_argsnow passessessiondirectly (nil when no session is available, in which caseProgress#reportandServerContext#notify_log_messageare no-ops).ServerContext#notify_progressas well. Progress notifications should only be sent viaserver_context.report_progress, which enforces the correctprogressTokenfrom the originating request.Progress#reportandServerContext#notify_log_messagefor when no session is available.ServerSession#handleinstead ofServer#handle, reflecting that progress notifications are always session-scoped.server.notify_progressdirectly as a public broadcast API.notify_progressfrom the README.md notification methods list.notify_progressUsage" section from the README.md.Progress notifications should be sent via
server_context.report_progressinside tool handlers, which automatically scopes them to the originating client session.Breaking Changes
Progress notifications are scoped to a specific request via
progressTokenper the MCP specification, so the broadcast behavior ofServer#notify_progresswas a spec violation. This is treated as a bug fix and is made without a deprecation period. This aligns the Ruby SDK with the Python and TypeScript SDKs, neither of which provides a server-level progress broadcast API.Server#notify_progressandServerContext#notify_progressare no longer available. Users should useserver_context.report_progressinside tool handlers instead, which provides session-scoped delivery with the correctprogressToken.This feature was only recently introduced in mcp 0.9.0: https://github.com/modelcontextprotocol/ruby-sdk/releases/tag/v0.9.0
So an early release should help limit its impact on adoption.
Types of changes
Checklist