Install FastMCP
We recommend using uv to install and manage FastMCP.FastMCP 4 is in prerelease. The commands above install the latest stable release, which is still 3.x. To get v4, pin the beta explicitly with
pip install "fastmcp==4.0.0b1", or see Install the v4 Prerelease for the uv constraint you’ll need.Optional Dependencies
FastMCP provides optional extras for specific features. For example, to install the background tasks extra:Verify Installation
To verify that FastMCP is installed correctly, you can run the following command:Dependency Licensing
FastMCP depends on Cyclopts for CLI functionality. Cyclopts v4 includes docutils as a transitive dependency, which has complex licensing that may trigger compliance reviews in some organizations.If this is a concern, you can install Cyclopts v5 alpha which removes this dependency:Alternatively, wait for the stable v5 release. See this issue for details.
Upgrading
From FastMCP 3.0
Most FastMCP 3 servers run on 4 without changes. See Upgrading from FastMCP 3 for the breaks that do exist, and What’s New for what the new version adds.From FastMCP 2.0
See the Upgrade Guide for a complete list of breaking changes and migration steps.From the MCP SDK
Which guide you want depends on whichmcp version you’re on and which of its two server APIs you used.
From the high-level server
If you’re using FastMCP 1.0 via SDK v1 (meaning you import FastMCP asfrom mcp.server.fastmcp import FastMCP), upgrading is straightforward — for most servers it’s a single import change. See Upgrading from MCP SDK v1, which also explains why that route is usually easier than moving to MCP SDK v2.
If you already moved to SDK v2 and write against MCPServer, see Upgrading from MCP SDK v2 — that migration is mostly renaming.
From the low-level server
If you built your server directly on themcp package’s Server class, the guide you want depends on how its handlers are registered. Decorators like @server.list_tools() mean SDK v1 — see Upgrading from the Low-Level SDK v1. Handlers passed to the constructor as on_list_tools= mean SDK v2 — see Upgrading from the Low-Level SDK v2.
Troubleshooting
import fastmcp fails after a pip upgrade
This affects one specific case: upgrading to FastMCP 3.3 or later from FastMCP 3.2 or earlier with pip. Fresh installs and uv upgrades are unaffected, so you can skip this unless you did exactly that.
If import fastmcp raises ModuleNotFoundError, or from fastmcp import FastMCP raises ImportError, immediately after the upgrade, your install is in a half-removed state. Reinstall in a single step:
fastmcp distribution into fastmcp-slim. During a single-command pip upgrade, pip can install the new files and then delete them while uninstalling the old fastmcp distribution, whose file manifest still lists those paths. uv uninstalls before it installs, so it is unaffected.

