Title: Deprecate Server.__init__ handlers for removed capabilities by Kludex · Pull Request #3002 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Deprecate Server.__init__ handlers for removed capabilities by Kludex · Pull Request #3002 · modelcontextprotocol/python-sdk
X Title: Deprecate Server.__init__ handlers for removed capabilities by Kludex · Pull Request #3002 · modelcontextprotocol/python-sdk
Description: The 2026-07-28 spec deprecates Logging and Roots (SEP-2577) and the client-to-server progress notification. This deprecates the corresponding lowlevel Server.__init__ handler parameters: on_set_logging_level (Logging), on_roots_list_changed (Roots), and on_progress (client-to-server progress). What changed Server.__init__ is split into two @overloads: a clean signature without the three deprecated parameters, and a typing_extensions.deprecated overload with them. Passing any of the three resolves to the deprecated overload, so type checkers and IDEs flag it. The real constructor emits MCPDeprecationWarning at runtime when a deprecated handler is passed, with messages matching the existing SEP-2577 / progress wording (so the project's existing filterwarnings ignores already cover them). The non-deprecated overload omits the parameters entirely, keeping the common case warning-free. Existing call sites that intentionally register these handlers (to advertise the capability) carry # pyright: ignore[reportDeprecated]; the stdio subprocess test helper guards construction with warnings.catch_warnings() since the global pytest filter doesn't reach the child process. Documented in docs/migration.md, grouped into the existing SEP-2577 section. 100% coverage on the touched module; pyright, ruff, strict-no-cover, and the full suite pass. AI Disclaimer This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.
Open Graph Description: The 2026-07-28 spec deprecates Logging and Roots (SEP-2577) and the client-to-server progress notification. This deprecates the corresponding lowlevel Server.__init__ handler parameters: on_set_log...
X Description: The 2026-07-28 spec deprecates Logging and Roots (SEP-2577) and the client-to-server progress notification. This deprecates the corresponding lowlevel Server.__init__ handler parameters: on_set_log...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/3002
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:8d184042-c7b6-8654-1a06-8f431cc43ef0 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9260:1A0701:BBDA28:109703C:6A5A17E7 |
| html-safe-nonce | d0e5fb0e30eb6914bb2de604535a3cc329414cb8b343e460a7c1334f6cebd1be |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjYwOjFBMDcwMTpCQkRBMjg6MTA5NzAzQzo2QTVBMTdFNyIsInZpc2l0b3JfaWQiOiI0MjcyMTE3NDY2MTc5MTgwNTE5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 61b5aa853e91b110b5df07a1d6f7d5b7a22f0aaee0099b68d1707327532a93a7 |
| hovercard-subject-tag | pull_request:3943302192 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/3002/files |
| twitter:image | https://avatars.githubusercontent.com/u/7353520?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/7353520?s=400&v=4 |
| og:image:alt | The 2026-07-28 spec deprecates Logging and Roots (SEP-2577) and the client-to-server progress notification. This deprecates the corresponding lowlevel Server.__init__ handler parameters: on_set_log... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8c2fe7351e4e987cb8f75e2425a0b895d807779bc4c2d3c312be0a54082219f7 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 501ec24a694e4933bb3d70e768b1461c0def57a2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width