Skip to content

feat: deprecate roots, sampling, and logging for 2026-07-28#406

Open
atesgoral wants to merge 1 commit into
modelcontextprotocol:mainfrom
atesgoral:issue-390-deprecations
Open

feat: deprecate roots, sampling, and logging for 2026-07-28#406
atesgoral wants to merge 1 commit into
modelcontextprotocol:mainfrom
atesgoral:issue-390-deprecations

Conversation

@atesgoral

@atesgoral atesgoral commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Deprecate MCP Roots, Sampling, and Logging only when protocol version 2026-07-28 is negotiated or explicitly configured.

Context

SEP-2577 deprecates Roots, Sampling, and Logging in the 2026-07-28 protocol version.

Closes #390

Changes

  • Add 2026-07-28 as an explicitly supported stable protocol version while keeping LATEST_STABLE_PROTOCOL_VERSION at 2025-11-25.
  • Add a shared protocol deprecation helper that emits Kernel.warn messages only for 2026-07-28.
  • Warn on deprecated server APIs and session-scoped calls for roots, sampling, and logging.
  • Warn client transports when deprecated roots or sampling capabilities are used with negotiated protocol version 2026-07-28.
  • Add YARD @deprecated notes and regression tests for both warning and no-warning behavior.
  • Update the changelog.

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 test
  • 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 rubocop
  • git diff --check

@atesgoral atesgoral force-pushed the issue-390-deprecations branch 4 times, most recently from d8066ae to 6cabe09 Compare June 14, 2026 15:04
@atesgoral atesgoral changed the base branch from main to rubocop-cleanup-existing-offenses June 14, 2026 15:04
@atesgoral atesgoral force-pushed the rubocop-cleanup-existing-offenses branch from 0e694e3 to 460adaf Compare June 14, 2026 15:46
@atesgoral atesgoral force-pushed the issue-390-deprecations branch 2 times, most recently from 26a27ad to 9533204 Compare June 15, 2026 07:03
@atesgoral atesgoral changed the base branch from rubocop-cleanup-existing-offenses to main June 15, 2026 07:03
@atesgoral atesgoral force-pushed the issue-390-deprecations branch 4 times, most recently from 3f8cf4a to 0c7a871 Compare June 15, 2026 07:39
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
@atesgoral atesgoral force-pushed the issue-390-deprecations branch from 0c7a871 to be41c3c Compare June 15, 2026 08:25
@atesgoral atesgoral marked this pull request as ready for review June 15, 2026 08:29
@atesgoral atesgoral requested a review from koic June 15, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SEP-2577: Deprecate Roots, Sampling, and Logging

1 participant