Something went wrong. Try again.
mirror of github.com/PrefectHQ/fastmcp
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101---title: Installationicon: arrow-down-to-line---## Install FastMCP
We recommend using [uv](https://docs.astral.sh/uv/getting-started/installation/) to install and manage FastMCP.
If you plan to use FastMCP in your project, you can add it as a dependency with:
```bashuv add fastmcp```
Alternatively, you can install it directly with `pip` or `uv pip`:<CodeGroup> ```bash uv uv pip install fastmcp ```
```bash pip pip install fastmcp ```</CodeGroup>
<Warning>**FastMCP 3.0** is in development and may include breaking changes. To avoid unexpected issues, pin your dependency to v2: `fastmcp<3`</Warning>
### Verify Installation
To verify that FastMCP is installed correctly, you can run the following command:
```bashfastmcp version```
You should see output like the following:
```bash$ fastmcp version
FastMCP version: 2.11.3MCP version: 1.12.4Python version: 3.12.2Platform: macOS-15.3.1-arm64-arm-64bitFastMCP root path: ~/Developer/fastmcp```
### Dependency Licensing
<Info>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:
```bashpip install "cyclopts>=5.0.0a1"```
Alternatively, wait for the stable v5 release. See [this issue](https://github.com/BrianPugh/cyclopts/issues/672) for details.</Info>## Upgrading from the Official MCP SDK
Upgrading from the official MCP SDK's FastMCP 1.0 to FastMCP 2.0 is generally straightforward. The core server API is highly compatible, and in many cases, changing your import statement from `from mcp.server.fastmcp import FastMCP` to `from fastmcp import FastMCP` will be sufficient.
```python {5}# Before# from mcp.server.fastmcp import FastMCP
# Afterfrom fastmcp import FastMCP
mcp = FastMCP("My MCP Server")```
<Warning>Prior to `fastmcp==2.3.0` and `mcp==1.8.0`, the 2.x API always mirrored the official 1.0 API. However, as the projects diverge, this can not be guaranteed. You may see deprecation warnings if you attempt to use 1.0 APIs in FastMCP 2.x. Please refer to this documentation for details on new capabilities.</Warning>
## Versioning Policy
FastMCP follows semantic versioning with pragmatic adaptations for the rapidly evolving MCP ecosystem. Breaking changes may occur in minor versions (e.g., 2.3.x to 2.4.0) when necessary to stay current with the MCP Protocol.
For production use, always pin to exact versions:```fastmcp==2.11.0 # Goodfastmcp>=2.11.0 # Bad - will install breaking changes```
See the full [versioning and release policy](/v2/development/releases#versioning-policy) for details on our public API, deprecation practices, and breaking change philosophy.
## Contributing to FastMCP
Interested in contributing to FastMCP? See the [Contributing Guide](/v2/development/contributing) for details on:- Setting up your development environment- Running tests and pre-commit hooks- Submitting issues and pull requests- Code standards and review process