Skip to main content
This guide covers breaking changes and migration steps when upgrading FastMCP.

v3.0.0

Most servers need only one change: update your import from from mcp.server.fastmcp import FastMCP to from fastmcp import FastMCP. The sections below cover less common breaking changes.

Breaking Changes

WSTransport Removed

Use StreamableHttpTransport instead.

Auth Provider Environment Variables Removed

Auth providers no longer auto-load configuration. Read them explicitly:

Component enable()/disable() Moved to Server

These methods moved from component objects to the server:

Listing Methods Return Lists

get_tools(), get_resources(), get_prompts(), and get_resource_templates() now return lists instead of dicts:

Prompts Use Message Class

Use Message instead of mcp.types.PromptMessage:

Context State Methods Are Async

ctx.set_state() and ctx.get_state() are now async. State persists across the session:

Server Banner Environment Variable Renamed

FASTMCP_SHOW_CLI_BANNER is now FASTMCP_SHOW_SERVER_BANNER.

OpenAPI timeout Parameter Removed

Configure timeout on the httpx client directly. The client parameter is now optional — when omitted, a default client is created from the spec’s servers URL with a 30-second timeout.

Metadata Namespace Renamed

The FastMCP metadata namespace changed from _fastmcp to fastmcp, and metadata is now always included. The include_fastmcp_meta parameter has been removed from FastMCP() and to_mcp_tool()—remove any usage of this parameter.

Behavior Changes

Decorators Return Functions

Decorators now return your original function instead of a component object. This means functions stay callable for testing:
If you relied on the old behavior (treating greet as a FunctionTool), set FASTMCP_DECORATOR_MODE=object for v2 compatibility.

Deprecated Features

These still work but emit warnings. Update when convenient.

mount() prefix → namespace

include_tags/exclude_tags → enable()/disable()

tool_serializer → ToolResult

Return ToolResult from your tools for explicit serialization control instead of using the tool_serializer parameter.

add_tool_transformation() → add_transform()

FastMCP.as_proxy() → create_proxy()

v2.14.0

OpenAPI Parser Promotion

The experimental OpenAPI parser is now standard. Update imports:

Removed Deprecated Features

  • BearerAuthProvider → use JWTVerifier
  • Context.get_http_request() → use get_http_request() from dependencies
  • from fastmcp import Image → use from fastmcp.utilities.types import Image
  • FastMCP(dependencies=[...]) → use fastmcp.json configuration
  • FastMCPProxy(client=...) → use client_factory=lambda: ...
  • output_schema=False → use output_schema=None

v2.13.0

OAuth Token Key Management

The OAuth proxy now issues its own JWT tokens. For production, provide explicit keys:
See OAuth Token Security for details.