Title: Remove Tasks (SEP-1686) from the SDK by maxisbey · Pull Request #2714 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Remove Tasks (SEP-1686) from the SDK by maxisbey · Pull Request #2714 · modelcontextprotocol/python-sdk
X Title: Remove Tasks (SEP-1686) from the SDK by maxisbey · Pull Request #2714 · modelcontextprotocol/python-sdk
Description: Tasks (SEP-1686) have been removed from the MCP specification (modelcontextprotocol/modelcontextprotocol#2663) and will return as a separate extension. This removes all task-related code, types, examples, tests, and documentation from the SDK. Motivation and Context The original Tasks SEP that landed in the 2025-11-25 spec has been pulled from the draft schema and is moving to an extension. Keeping the experimental implementation around would mean maintaining ~13k lines against a moving target that no longer matches the spec, so this strips it entirely. When the extension lands it can be re-added against the new shape. How Has This Been Tested? ./scripts/test — full suite, 100% coverage, strict-no-cover clean pyright, ruff, pre-commit hooks all pass uv lock regenerated to drop the four simple-task* workspace members Breaking Changes Yes (v2 only — main is already a breaking-change branch). Documented in docs/migration.md: All Task* / *TasksCapability types, ToolExecution, and Tool.execution removed from mcp.types RequestParams.task, ClientCapabilities.tasks, ServerCapabilities.tasks removed mcp.{client,server,shared}.experimental and mcp.server.lowlevel.experimental packages removed experimental properties removed from ClientSession / ServerSession / Server; experimental field removed from ServerRequestContext BaseSession.add_response_router and mcp.shared.response_router removed 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 A few non-obvious decisions: CancelledNotificationParams.request_id stays RequestId | None. The Tasks PR made it optional, but the draft schema kept it that way after removing tasks, so only the task-referencing docstring was changed. BaseSession._handle_response is kept (with the router-dispatch loop stripped). The extraction from _receive_loop plus the null-ID error handling is a standalone improvement that doesn't depend on tasks. server/validation.py is kept. It's a non-task refactor of sampling-tools validation that #1645 happened to extract; only the "task-augmented" wording in the module docstring was dropped. ResponseRouter, ServerSession.send_message, and the _build_*_request helpers are deleted rather than kept as "generic plumbing" — they had zero non-task callers, and keeping them would have required either pragmas or synthetic tests for the 100% coverage requirement. Added tests/server/test_session.py::test_check_client_capability because the experimental task tests were the only thing exercising that public method. AI Disclaimer
Open Graph Description: Tasks (SEP-1686) have been removed from the MCP specification (modelcontextprotocol/modelcontextprotocol#2663) and will return as a separate extension. This removes all task-related code, types, ex...
X Description: Tasks (SEP-1686) have been removed from the MCP specification (modelcontextprotocol/modelcontextprotocol#2663) and will return as a separate extension. This removes all task-related code, types, ex...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2714
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:dcae6cc2-4156-bfc0-e5bb-74b0237d983b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CD82:1386D9:1454DE8:1D32412:6A58F082 |
| html-safe-nonce | 1ab787a181fdb613ae90b4498a902966fc53f68c502b6caa63ddc2d6f1112686 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDgyOjEzODZEOToxNDU0REU4OjFEMzI0MTI6NkE1OEYwODIiLCJ2aXNpdG9yX2lkIjoiNTU1NzgwODUwODgyODE4NDcwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c8b8af702b7d68999f2e693238770f93166fc59b48695e75b824eca7b7e53598 |
| hovercard-subject-tag | pull_request:3767723303 |
| 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/2714/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 | Tasks (SEP-1686) have been removed from the MCP specification (modelcontextprotocol/modelcontextprotocol#2663) and will return as a separate extension. This removes all task-related code, types, ex... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| 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 | 8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width