Repository navigation
mcp: drop roots list_changed and standalone roots/list on 2026-07-28 - #1540
Open
nahapetyan-serob wants to merge 1 commit into
Open
nahapetyan-serob wants to merge 1 commit into
nahapetyan-serob wants to merge 1 commit into
Conversation
nahapetyan-serob
requested review from
guglielmo-san
and
a balanced review from Copilot
November 20, 2026 18:13
There was a problem hiding this comment.
🟡 Changes recommended
Stateless HTTP still dispatches notifications/roots/list_changed for protocol version 2026-07-28 because temporary sessions lack a recorded version and the suppression check does not fall back to the HTTP header.
1 open issue
What changed in this PR
Updates the Go SDK’s roots handling for protocol version 2026-07-28, moving modern sessions toward on-demand, multi-round-trip roots requests while preserving legacy behavior.
Changes:
- Suppresses roots-change notifications and omits
roots.listChangedfrom modern client capabilities. - Rejects standalone
roots/listcalls on modern clients and filters removed notifications on servers. - Adds protocol-specific tests and updates documentation and expected example output.
| File | Description |
|---|---|
mcp/transport_example_test.go |
Updates expected discovery output to advertise roots: {}. |
mcp/server.go |
Filters removed notifications using the session protocol version. |
mcp/server_test.go |
Tests roots-change notification handling across protocol versions. |
mcp/client.go |
Applies version-specific roots capabilities, notification filtering, and request rejection. |
mcp/client_test.go |
Tests modern capabilities and standalone roots request rejection; pins legacy cases. |
mcp/capabilities_test.go |
Checks sent and received roots notifications by protocol version. |
internal/docs/client.src.md |
Documents modern roots behavior in the documentation source. |
docs/troubleshooting.md |
Updates the generated logging example’s expected capabilities. |
docs/client.md |
Includes the generated explanation of modern roots behavior. |
Review effort: Balanced
| } | ||
| } | ||
| case notificationInitialized, notificationRootsListChanged: | ||
| if ss.protocolVersion() >= protocolVersion20260728 { |
This branch has not been deployed
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.

SEP-2575 removes
notifications/roots/list_changedand the standaloneroots/listrequest in protocol version 2026-07-28; servers read roots on demand through a multi round-tripListRootsRequest. On new-protocol sessions:notifications/roots/list_changed
Client.AddRootsandClient.RemoveRootsupdate the client's roots without notifying the server.rootscapability withoutlistChanged, which the 2026-07-28 schema no longer has.RootsListChangedHandlerfor an incoming notification. The existing check read the request's_meta, which notifications don't carry, so it never fired.notifications/initializedhad the same problem and is fixed the same way.roots/list
ServerSession.ListRootsrefuses to send a standaloneroots/list.roots/listwithCodeMethodNotFound.Behavior on older protocol versions is unchanged.