Pin mcp below 2.0 to fix fresh installs - #58
Merged
Merged
Conversation
mcp 2.0 removed mcp.server.fastmcp: FastMCP is now
mcp.server.mcpserver.MCPServer, and other APIs changed. Because the
dependency was declared as mcp[cli]>=1.20 with no upper bound, a fresh
install now resolves mcp 2.2.0, and the server fails at startup when
server.py imports FastMCP:
ModuleNotFoundError: No module named 'mcp.server.fastmcp'
Cap the requirement at <2 until the code is migrated to the 2.x API.
With the cap, a fresh resolve picks mcp 1.30.0.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
5 tasks
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.
Summary
pyproject.tomldeclaredmcp[cli]>=1.20with no upper bound. mcp 2.0.0 (released 2026-07-28) removedmcp.server.fastmcp:FastMCPis nowmcp.server.mcpserver.MCPServer, and other APIs changed. A fresh install now resolves mcp 2.2.0, and the server fails on startup atfrom mcp.server.fastmcp import FastMCPinsrc/nc_mcp_server/server.py:In 2.x,
mcp/server/fastmcp.pyis only a stub that raises this error (same inv2.1.1andv2.2.0), so there is no compatibility path without code changes.This PR caps the requirement at
mcp[cli]>=1.20,<2. It is the minimal unblock; migrating to the 2.xMCPServerAPI is separate work.Worth knowing
nc-mcp-server0.7.0 has the same unbounded requirement, sopip install nc-mcp-serverpulls mcp 2.2.0 today. A patch release (e.g. 0.7.1) is needed after merge;publish.ymlruns when a GitHub release is published.pip install -e ".[dev]", and its last run (2026-07-26, on Bump the ci-dependencies group across 1 directory with 4 updates #57) was two days before mcp 2.0.0 shipped. Any new run without this cap would install mcp 2.x.Test plan
uv pip compileofmcp[cli]>=1.20resolvesmcp==2.2.0; with<2it resolvesmcp==1.30.0nc_mcp_server.serverimports and the unit tests run locally on Windows: 93 passed; the 11 failures are Windows-specific symlink/FIFO/os.O_NOFOLLOWtests, unrelated to this change