Title: docs: fill migration guide gaps surfaced by automated upgrade eval by maxisbey · Pull Request #2412 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: docs: fill migration guide gaps surfaced by automated upgrade eval by maxisbey · Pull Request #2412 · modelcontextprotocol/python-sdk
X Title: docs: fill migration guide gaps surfaced by automated upgrade eval by maxisbey · Pull Request #2412 · modelcontextprotocol/python-sdk
Description: Fills gaps in docs/migration.md identified by an automated migration eval: 24 workers × 8 v1 codebases, each tasked with upgrading to v2 using only the migration guide. The eval surfaced 139 gap reports (20/24 successful migrations, 4 partial), aggregated into 10 priority findings and 10 minor friction points. Motivation and Context The eval showed real migration friction the doc didn't address — workers hit ImportError/ModuleNotFoundError/AttributeError and had to read SDK source to recover. These gaps would translate directly to support burden and failed upgrades for end users. Priority gaps fixed (commit 1): Context import path never shown (highest-frequency gap, ~9 reports) camelCase → snake_case field rename never stated as a rule Complete on_* handler reference table for lowlevel Server mcp.server.fastmcp.* submodule rename note create_connected_server_and_client_session removal — point to Client(server) instead MCPError raise-side constructor change mcp.shared.context module removal stated explicitly _meta example fixed to avoid progressToken alias confusion Documented _add_request_handler workaround for handlers MCPServer doesn't expose Minor gaps fixed (commit 2): sse_client params unchanged note Iterable[ReadResourceContents] added to read_resource wrapping example mcp.settings no longer holds transport fields; debug/log_level remain on constructor Context generic params 3→2 with before/after No public handler-introspection API note RootModel construction-side example (drop wrapper) follow_redirects=True added to primary streamable_http_client example with rationale Two gaps were skipped as not-migration-guide-territory (AnyUrl.path parsing, timedelta conversion). One gap (dependencies= removal) was skipped because the parameter was restored in #2358. How Has This Been Tested? All 34 from mcp... import statements in the doc's v2 code blocks were extracted and verified to resolve against the rebased code. Behavioral claims (camelCase/snake_case construction vs attribute access, MCPError constructor, _add_request_handler workaround, Context generics) were verified by running them against the installed package. Breaking Changes None — documentation only. Types of changes Bug fix (non-breaking change which fixes an issue) New feature (non-breaking change which adds functionality) Breaking change (fix or feature that would cause existing functionality to change) Documentation update Checklist I have read the MCP Documentation My code follows the repository's style guidelines New and existing tests pass locally I have added appropriate error handling I have added or updated documentation as needed Additional context The RequestParamsMeta TypedDict has an asymmetric key-transformation behavior (only progress_token gets aliased; extra keys pass through untouched) that this PR works around in the doc but doesn't fix in code — flagged for separate follow-up. AI Disclaimer
Open Graph Description: Fills gaps in docs/migration.md identified by an automated migration eval: 24 workers × 8 v1 codebases, each tasked with upgrading to v2 using only the migration guide. The eval surfaced 139 gap re...
X Description: Fills gaps in docs/migration.md identified by an automated migration eval: 24 workers × 8 v1 codebases, each tasked with upgrading to v2 using only the migration guide. The eval surfaced 139 gap re...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2412
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f4660e56-5b57-afaa-ee60-5b24fdfa5595 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B6CC:3239B0:125A4FE:18842D8:6A59B8C1 |
| html-safe-nonce | d2a3d38214089240e54d514c5e9b97b11bfac9e49d02ecd3549c1f3c96bbe77d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkNDOjMyMzlCMDoxMjVBNEZFOjE4ODQyRDg6NkE1OUI4QzEiLCJ2aXNpdG9yX2lkIjoiNDc3MTY0MzAxMDQ3NTIxMDk0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 95aaeeb643c46bcac206b8b92dba5df6d5ebd4af6bc93b16e254be775aa2017a |
| hovercard-subject-tag | pull_request:3508444262 |
| 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/2412/files |
| twitter:image | https://avatars.githubusercontent.com/u/224885523?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/224885523?s=400&v=4 |
| og:image:alt | Fills gaps in docs/migration.md identified by an automated migration eval: 24 workers × 8 v1 codebases, each tasked with upgrading to v2 using only the migration guide. The eval surfaced 139 gap re... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | ba3976babb66479b1c943a8edc0777d96157da48fadc0161f9ddb219deee8353 |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ab680789ae4a316cdaf0d5a292a1760140931cc4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width