Skip to content

chore(deps): cap mcp below 2.0 - #35

Merged
fedorov merged 1 commit into
mainfrom
chore/cap-mcp-major
Jul 31, 2026
Merged

chore(deps): cap mcp below 2.0#35
fedorov merged 1 commit into
mainfrom
chore/cap-mcp-major

Conversation

@fedorov

@fedorov fedorov commented Jul 31, 2026

Copy link
Copy Markdown
Member

Why

#33 bumps mcp 1.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.py:7:  from idc_api.mcp.server import mcp
src/idc_api/mcp/server.py:28: from mcp.server.fastmcp import FastMCP
E   ModuleNotFoundError: No module named 'mcp.server.fastmcp'

tests/test_mcp.py and tests/test_parity.py both error at collection; the idc-mcp entry point is dead.

SDK 2.0 removes mcp.server.fastmcp entirely (FastMCPMCPServer under mcp.server.mcpserver), moves ToolError with it, and moves the transport settings — stateless_http, json_response, transport_security, host/port/path — off the constructor and .settings onto streamable_http_app() / run_streamable_http_async().

What

Cap the range at <2 so 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, and httpx2/httpcore2 — Pydantic's httpx fork) plus a pydantic>=2.12 floor.

Unblocks #33 (together with #34).

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings July 31, 2026 18:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 mcp to <2 in pyproject.toml so future dependency updates don’t pull in the breaking 2.x major.
  • Mirror the cap in uv.lock so 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.

@fedorov
fedorov merged commit 00b9031 into main Jul 31, 2026
4 checks passed
@fedorov
fedorov deleted the chore/cap-mcp-major branch July 31, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants