fix(claude-code): pin mcp<2 so the MCP server can import FastMCP - #3027
Open
runbgp wants to merge 1 commit into
Open
fix(claude-code): pin mcp<2 so the MCP server can import FastMCP#3027runbgp wants to merge 1 commit into
runbgp wants to merge 1 commit into
Conversation
mcp 2.0.0 (PyPI, 2026-07-28) removed mcp.server.fastmcp, which scripts/mcp_server.py imports at module scope. Fresh venv bootstraps resolve 2.0.0 and the server exits on import, surfacing as -32000: Connection closed with no agent_knowledge_* tools.
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.
Fixes #3026.
mcp2.0.0 (2026-07-28) removedmcp.server.fastmcp, whichscripts/mcp_server.pyimports at module scope. Undermcp>=1.0.0, fresh venv bootstraps resolve 2.0.0 and the server exits on import — surfaced as-32000: Connection closedwith noagent_knowledge_*tools.Existing venvs are unaffected:
run_mcp.shre-pips only on cache drift orimport mcpfailure, and that still succeeds on 2.0.0. Only fresh installs break.<2resolves to 1.29.0. Verified on Python 3.14.4 — import works,run_mcp.shstarts and exits 0 on stdin close,claude mcp listreports connected.Same shape as #1641. Left the identical unbounded range in
claude-agent-sdkandhindsight-integration-testsalone; neither importsfastmcp, noted in the issue.