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
Deprecate roots, sampling, and logging per SEP-2577
SEP-2577 deprecates the Roots, Sampling, and Logging features as of the
2026-07-28 spec. The deprecation is advisory only: no wire-level changes,
capability negotiation is unchanged, and every type stays functional for
sessions negotiating 2025-11-25 and earlier.
Mark the 4 deprecated capability fields with `Annotated[T, deprecated(...)]`
(warns on access, sets the JSON-schema `deprecated` flag) and the 17 deprecated
type classes with a class-level `@deprecated`. The advisory runtime warning is
silenced via a scoped `filterwarnings` entry since the SDK still builds these
types internally to serve older sessions; the SDK's own references carry
`# pyright: ignore[reportDeprecated]`.
Drop the sampling-specific example snippet and its README section rather than
decorate user-facing docs with deprecation suppressions; trim the incidental
sampling callback from the general stdio client example.
Copy file name to clipboardExpand all lines: docs/migration.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1199,7 +1199,13 @@ Tasks are expected to return as a separate MCP extension in a future release.
1199
1199
1200
1200
## Deprecations
1201
1201
1202
-
<!-- Add deprecations below -->
1202
+
### Roots, Sampling, and Logging deprecated (SEP-2577)
1203
+
1204
+
[SEP-2577](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2577) deprecates the Roots, Sampling, and Logging features as of the 2026-07-28 spec. This is advisory only: there are no wire-level changes, capability negotiation is unchanged, and every type remains fully functional for sessions negotiating 2025-11-25 and earlier.
1205
+
1206
+
The deprecated capability fields (`ClientCapabilities.roots`, `ClientCapabilities.sampling`, `ClientCapabilities.tasks.requests.sampling`, `ServerCapabilities.logging`) and the associated types (`Root`, `ListRootsRequest`, `ListRootsResult`, `RootsListChangedNotification`, `CreateMessageRequest`/`Params`/`Result`, `SamplingMessage`, `ToolChoice`, `ToolUseContent`, `ToolResultContent`, `ModelPreferences`, `ModelHint`, `SetLevelRequest`/`Params`, `LoggingMessageNotification`/`Params`) are marked with `typing_extensions.deprecated`. Type checkers and IDEs surface a deprecation warning where downstream code uses them; at runtime, accessing a deprecated capability field or constructing a deprecated type emits a `DeprecationWarning`.
1207
+
1208
+
No migration is required during the deprecation window. New code should avoid building on these features, since they may be removed in a future spec version.
0 commit comments