fix(deps): bound mcp to <2.0.0 to keep tests on the 1.x line - #341
Open
lhs1695 wants to merge 1 commit into
Open
fix(deps): bound mcp to <2.0.0 to keep tests on the 1.x line#341lhs1695 wants to merge 1 commit into
lhs1695 wants to merge 1 commit into
Conversation
MCP SDK 2.0 removed mcp.server.fastmcp, which the test suite uses for mock MCP servers. The unrestricted mcp>=1.0.0 constraint resolves to 2.x on fresh installs and breaks test collection. Pin mcp<2.0.0 so pip/uv pick a version the harness was developed against.
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
Bound the
mcpdependency to<2.0.0inpyproject.toml.Problem: The constraint was
mcp>=1.0.0with no upper bound. MCP SDK 2.0 removedmcp.server.fastmcp, which the test suite relies on (tests/test_mcp/test_http_flow.py,tests/fixtures/fake_mcp_server.py). On a freshpip install, the resolver picks mcp 2.x and test collection fails withModuleNotFoundError: No module named 'mcp.server.fastmcp'. The harness runtime itself was developed against the mcp 1.x line (itsmcp/module only uses the client APIs, which still exist in 2.x).Change:
"mcp>=1.0.0"→"mcp>=1.0.0,<2.0.0".Verification
pip install "mcp>=1.0.0,<2.0.0"resolves to mcp 1.29.0 (the 1.x line).pytest tests/test_mcp/→ 17 passed (previously collection errored on the fastmcp import).Notes
ruff check src tests scriptswith ruff 0.16.1 reports 681 pre-existing lint errors across the untouched codebase; none are introduced by this change (onlypyproject.tomlandCHANGELOG.mdare touched).