Skip to content

Pin mcp<2 to fix FastMCP import crash on fresh installs - #102

Open
jjcav84 wants to merge 2 commits into
massive-com:masterfrom
jjcav84:pin-mcp-v1
Open

jjcav84 wants to merge 2 commits into
massive-com:masterfrom
jjcav84:pin-mcp-v1

Conversation

@jjcav84

@jjcav84 jjcav84 commented Sep 22, 2026

Copy link
Copy Markdown

Summary

  • Cap the mcp dependency at <2.0.0. Fresh installs via uv tool install / pip resolve mcp>=1.27.0 to mcp 2.x, which removed mcp.server.fastmcp (FastMCP renamed to MCPServer), so the server crashes on import:
ModuleNotFoundError: No module named 'mcp.server.fastmcp'. This is mcp 2.x,
where FastMCP was renamed to MCPServer ... or pin 'mcp<2' to keep running v1 code.
  • uv.lock already pins mcp==1.27.0, so in-repo uv sync/uv run was unaffected; this only broke installs that resolve dependencies fresh from pyproject.toml.

Test plan

  • uv tool install + mcp_massive before fix: import crash (mcp 2.x resolved)
  • uv tool install --with 'mcp<2': server initializes and responds to MCP initialize/tools/list over both stdio and streamable-http
  • Upstream: migrate to MCP 2.x API per https://py.sdk.modelcontextprotocol.io/v2/migration/ (follow-up; this PR just unbreaks installs)

pyproject declares `mcp>=1.27.0` unbounded, so `uv tool install` / pip
resolve to mcp 2.x, where `mcp.server.fastmcp` no longer exists
(FastMCP was renamed to MCPServer). The server then crashes on import:

    ModuleNotFoundError: No module named 'mcp.server.fastmcp'. This is
    mcp 2.x, where FastMCP was renamed to MCPServer ... or pin 'mcp<2'
    to keep running v1 code.

uv.lock already pins mcp==1.27.0, so in-repo `uv sync`/`uv run` was
unaffected — this only broke installs that resolve from pyproject.

Cap the dependency at <2.0.0 until the codebase migrates to the MCP 2.x
API (https://py.sdk.modelcontextprotocol.io/v2/migration/).

@joedursun joedursun left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@jjcav84

jjcav84 commented Oct 22, 2026

Copy link
Copy Markdown
Author

All checks green and approved — ready to merge whenever convenient. Anything else needed on my end?

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.

2 participants