chore(deps): cap mcp below 2.0 - #35
Merged
Merged
Conversation
MCP SDK 2.0 removes `mcp.server.fastmcp` entirely — `FastMCP` is now `MCPServer` under `mcp.server.mcpserver`, `ToolError` moves with it, and the transport settings (`stateless_http`, `json_response`, `transport_security`, host/port/path) move off the constructor and `.settings` onto `streamable_http_app()` / `run_streamable_http_async()`. The adapter does not import under 2.0, so every MCP and parity test errors at collection. Cap the range so dependabot keeps delivering 1.x updates (1.29.0 verified against the current adapter) instead of opening a major bump that reads as a routine dependency PR. Lifting the cap is the migration's job. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR prevents the MCP adapter from breaking due to the upstream mcp SDK 2.x major release by capping the allowed dependency range to <2, keeping the project on the compatible 1.x line.
Changes:
- Cap
mcpto<2inpyproject.tomlso future dependency updates don’t pull in the breaking 2.x major. - Mirror the cap in
uv.lockso the lock metadata reflects the capped requirement.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pyproject.toml | Adds an explicit <2 upper bound on mcp with an explanatory comment about the 2.x breaking import/API changes. |
| uv.lock | Updates the locked project metadata (requires-dist) to include the same mcp>=1.28.1,<2 constraint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#33 bumps
mcp1.28.1 → 2.0.0, a breaking major that arrived inside a routine-looking dependency PR. CI never reported it — the ruff failure (#34) fails the job first — but the adapter does not import under 2.0:tests/test_mcp.pyandtests/test_parity.pyboth error at collection; theidc-mcpentry point is dead.SDK 2.0 removes
mcp.server.fastmcpentirely (FastMCP→MCPServerundermcp.server.mcpserver), movesToolErrorwith it, and moves the transport settings —stateless_http,json_response,transport_security, host/port/path — off the constructor and.settingsontostreamable_http_app()/run_streamable_http_async().What
Cap the range at
<2so dependabot keeps delivering 1.x updates instead of reopening the major.1.29.0(released the same day as 2.0.0) is verified working against the current adapter with no deprecation warnings, so the 1.x line is still live.Lifting the cap is the migration's job — drafted in 36, stacked on this branch. Worth letting 2.0 collect a patch release or two first: it shipped 2026-07-28, and it pulls in a new transitive surface (
mcp-types,opentelemetry-api,truststore, andhttpx2/httpcore2— Pydantic's httpx fork) plus apydantic>=2.12floor.Unblocks #33 (together with #34).
🤖 Generated with Claude Code