v3.0.0
For most servers, upgrading to v3 requires a single change: swapfrom mcp.server.fastmcp import FastMCP for from fastmcp import FastMCP. Everything below covers the less common cases.
Install
Since you already havefastmcp installed, you need to explicitly request the new version — pip install fastmcp won’t upgrade an existing installation:
pyproject.toml, update your pin to fastmcp>=3.0.0,<4.
New repository home. As part of the v3 release, FastMCP’s GitHub repository has moved from If you reference the repository URL in dependency specifications (e.g.,
jlowin/fastmcp to PrefectHQ/fastmcp under Prefect’s stewardship. GitHub automatically redirects existing clones and bookmarks, so nothing breaks — but you can update your local remote whenever convenient:git+https://github.com/jlowin/fastmcp.git), update those to the new location.Copy this prompt into any LLM along with your server code to get automated upgrade guidance.
Breaking Changes
Transport and server settings removed from constructor In v2, you could configure transport settings directly in theFastMCP() constructor. In v3, FastMCP() is purely about your server’s identity and behavior — transport configuration happens when you actually start serving. Passing any of the old kwargs now raises TypeError with a migration hint.
host,port,log_level,debug,sse_path,streamable_http_path,json_response,stateless_http— pass torun(),run_http_async(), orhttp_app(), or set via environment variables (e.g.FASTMCP_HOST)message_path— set via environment variableFASTMCP_MESSAGE_PATHonly (not arun()kwarg)on_duplicate_tools,on_duplicate_resources,on_duplicate_prompts— consolidated into a singleon_duplicate=parametertool_serializer— returnToolResultfrom your tools insteadinclude_tags/exclude_tags— useserver.enable(tags=..., only=True)/server.disable(tags=...)after constructiontool_transformations— useserver.add_transform(ToolTransform(...))after construction
DiskStore to FileTreeStore to address a pickle deserialization vulnerability in diskcache (CVE-2025-69872).
If you were using the default storage (i.e., not passing an explicit client_storage), clients will need to re-register on their first connection after upgrading. This happens automatically — no user action required, and it’s the same flow that already occurs whenever a server restarts with in-memory storage.
If you were passing a DiskStore explicitly, you can either switch to FileTreeStore (recommended) or keep using DiskStore by adding the dependency yourself:
Component enable()/disable() moved to server
In v2, you could enable or disable individual components by calling methods on the component object itself. In v3, visibility is controlled through the server (or provider), which lets you target components by name, tag, or type without needing a reference to the object:
.enable() or .disable() on a component object now raises NotImplementedError. See Visibility for the full API, including tag-based filtering and per-session visibility.
Listing methods renamed and return lists
The get_tools(), get_resources(), get_prompts(), and get_resource_templates() methods have been renamed to list_tools(), list_resources(), list_prompts(), and list_resource_templates(). More importantly, they now return lists instead of dicts — so code that indexes by name needs to change:
Message class instead of mcp.types.PromptMessage. The new class is simpler — it accepts a plain string and defaults to role="user", so most prompts become one-liners:
ctx.set_state() and ctx.get_state() are now async because state in v3 is session-scoped and backed by a pluggable storage backend (rather than a simple dict). This means state persists across multiple tool calls within the same session:
serializable=False — these values are request-scoped and only available during the current tool call:
GitHubProvider could auto-load configuration from environment variables with a FASTMCP_SERVER_AUTH_* prefix. This magic has been removed — pass values explicitly:
StreamableHttpTransport instead:
timeout parameter removed
OpenAPIProvider no longer accepts a timeout parameter. Configure timeout on the httpx client directly. The client parameter is also now optional — when omitted, a default client is created from the spec’s servers URL with a 30-second timeout:
meta dicts changed from _fastmcp to fastmcp. If you read metadata from tool or resource objects, update the key:
include_fastmcp_meta parameter has been removed from FastMCP() and to_mcp_tool(), so there is no way to suppress it.
Server banner environment variable renamed
FASTMCP_SHOW_CLI_BANNER is now FASTMCP_SHOW_SERVER_BANNER.
Decorators return functions
In v2, @mcp.tool transformed your function into a FunctionTool object. In v3, decorators return your original function unchanged — which means decorated functions stay callable for testing, reuse, and composition:
FunctionTool (e.g., accessing .name or .description), set FASTMCP_DECORATOR_MODE=object for v2 compatibility. This escape hatch is itself deprecated and will be removed in a future release.
Background tasks require optional dependency
FastMCP’s background task system (SEP-1686) is now behind an optional extra. If your server uses background tasks, install with:
task=True or TaskConfig will raise an import error at runtime. See Background Tasks for details.
Deprecated Features
These still work but emit warnings. Update when convenient. mount() prefix → namespaceproviders to reflect v3’s provider-based architecture:
FastMCPOpenAPI itself is deprecated — use FastMCP with an OpenAPIProvider instead:
v2.14.0
OpenAPI Parser Promotion
The experimental OpenAPI parser is now standard. Update imports:Removed Deprecated Features
BearerAuthProvider→ useJWTVerifierContext.get_http_request()→ useget_http_request()from dependenciesfrom fastmcp import Image→ usefrom fastmcp.utilities.types import ImageFastMCP(dependencies=[...])→ usefastmcp.jsonconfigurationFastMCPProxy(client=...)→ useclient_factory=lambda: ...output_schema=False→ useoutput_schema=None

