mcp 2.x · python sdk
ImportError: cannot import name 'FastMCP' from 'mcp.server'
mcp 2.0 renamed FastMCP to MCPServer, so mcp.server has no name FastMCP. It is the same change that stops an import of mcp.server.fastmcp. A package that was written for mcp 1.x and asks for mcp with no upper bound gets mcp 2.x from a plain install and stops at start-up.
You only want to start the server
Install the package with the Python SDK below 2. With uv:
uvx --with "mcp<2" <package>
With pip, in the environment of the server:
pip install "mcp<2"
In an MCP client config, put --with and mcp<2 in front of the package name in the args of uvx. The SDK keeps the 1.x line supplied with critical fixes.
You publish the server
You have two fixes. The fast one is an upper bound in the dependencies of the package, then a new release:
dependencies = ["mcp>=1.2,<2"]
The SDK's migration guide says the same: keep a <2 upper bound until you have moved your code. The full fix is the move to mcp 2.x. Before:
from mcp.server import FastMCP
mcp = FastMCP("Demo")After:
from mcp.server.mcpserver import MCPServer
mcp = MCPServer("Demo")- The migration guide names the module error (No module named mcp.server.fastmcp). This text is the same rename, seen from an import of the name out of mcp.server.
- FastMCPError is now MCPServerError, and ctx.fastmcp is now ctx.mcp_server.
- Transport arguments such as port and json_response moved from the constructor to run() and the app methods.
Source: the section of the migration guide of the MCP Python SDK. mcp 2.0.0 came to PyPI on 28 July 2026. The examples are the guide's own.
Servers with this error 2026-11-14
10 PyPI package servers in the official MCP registry stopped with this error in the newest daily probe. The probe installs each package in a container as a client does, with no version pins, and starts it.
- io.github.APonkratov/ya-yandex-wiki-mcp ya-yandex-wiki-mcp
- io.github.CSOAI-ORG/care-home-scheduling-mcp care-home-scheduling-mcp
- io.github.CSOAI-ORG/cqc-compliance-mcp cqc-compliance-mcp
- io.github.CSOAI-ORG/optometry-patient-mcp optometry-patient-mcp
- SatoshiAPI — Bitcoin Data via Lightning satoshiapi-mcp
- PowerBI MCP Server powerbi-mcp
- ResearchTwin mcp-server-researchtwin
- io.github.rijul170/alertlogic-mcp alertlogic-mcp
- io.github.saucelabs-sample-test-frameworks/sauce-api-mcp sauce-api-mcp
- MTG-MCP mtg-mcp
Is your server in the list after a fix? Its page updates with the next weekly check of the package. How the probe works.
Other errors of mcp 2.x
- ModuleNotFoundError: No module named 'mcp.server.fastmcp'
- AttributeError: 'Server' object has no attribute 'list_tools'
- ImportError: cannot import name 'streamablehttp_client' from 'mcp.client.streamable_http'
- ImportError: cannot import name 'McpError' from 'mcp.shared.exceptions'
All of them, with counts. The full list of changes is in the migration guide.