Skip to content

fix(claude-code): pin mcp<2 so the MCP server can import FastMCP - #3027

Open
runbgp wants to merge 1 commit into
vectorize-io:mainfrom
runbgp:fix/claude-code-pin-mcp-v1
Open

fix(claude-code): pin mcp<2 so the MCP server can import FastMCP#3027
runbgp wants to merge 1 commit into
vectorize-io:mainfrom
runbgp:fix/claude-code-pin-mcp-v1

Conversation

@runbgp

@runbgp runbgp commented Jul 28, 2026

Copy link
Copy Markdown

Fixes #3026.

mcp 2.0.0 (2026-07-28) removed mcp.server.fastmcp, which scripts/mcp_server.py imports at module scope. Under mcp>=1.0.0, fresh venv bootstraps resolve 2.0.0 and the server exits on import — surfaced as -32000: Connection closed with no agent_knowledge_* tools.

Existing venvs are unaffected: run_mcp.sh re-pips only on cache drift or import mcp failure, and that still succeeds on 2.0.0. Only fresh installs break.

<2 resolves to 1.29.0. Verified on Python 3.14.4 — import works, run_mcp.sh starts and exits 0 on stdin close, claude mcp list reports connected.

Same shape as #1641. Left the identical unbounded range in claude-agent-sdk and hindsight-integration-tests alone; neither imports fastmcp, noted in the issue.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

claude-code: MCP server fails to start on fresh installs — requirements.txt admits mcp 2.0, which removed mcp.server.fastmcp

1 participant