Deprecate roots, sampling, and logging per SEP-2577#406
Conversation
d8066ae to
6cabe09
Compare
0e694e3 to
460adaf
Compare
26a27ad to
9533204
Compare
3f8cf4a to
0c7a871
Compare
Warn when Roots, Sampling, or Logging APIs are used with MCP protocol version 2026-07-28, while leaving the latest stable default at 2025-11-25. Add a shared protocol deprecation helper, YARD deprecation notes, and regression tests covering warnings for 2026-07-28 and no warnings for older protocol versions. Closes modelcontextprotocol#390
0c7a871 to
be41c3c
Compare
|
@koic Happy to push this through or were you thinking of doing the deprecation later? |
|
I'd lean toward doing the deprecation later rather than merging the full behavior change now. This SEP introduces a behavioral switch tied to protocol versioning, and I think that design makes sense because it preserves compatibility with existing protocol versions. However, the 2026-07-28 specification hasn't actually been released yet, and it doesn't appear to have been added to Given that, I'd prefer to wait until the 2026-07-28 release is closer before enabling the deprecation behavior. In the meantime, it might be reasonable to land the advisory annotations on their own. |
|
@koic Sounds good! I can split out the advisory. |
Split the advisory YARD @deprecated annotations out of modelcontextprotocol#406 so the documentation can land ahead of the 2026-07-28 protocol release. Per maintainer feedback, this drops the protocol-version-gated runtime Kernel.warn behavior and the new 2026-07-28 supported protocol version, leaving only the @deprecated notes for the Roots, Sampling, and Logging APIs deprecated by SEP-2577. Refs modelcontextprotocol#390 Co-authored-by: 🦞 Qlaw <noreply@qlaw.quick.shopify.io>
|
Split the advisory annotations out into #429 so they can land independently of the protocol-version behavior change. I'll keep this PR open for the |
TL;DR
Deprecate MCP Roots, Sampling, and Logging only when protocol version
2026-07-28is negotiated or explicitly configured.Context
SEP-2577 deprecates Roots, Sampling, and Logging in the
2026-07-28protocol version.Closes #390
Changes
2026-07-28as an explicitly supported stable protocol version while keepingLATEST_STABLE_PROTOCOL_VERSIONat2025-11-25.Kernel.warnmessages only for2026-07-28.2026-07-28.@deprecatednotes and regression tests for both warning and no-warning behavior.Testing
GEM_HOME="$PWD/.gem-test" GEM_PATH="$PWD/.gem-test:/nix/store/jh918yiwd5cs4pjg005ac32m2q7ckw3l-ruby-4.0.5/lib/ruby/gems/4.0.0" bundle exec rake testGEM_HOME="$PWD/.gem-test" GEM_PATH="$PWD/.gem-test:/nix/store/jh918yiwd5cs4pjg005ac32m2q7ckw3l-ruby-4.0.5/lib/ruby/gems/4.0.0" bundle exec rake rubocopgit diff --check