mcp: Deprecate roots, sampling and logging (SEP-2577) (#1017)

Fixes #1013
This commit is contained in:
Guglielmo Colombo 2026-06-23 11:11:08 +02:00 • committed by GitHub
commit b6649db4f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,6 +10,13 @@
## Roots
> **Note:** The roots feature is deprecated as of protocol version 2026-07-28
> ([SEP-2577](https://modelcontextprotocol.io/seps/2577-deprecate-roots-sampling-and-logging)).
> It remains fully functional during the deprecation window (at least twelve
> months). The SDK continues to support roots for compatibility. New code
> should pass paths via tool parameters, resource URIs, or configuration
> instead.
MCP allows clients to specify a set of filesystem
["roots"](https://modelcontextprotocol.io/specification/2025-06-18/client/roots).
The SDK supports this as follows:
@ -77,6 +84,13 @@ func Example_roots() {
## Sampling
> **Note:** The sampling feature is deprecated as of protocol version
> 2026-07-28
> ([SEP-2577](https://modelcontextprotocol.io/seps/2577-deprecate-roots-sampling-and-logging)).
> It remains fully functional during the deprecation window (at least twelve
> months). The SDK continues to support sampling for compatibility. Servers
> that need LLM completions should call LLM provider APIs directly.
[Sampling](https://modelcontextprotocol.io/specification/2025-06-18/client/sampling)
is a way for servers to leverage the client's AI capabilities. It is
implemented in the SDK as follows: