Cap mcp[cli] < 2.0.0 to prevent startup crash under mcp 2.0 - #85
Open
thedomato wants to merge 1 commit into
Open
Cap mcp[cli] < 2.0.0 to prevent startup crash under mcp 2.0#85thedomato wants to merge 1 commit into
thedomato wants to merge 1 commit into
Conversation
The MCP SDK's mcp 2.0.0 (2026-07-28) removed the mcp.server.fastmcp
module that app.py imports (`from mcp.server.fastmcp import FastMCP`).
Because mcp[cli] is pinned only as >=1.10.0 with no upper bound, the
`uv run --with mcp[cli] --with-editable . mcp run .../server.py` launch
used by Claude Desktop resolves a fresh env to 2.0.0 and crashes at
import time with:
ModuleNotFoundError: No module named 'mcp.server.fastmcp'
before the server can serve, which Claude Desktop surfaces as the
server disconnecting. Capping at <2.0.0 resolves to the latest 1.x
(which still ships mcp.server.fastmcp) and restores startup. A proper
migration to the mcp 2.0 API can follow separately.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
The server fails to start under Claude Desktop with:
The MCP Python SDK released
mcp 2.0.0on 2026-07-28, which removed themcp.server.fastmcpmodule (app.py,auth.py, andtools/auth.pyall import from it).pyproject.toml/requirements.txtpinmcp[cli]>=1.10.0with no upper bound. The documented Claude Desktop launch —— builds a fresh, unpinned environment and resolves
mcpto the newest match (2.0.0), so the import crashes before the server can serve. Claude Desktop surfaces this as the server disconnecting.Fix
Cap
mcp[cli]>=1.10.0,<2.0.0inpyproject.tomlandrequirements.txt, and refreshuv.lock(resolves tomcp 1.13.1, which still shipsmcp.server.fastmcp).Verification
Reproduced the exact Claude Desktop launch path against this branch:
No
ModuleNotFoundError. A proper migration to the mcp 2.0 API can follow separately; this restores startup in the meantime.