tools/mcp: pin mcp<2 to fix unit CI collection - #2026
Conversation
mcp 2.0.0 dropped the mcp.server.fastmcp module, so the unpinned `mcp>=1.0` now resolves to 2.0.0 and modelopt_mcp/server.py's `from mcp.server.fastmcp import FastMCP` fails at import, breaking the `mcp` unit job (and the unit-pr-required-check gate) on every PR that touches pyproject.toml or the workflow. Pin to the 1.x line that still ships fastmcp; migrating to the mcp 2.0 API is a separate change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Fridah-nv <201670829+Fridah-nv@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe MCP dependency constraint changes from ChangesMCP compatibility
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2026 +/- ##
=======================================
Coverage 66.83% 66.83%
=======================================
Files 519 519
Lines 58916 58916
=======================================
Hits 39376 39376
Misses 19540 19540
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:
|
|
What does this PR do?
Type of change: Bug fix (CI)
mcp==2.0.0was released and removed themcp.server.fastmcpmodule (the 2.0 SDK replaces it withmcp.server.mcpserver).tools/mcp/pyproject.tomldeclared an unpinnedmcp>=1.0, so CI now resolvesmcp==2.0.0, andtools/mcp/modelopt_mcp/server.py'sfrom mcp.server.fastmcp import FastMCPfails at import:This breaks the
mcpunit job — and thus theunit-pr-required-checkgate — on every PR whose diff touchespyproject.toml,noxfile.py, or.github/workflows/unit_tests.yml(the changed-files paths that trigger themcpjob).This PR pins
mcp>=1.0,<2, keeping the 1.x line that still shipsmcp.server.fastmcp. Migrating the server to the mcp 2.0 API (mcp.server.mcpserver) is a larger change tracked separately.Usage
# N/A - dependency pin onlyTesting
uv pip install -e tools/mcpnow resolves anmcp1.x wheel, sofrom mcp.server.fastmcp import FastMCPimports andtools/mcp/tests/test_bridge.pycollects again.Before your PR is "Ready for review"
CONTRIBUTING.md: N/A — tightens an existing dependency's upper bound.tools/mcptests.Additional Information
Unblocks the
unit-pr-required-checkgate for in-flight PRs (surfaced on #2000). Follow-up: migratemodelopt_mcp/server.pyto the mcp 2.0 API and relax the pin.Summary by CodeRabbit