#5353·fastmcp

v3 → v4 upgrade guide missing two breaking import changes

Author: shwetangsinha0509Created Sep 29, 2026Updated Sep 30, 2026
Labelsdocumentation

What happened?

Upgrading from FastMCP 3.4.4 to 4.0.10 breaks servers in two ways the upgrade guide doesn't mention.

Break 1 — import path removed

python
# breaks on v4:
from mcp.server.fastmcp import FastMCP

# fix:
from fastmcp import FastMCP

Break 2 — host/port removed from constructor

python
# breaks on v4:
mcp = FastMCP("name", host="0.0.0.0", port=10000)

# fix:
mcp = FastMCP("name")
mcp.run(transport="streamable-http", host="0.0.0.0", port=10000)

The upgrade guide says "most FastMCP 3 servers upgrade untouched" but both of these are common v3 patterns.

Example Code

python
from mcp.server.fastmcp import FastMCP  # ModuleNotFoundError on v4

mcp = FastMCP("name", host="0.0.0.0", port=10000)  # TypeError on v4

Version Information

FastMCP version:                                                                                 4.0.10
MCP version:                                                                                      2.2.0
Python version:                                                                                  3.12.9
Platform:                                                                     Windows-11-10.0.26200-SP0