MiniMax-Coding-Plan-MCP icon indicating copy to clipboard operation
MiniMax-Coding-Plan-MCP copied to clipboard

Broken after mcp 2.0.0: ModuleNotFoundError: No module named 'mcp.server.fastmcp'

Open ssm82 opened this issue 4 months ago • 4 comments

Summary

minimax-coding-plan-mcp fails to start with ModuleNotFoundError: No module named 'mcp.server.fastmcp' after the upstream mcp package released version 2.0.0 on 2026-07-28. Same root cause as the sibling MiniMax-MCP issue (#101 there).

Environment

  • Package: minimax-coding-plan-mcp (latest on PyPI)
  • Trigger: mcp 2.0.0 (released 2026-07-28) — the submodule mcp.server.fastmcp was removed/renamed in 2.0.0
  • Invocation: uvx minimax-coding-plan-mcp (also reproduced against current main via uvx --from git+https://github.com/MiniMax-AI/MiniMax-Coding-Plan-MCP)

Reproduce

uvx minimax-coding-plan-mcp

Actual output

Traceback (most recent call last):
  File ".../bin/minimax-coding-plan-mcp", line 6, in <module>
    from minimax_mcp.server import main
  File ".../site-packages/minimax_mcp/server.py", line 17, in <module>
    from mcp.server.fastmcp import FastMCP
ModuleNotFoundError: No module named 'mcp.server.fastmcp'

Root cause

  • minimax_mcp/server.py:17 imports from mcp.server.fastmcp import FastMCP — a path that no longer exists in mcp>=2.0.0.
  • In mcp>=1.6,<2 the module existed; in mcp==2.0.0 it is gone. The replacement is mcp.server.mcpserver (import mcp.server.mcpserver works on 2.0.0, mcp.server.fastmcp does not).
  • Pinning mcp<2 via uvx --with "mcp<2" minimax-coding-plan-mcp restores normal startup (it then stops on MINIMAX_API_KEY unset, which is expected).

Suggested fix

Update the import in minimax_mcp/server.py:

from mcp.server.mcpserver import FastMCP

…and broaden mcp in pyproject.toml to allow the 2.x line (>=1.6,<3 or similar). Please also add a CI matrix entry that runs against mcp==2.0.0 so this regression is caught at PR time.

Impact

All users invoking the package via uvx minimax-coding-plan-mcp (or installing from Git) are affected, since uvx resolves the highest compatible mcp and now picks 2.0.0.

Related

  • https://github.com/MiniMax-AI/MiniMax-MCP/issues/101 (sibling server, same bug)

ssm82 avatar Jul 29 '26 06:07 ssm82

Same error

t-cc avatar Jul 29 '26 07:07 t-cc

The same error. Use minimax to fix the import temporarily:

# Compatibility shim for mcp>=2.0.0, where `mcp.server.fastmcp` was removed
# and `FastMCP` was renamed to `MCPServer` under `mcp.server.mcpserver`.
# See https://github.com/MiniMax-AI/MiniMax-Coding-Plan-MCP/issues/25
try:
    from mcp.server.fastmcp import FastMCP  # mcp<2.0
except ImportError:  # mcp>=2.0
    from mcp.server.mcpserver import MCPServer as FastMCP

sunjw avatar Jul 30 '26 01:07 sunjw

Same error.

For anyone affected, here's a quick workaround — pin mcp to <2 when launching via uvx:

uvx --with "mcp[cli]>=1.6.0,<2" minimax-coding-plan-mcp -y

For Claude Code users, add --with to the MCP server args in the config:

"args": ["--with", "mcp[cli]>=1.6.0,<2", "minimax-coding-plan-mcp", "-y"]

Verified working on my end — the server starts and responds to the MCP initialize handshake normally with this change.

hui-shao avatar Aug 01 '26 14:08 hui-shao

Additional reproduction + an alternative workaround

Confirming #25 on Windows + opencode and sharing a version-agnostic workaround that does not require pinning mcp.

Environment

  • OS: Windows 11 (10.0.26200)
  • Package: minimax-coding-plan-mcp 0.0.4 (PyPI latest)
  • uvx: 0.6.17
  • Client: opencode (MCP stdio)

Reproduce

uvx minimax-coding-plan-mcp

Actual

ModuleNotFoundError: No module named 'mcp.server.fastmcp'

Root cause is the same as the OP: dependencies = ["mcp[cli]>=1.6.0"] has no upper bound, so uvx resolves to mcp==2.0.0, which dropped mcp.server.fastmcp.

Workaround that worked for us

Instead of pinning mcp<2, injecting the standalone fastmcp package restores the from mcp.server.fastmcp import FastMCP import path without constraining the mcp version:

"command": ["uvx", "--with", "fastmcp", "minimax-coding-plan-mcp"]

After this, the MCP stdio handshake succeeds and the server advertises itself normally (serverInfo returned).

Suggested permanent fix

Either:

  • pin mcp<2 in pyproject.toml (quick), or
  • migrate the import to mcp.server.mcpserver as the OP suggests (forward-compatible), and
  • add a CI matrix entry for mcp==2.0.0 so the regression is caught at PR time.

Hope the alternative workaround helps other affected users until a release lands.

Hylouis233 avatar Aug 08 '26 09:08 Hylouis233