Repository navigation
Python: Update mcp requirement from <2.0,>=1.26.0 to >=1.26.0,<3.0 in /python - #14256
dependabot[bot] wants to merge 3 commits into
Conversation
Updates the requirements on [mcp](https://github.com/modelcontextprotocol/python-sdk) to permit the latest version. - [Release notes](https://github.com/modelcontextprotocol/python-sdk/releases) - [Changelog](https://github.com/modelcontextprotocol/python-sdk/blob/main/RELEASE.md) - [Commits](modelcontextprotocol/python-sdk@v1.26.0...v2.0.0) --- updated-dependencies: - dependency-name: mcp dependency-version: 2.0.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.
Updates the mcp dependency constraint to allow newer major versions while keeping the minimum version floor unchanged.
Changes:
- Relax
mcpupper bound from<2.0to<3.0in main dependencies. - Relax
mcpupper bound from<2.0to<3.0in the optionalmcpextra.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # explicit typing extensions | ||
| "typing-extensions>=4.13", | ||
| "mcp>=1.26.0,<2.0", | ||
| "mcp>=1.26.0,<3.0", |
| ] | ||
| mcp = [ | ||
| "mcp>=1.8,<2.0", | ||
| "mcp>=1.8,<3.0", |
There was a problem hiding this comment.
Automated Code Review
Reviewers: 5 | Confidence: 45%
✓ Correctness
The PR raises the mcp upper bound from <2.0 to <3.0 in two places in pyproject.toml. The version specifiers are syntactically valid PEP 440. The key concern—whether the codebase is actually compatible with mcp 2.x's breaking API changes—was already raised in the existing unresolved review comments and I will not duplicate it. No additional correctness issues found in the diff itself.
✓ Security Reliability
This PR widens the mcp dependency from <2.0 to <3.0, admitting the breaking mcp 2.x major version. The existing unresolved review comments correctly identify the core reliability risk: mcp 2.x introduces breaking API changes (FastMCP renamed to MCPServer, Client replaces ClientSession, removed env vars, changed auth flows) with no corresponding code or test updates in this PR. Without verifying the actual mcp usage in the codebase (tool access issues prevented file reads), I cannot add new specific inline findings beyond what the existing review thread already covers.
✓ Test Coverage
This PR widens the mcp dependency upper bound from <2.0 to <3.0, admitting the newly released mcp 2.x which contains significant breaking changes (renamed classes like FastMCP→MCPServer, removed ClientSession layering, changed Client API). The diff contains zero code changes and zero test changes to verify compatibility with mcp 2.x. The previous review comments already flaged the lack of compatibility verification. From a test-coverage perspective, there is no evidence that the existing test suite has been run against mcp 2.x, nor are there any new tests or CI matrix entries to validate the wider range.
✓ Failure Modes
This PR widens the mcp dependency upper bound from <2.0 to <3.0. The existing review thread already notes the risk of admitting mcp 2.x (a major version with documented breaking API changes) without corresponding code adaptations or test coverage. I was unable to access repository files to verify specific import sites or concrete runtime failure paths with file:line evidence, so I cannot add new findings beyond what has already been flaged.
✓ Design Approach
No additional design-approach findings to add from this diff. The only apparent concern is the same broad major-version expansion already covered by the existing unresolved review comments, and I did not find a distinct, well-supported issue to restate here.
Automated review by dependabot[bot]'s agents
| # explicit typing extensions | ||
| "typing-extensions>=4.13", | ||
| "mcp>=1.26.0,<2.0", | ||
| "mcp>=1.26.0,<3.0", |
There was a problem hiding this comment.
Widening to <3.0 admits mcp 2.x which has documented breaking changes (FastMCP→MCPServer, new Client API, removal of ClientSession). Without corresponding code adaptations or test results showing the existing MCP integration tests pass under mcp 2.x, this risks runtime failures. At minimum, please provide CI evidence that python/tests/ MCP-related tests pass with mcp>=2.0 installed, or add compatibility shims/tests.
Eduard van Valkenburg (eavanvalkenburg)
left a comment
There was a problem hiding this comment.
Review finding (blocking): Allowing MCP 2.x breaks the MCP connector import
This permits mcp==2.0.0, but python/semantic_kernel/connectors/mcp.py still imports mcp.client.websocket.websocket_client. MCP 2.0.0 no longer contains that module, so a clean install resolving 2.x fails while importing the connector. Please keep the upper bound below 2.0 until the connector is migrated, or update and gate the removed websocket path in the same change.
Eduard van Valkenburg (eavanvalkenburg)
left a comment
There was a problem hiding this comment.
Review finding (blocking): Allowing MCP 2.x breaks the MCP connector import
This permits mcp==2.0.0, but python/semantic_kernel/connectors/mcp.py still imports mcp.client.websocket.websocket_client. MCP 2.0.0 no longer contains that module, so a clean install resolving 2.x fails while importing the connector. Please keep the upper bound below 2.0 until the connector is migrated, or update and gate the removed websocket path in the same change.
|
Copilot Make the MCP requirement compatible with the connector. Either retain |
Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
Restored both MCP constraints to |
|
Superseded by #14552, which consolidates the reviewed Python dependency updates into one PR. |
|
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting If you change your mind, just re-open this PR and I'll resolve any conflicts on it. |
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Consolidates the currently open Python Dependabot updates into one reviewable pull request while preserving the compatibility fixes already applied to those PRs. Supersedes microsoft#14463, microsoft#14462, microsoft#14456, microsoft#14393, microsoft#14392, microsoft#14391, microsoft#14336, and microsoft#14256. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> - Updates the root Python dependency ranges for `google-genai` and `websockets`. - Keeps `mistralai` on its compatible 1.x API and retains the existing `mcp<2.0` bound because both 2.x updates break current connectors. - Updates `onnxruntime-genai` to 0.15.2 for Python 3.11+ while retaining 0.9.0 for Python 3.10. - Updates the root lockfile to `anyio` 4.14.2, `soupsieve` 2.9, `google-genai` 1.75.0, `websockets` 16.1.1, and the compatible ONNX GenAI pins. - Updates the OAuth server lockfile to `anyio` 4.14.2 and removes its obsolete `sniffio` dependency. - Regenerates and validates the lockfiles with the CI-pinned `uv` 0.5.31. Validation: - `uvx --from 'uv==0.5.31' uv lock --check` passed for both lockfiles. - `uvx --from 'uv==0.5.31' uv sync --all-extras --dev --frozen --quiet` passed. - `uvx --from 'uv==0.5.31' uv run --frozen pytest ./tests/unit --ignore=tests/unit/processes/dapr_runtime` passed. - The OAuth server dependency environment resolves with `uv sync --frozen --no-install-project`; its editable package build remains blocked by the sample's pre-existing missing `README.md`. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
Updates the requirements on mcp to permit the latest version.
Release notes
Sourced from mcp's releases.
... (truncated)
Commits
6f69a37Present v2 as the stable release across the README, docs, and policies (#3178)78e6fbbServe v2 docs at the site root, with permanent per-major paths (#3176)af06330Remove unused StreamableHTTPTransport.get_session_id() (#3205)68ca87eDocument the two-line release process for stable v2 (#3179)c9c431bExpose the middleware chain on MCPServer and stop sending unrequested change ...528e366Fail fast on server-to-client requests in JSON-response mode instead of hangi...27f5cc7Remove unused mcpserver.exceptions.ValidationError (#3199)89c5e70Gate log notifications on the per-request log-level opt-in at 2026-07-28 (#3198)b61ce38docs: fix off-by-one hl_lines in apps.md (#3196)b7c9a91Add mcp.types as a permanent alias for mcp_types (#3190)You can trigger a rebase of this PR by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)