Repository navigation
fix: pin mcp to <2 (2.0.0 removed mcp.server.fastmcp) - #164
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #164 +/- ##
==========================================
+ Coverage 86.32% 88.20% +1.88%
==========================================
Files 18 19 +1
Lines 848 1060 +212
==========================================
+ Hits 732 935 +203
- Misses 116 125 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vchomakov
left a comment
There was a problem hiding this comment.
Thanks @cyb3ralbert for the excellent report and fix — the diagnosis, the scoping, and the notes on what this deliberately doesn't cover are all spot on.
Verified independently on our side:
- Reproduced the failure in a clean venv:
pip install redis-mcp-serverresolvesmcp 2.0.0andredis-mcp-server --helpfails with the reportedModuleNotFoundError: No module named 'mcp.server.fastmcp'. - With this pin, a wheel built from this change installs cleanly in a fresh venv (mcp resolves to 1.29.0) and the CLI starts fine.
- Full CI matrix is green on this PR, including the previously failing
build-testjob.
The <2 bound also matches upstream's own guidance — the mcp SDK migration guide explicitly recommends keeping an upper bound until migrating to the 2.x MCPServer API, and the 1.x line stays maintained with critical/security fixes.
Follow-ups on our side after merging: a 0.5.1 patch release so the fix actually reaches PyPI users (0.5.0's metadata is immutable), and a separate issue for the mcp 2.x migration.
Fixes #163.
mcp2.0.0 (released 28 July 2026) removed themcp.server.fastmcppackage — the FastMCP server now lives undermcp.server.mcpserver. Sincepyproject.tomldeclaresmcp[cli]>=1.26.0with no upper bound, any fresh resolution picks up 2.0.0 and the server fails to start:This affects both installation paths documented in the README (
pip install redis-mcp-serveranduvx --from redis-mcp-server@latest), and it is what has been turning the nightlybuild-testjob red since 29 July — the⚙️ Test package installationstep is the only one that installs the built wheel withoutuv.lock, so it is the only job that sees what users actually get.This PR adds the upper bound, and updates the matching
requires-distentry inuv.lockso the lockfile stays consistent (uv lock --checkpasses; the resolved version is unchanged at 1.28.1).Verified locally by reproducing the failing CI step against the wheel built from this branch:
Two things this PR deliberately does not do, both noted in #163:
mcp[cli]>=1.9.4and will keep resolving to 2.0.0 until a patch release goes out.mcp2.x.src/common/server.pyconstructsFastMCPdirectly andtests/test_server.pyasserts on themcp.server.fastmcp.server.FastMCPtype in several places, so that migration is a larger change and a separate decision. Pinning<2is the minimal fix that restores installs today.Note
Low Risk
Only tightens the declared dependency range and lock metadata; no runtime logic changes.
Overview
Pins
mcp[cli]to>=1.26.0,<2inpyproject.tomland mirrors the same specifier inuv.lockso fresh installs no longer resolvemcp2.x, which removedmcp.server.fastmcpand breaks server startup (ModuleNotFoundErroronFastMCP).This is a dependency-only fix; no application or test code changes. The lockfile’s resolved
mcpversion stays on the 1.x line.Reviewed by Cursor Bugbot for commit faeb09f. Bugbot is set up for automated code reviews on this repo. Configure here.