Skip to content

mcp 2.0.0 breaks imports: FastMCP renamed to MCPServer, module moved #325

Description

@nirvana6

Problem

jupyter-mcp-server (installed from git+https://github.com/datalayer/jupyter-mcp-server.git) crashes at import time with mcp >= 2.0.0:

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

This happens in jupyter_mcp_server/tools/jupyter_cite_prompt.py, line 11:

from mcp.server.fastmcp.prompts.base import UserMessage

Root Cause

The mcp package (modelcontextprotocol/python-sdk) released v2.0.0, which renamed FastMCP to MCPServer and moved the entire module:

  • v1: from mcp.server.fastmcp import FastMCP
  • v2: from mcp.server.mcpserver import MCPServer

Full migration guide: https://github.com/modelcontextprotocol/python-sdk/blob/main/docs/migration.md#fastmcp-renamed-to-mcpserver

The related GitHub issue tracking the rename: modelcontextprotocol/python-sdk#1732

Why this breaks now

The pyproject.toml declares:

"mcp[cli]>=1.10.1"

This has no upper bound, so uv / pip resolves to mcp==2.0.0 (released 2026-07-28). The previous mcp==1.29.0 worked fine.

Current workaround

Users can pin manually:

--with "mcp[cli]>=1.10.1,<2.0.0"

Suggested fix

Either:

  1. (Quick) Add <2.0.0 to the dependency: "mcp[cli]>=1.10.1,<2.0.0"
  2. (Long-term) Migrate imports to the v2 API and bump to "mcp[cli]>=2.0.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions