fastmcp Documentation

The fast, Pythonic way to build MCP servers and clients.

RAW Doc

Technical Documentation: jlowin/fastmcp

ℹ️ Provenance: Multi-Tier Ingestion · CodeWiki Reference

Overview (README.md)


The Model Context Protocol (MCP) connects LLMs to tools and data. FastMCP is a full MCP application framework for servers, clients, and interactive apps. A server starts with ordinary Python:

python
from fastmcp import FastMCP

mcp = FastMCP("Demo 🚀")

@mcp.tool
def add(a: int, b: int) -> int:
    """Add two numbers"""
    return a + b

if __name__ == "__main__":
    mcp.run()

Why FastMCP

Building an effective MCP application is harder than it looks. FastMCP handles all of it. Declare a tool with a Python function, and the schema, validation, and documentation are generated automatically. Connect to a server with a URL, and transport negotiation, authentication, and protocol lifecycle are managed for you. You focus on your logic, and the MCP part just works: with FastMCP, best practices are built in.

That's why FastMCP is the standard framework for working with MCP. FastMCP 1.0 was incorporated into the official MCP Python SDK in 2024. Today, the actively maintained standalone project is downloaded a million times a day, and some version of FastMCP powers 70% of MCP servers across all languages.

FastMCP has three pillars:

| Servers

Expose tools, resources, and prompts to LLMs. | Apps

Give your tools interactive UIs rendered directly in the conversation. | Clients

Connect to any MCP server — local or remote, programmatic or CLI. |
| --- | --- | --- |

Servers wrap your Python functions into MCP-compliant tools, resources, and prompts. Clients connect to any server with full protocol support. And Apps give your tools interactive UIs rendered directly in the conversation.

Building in TypeScript? FastMCP for TypeScript is the official counterpart, built and maintained by the same team. Same pillars, same ideas, npm install @prefecthq/fastmcp-ts.

Ready to build? Start with the installation guide or jump straight to the quickstart.

Scale MCP with FastMCP Gateway

FastMCP handles the MCP application layer. FastMCP Gateway is the enterprise MCP gateway for scaling servers and tools across teams, with centralized governance over how they are deployed, discovered, secured, and used.

FastMCP and FastMCP Gateway are built by the same team at Prefect.

Deploy FastMCP servers from GitHub with branch previews and instant rollback. Create a private registry of every MCP your company uses. Secure access with SSO and tool-level RBAC. Get audit logs, observability, and governance across your MCP stack. Remix approved tools into purpose-built endpoints for teams and agents.

Start with FastMCP. Scale with FastMCP Gateway →

Installation

We recommend adding FastMCP to your project with uv:

bash
uv add fastmcp

For full installation instructions, including verification and upgrading, see the Installation Guide.

Upgrading? We have guides for:

📚 Documentation

FastMCP's complete documentation is available at gofastmcp.com, including detailed guides, API references, and advanced patterns.

Documentation is also available in llms.txt format, which is a simple markdown standard that LLMs can consume easily:

  • llms.txt is essentially a sitemap, listing all the pages in the documentation.
  • llms-full.txt contains the entire documentation. Note this may exceed the context window of your LLM.

Give your coding agent llms.txt as its starting point. See Coding Agents for version-matched documentation and the optional server authoring skill.

Community: Join our Discord server to connect with other FastMCP developers and share what you're building.

Contributing

Start with CONTRIBUTING.md for accepted contributions and the issue-assignment workflow, then follow the Contributing Guide for setup and validation. Agents should read AGENTS.md.


Apps Overview (`docs/apps/overview.mdx`)


title: Apps sidebarTitle: Overview icon: grid-2 mode: center

import { VersionBadge } from '/snippets/version-badge.mdx'
import PrefabPinWarning from '/snippets/prefab-pin-warning.mdx'
import { PrefabDemoFrame } from '/snippets/prefab-demo-frame.mdx'

A FastMCP app is a tool that returns an interactive UI instead of text. When the host calls it, the user sees a chart, a table, a form, or a whole dashboard rendered right inside the conversation, with working sort, search, tooltips, and state.

The dashboard above is a Prefab showcase — a taste of what you can deliver from a FastMCP tool. Every card, chart, slider, dialog, and carousel is a Python component. Build a composition like this, add @mcp.tool(app=True), and the host renders it inside the conversation.

Under the hood, FastMCP builds on the MCP Apps extension and uses Prefab to describe UIs in Python.

bash
pip install "fastmcp[apps]"

Pick your path

Four patterns cover almost everything you'd want to build. Most apps start with Interactive Tools; you only reach for the others when you've hit a specific limit.

[Interactive Tools](/apps/prefab) — start here

Add app=True to a tool and return a Prefab component. Charts, tables, dashboards, and client-side interactivity (toggles, tabs, filtering) all work without any server round-trips.

python
@mcp.tool(app=True)
def team_directory() -> DataTable:
    return DataTable(columns=[...], rows=employees, search=True)

[FastMCPApp](/apps/fastmcp-app) — when the UI calls back to the server

Forms that save data, buttons that trigger backend work, search that hits a database. FastMCPApp manages the wiring between UI actions and backend tools, with stable tool identifiers that survive server composition.

[Generative UI](/apps/generative) — when the LLM writes the UI

Register one provider and the model can write Prefab code tailored to the current data and request. The user watches the UI build up as the model generates it.

python
mcp.add_provider(GenerativeUI())

[Custom HTML](/apps/low-level) — when you need full control

Write your own HTML, CSS, and JavaScript. Use a specific framework, drop in a map or 3D viewer, embed video. You're talking to the MCP Apps protocol directly.

What's next

  • Quickstart — build a working app in a minute
  • Examples — complete working servers you can run today
  • Providers — ready-made capabilities (approvals, choice pickers, file upload, forms) you add with one line
  • Development — preview app tools locally with fastmcp dev apps

Apps Quickstart (`docs/apps/quickstart.mdx`)


title: Quickstart sidebarTitle: Quickstart icon: rocket

import { VersionBadge } from '/snippets/version-badge.mdx'
import { PrefabDemoFrame } from '/snippets/prefab-demo-frame.mdx'

By the end of this page, you'll have a working tool that returns this:

A pie chart the user can hover, a table they can sort and search — and a single Python tool.

Install

bash
pip install "fastmcp[apps]"

The apps extra pulls in Prefab, the Python component library used to build app UIs.

Write the tool

Create server.py. The interesting parts: app=True tells FastMCP this tool renders a UI, and with PrefabApp() as app: is the canonical pattern for composing one.

text
/* Detailed source-code truncated for AI context efficiency. */

The Prefab code reads top-to-bottom. PrefabApp() is the root; everything inside its with block becomes the UI. Column stacks children vertically, Grid lays them out in columns. DataTable takes rows and column definitions and gives you sort and search for free.

app=True does the rest: it sets up the renderer resource, the content security policy, and the metadata that tells the host "this tool returns a UI." The host loads the result in a sandboxed iframe where the user can interact with it — all client-side, no round-trips.

Preview it

FastMCP ships a dev server that renders your app tools in a browser, no MCP host needed:

bash
fastmcp dev apps server.py

Open http://localhost:8080, pick team_directory, and try sorting columns and searching.

Make it reactive

The UI above renders once from your Python. Prefab apps can also respond to user input live, without any server round-trips. The key concept is state: a client-side key-value store that components read from and write to.

Click a row in the demo below to see a detail card appear:

Add a few imports, give each member a couple more fields, wire up a click handler, and render a detail card when something's selected:

text
/* Detailed source-code truncated for AI context efficiency. */

Three new ideas do all the work:

  • on_row_click=SetState("selected", Rx("$event")) — clicking a row writes its data into the selected state key. $event is the clicked row dict.
  • Rx("selected.name") — a reactive reference. It doesn't hold a Python value; it compiles to a browser-side expression that re-evaluates whenever selected changes, so Text(Rx("selected.name")) always shows the latest clicked name.
  • If(STATE.selected) — conditionally renders its body. Before any click, selected is None and the card stays hidden.

The state={"selected": None} dict on PrefabApp sets the initial value. Everything else happens in the browser — no round-trips to your server when the user clicks.

Where to go next

You've built a tool that returns an interactive, reactive UI. This pattern covers a huge range of use cases: build a visualization, return it, and the user gets it rendered right in the conversation.

  • Interactive Tools — charts, tables, dashboards, reactive state, with live demos
  • FastMCPApp — when the UI needs to call back to your server (forms, search, CRUD)
  • Examples — complete working servers you can run today

Cli Overview (`docs/cli/overview.mdx`)


title: CLI sidebarTitle: Overview icon: terminal

The fastmcp CLI is installed automatically with FastMCP. It's the primary way to run, test, install, and interact with MCP servers from your terminal.

bash
fastmcp --help

Commands at a Glance

Command What it does
run Run a server (local file, factory function, remote URL, or config file)
dev apps Launch a browser-based preview UI for Prefab App tools
dev inspector Launch a server inside the MCP Inspector for interactive testing
install Install a server into Claude Code, Claude Desktop, Cursor, Gemini CLI, or Goose
inspect Print a server's tools, resources, and prompts as a summary or JSON report
list List a server's tools (and optionally resources and prompts)
call Call a tool, read a resource, or get a prompt
discover Find MCP servers configured in your editors and tools
generate-cli Scaffold a standalone typed CLI from a server's tool schemas
project prepare Pre-install dependencies into a reusable uv project
auth cimd Create and validate CIMD documents for OAuth
login Sign in to FastMCP Gateway with a browser device flow
whoami Show the current FastMCP Gateway account
logout Revoke the current FastMCP Gateway key and remove the local credential
version Print version info (--copy to copy to clipboard)

Server Targets

Most commands need to know which server to talk to. You pass a "server spec" as the first argument, and FastMCP resolves the right transport automatically.

URLs connect to a running HTTP server:

bash
fastmcp list http://localhost:8000/mcp
fastmcp call http://localhost:8000/mcp get_forecast city=London

Python files are loaded directly — no mcp.run() boilerplate needed. FastMCP finds a server instance named mcp, server, or app in the file, or you can specify one explicitly:

bash
fastmcp list server.py
fastmcp run server.py:my_custom_server

Config files work too — both FastMCP's own fastmcp.json format and standard MCP config files with an mcpServers key:

bash
fastmcp run fastmcp.json
fastmcp list mcp-config.json

Stdio commands connect to any MCP server that speaks over standard I/O. Use --command instead of a positional argument:

bash
fastmcp list --command 'npx -y @modelcontextprotocol/server-github'

Name-Based Resolution

If your servers are already configured in an editor or tool, you can refer to them by name. FastMCP scans configs from Claude Desktop, Claude Code, Cursor, Gemini CLI, Goose, and a project-level mcp.json:

bash
fastmcp list weather
fastmcp call weather get_forecast city=London

When the same name appears in multiple configs, use the source:name form to be specific:

bash
fastmcp list claude-code:my-server
fastmcp call cursor:weather get_forecast city=London

Run fastmcp discover to see what's available on your machine.

Authentication

FastMCP Gateway Account

Use the top-level account commands to manage the credential for FastMCP Gateway.

bash
fastmcp login
fastmcp whoami
fastmcp logout

fastmcp login first uses HORIZON_API_KEY or a valid stored key when one is available.
When login needs a new key, it shows a verification URL and code.
It opens a browser when the terminal supports it.
If the browser does not open, use the shown URL and code on another device.
To switch accounts, run fastmcp logout before you run fastmcp login again.

Login stores only the personal FastMCP Gateway API key.
It does not select or store a deployment organization.
fastmcp whoami gets the current user from FastMCP Gateway.
fastmcp logout attempts to revoke the stored key and always removes its local credential.

Set HORIZON_API_KEY to use an environment credential instead.
The CLI gives that value first precedence and never stores it.
When this variable controls the session, logout does not revoke or remove any credential.
Remove the variable from your environment to sign out.

Use --json for stable command results.
During JSON login, the verification challenge goes to stderr and the final result goes to stdout.
JSON mode does not open a browser or ask a question.

MCP Server Authentication

When targeting an HTTP URL, the CLI enables OAuth authentication by default. If the server requires it, you'll be guided through the flow (typically opening a browser). If it doesn't, the setup is a silent no-op.

OAuth tokens are kept in memory by default and discarded when the command exits. To reuse authentication across fastmcp list and fastmcp call, generate a Fernet key once and save it as FASTMCP_OAUTH_ENCRYPTION_KEY in your environment or .env file:

bash
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"

With that setting, the CLI encrypts tokens and client registration details on disk under FASTMCP_HOME. Keep the key secret and reuse the same value across invocations. Changing it starts a separate cache and requires signing in again. This applies to HTTP and SSE URLs and discovered servers that connect directly over HTTP or SSE; MCPConfig files retain their per-server authentication configuration. The Python SDK's storage defaults are unchanged.

To skip authentication entirely — useful for local development servers — pass --auth none:

bash
fastmcp call http://localhost:8000/mcp my_tool --auth none

You can also pass a bearer token directly. Give the token value on its own; FastMCP adds the Bearer prefix when it builds the Authorization header.

bash
fastmcp list http://localhost:8000/mcp --auth "sk-..."

Transport Override

FastMCP defaults to Streamable HTTP for URL targets. If the server only supports Server-Sent Events (SSE), force the older transport:

bash
fastmcp list http://localhost:8000 --transport sse

Community README (`docs/community/README.md`)

Community Section

This directory contains community-contributed content and showcases for FastMCP.

Structure

  • showcase.mdx - Main community showcase page featuring high-quality projects and examples

Adding Content

To add new community content:

  1. Create a new MDX file in this directory
  2. Update docs.json to include it in the navigation
  3. Follow the existing format for consistency

Guidelines

Community content should:

  • Demonstrate best practices
  • Provide educational value
  • Include proper documentation
  • Be maintained and up-to-date

Getting Started Quickstart (`docs/getting-started/quickstart.mdx`)


title: Quickstart icon: rocket-launch

This guide builds a working MCP server from scratch: a tool, a way to run it, a client that calls it, and a visual UI for the result. It ends with the server deployed and reachable over the internet.

If you haven't already installed FastMCP, follow the installation instructions.

Create a FastMCP Server

A FastMCP server is a collection of tools, resources, and other MCP components. To create a server, start by instantiating the FastMCP class.

Create a new file called my_server.py and add the following code:

python my_server.py
from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")

That's it! You've created a FastMCP server, albeit a very boring one. Let's add a tool to make it more interesting.

Add a Tool

To add a tool that returns a simple greeting, write a function and decorate it with @mcp.tool to register it with the server:

python my_server.py {5-7}
from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")

@mcp.tool
def greet(name: str) -> str:
    return f"Hello, {name}!"

Run the Server

The simplest way to run your FastMCP server is to call its run() method. You can choose between different transports, like stdio for local servers, or http for remote access:

python my_server.py (stdio) {9, 10}
from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")

@mcp.tool
def greet(name: str) -> str:
    return f"Hello, {name}!"

if __name__ == "__main__":
    mcp.run()
python my_server.py (http) {9, 10}
from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")

@mcp.tool
def greet(name: str) -> str:
    return f"Hello, {name}!"

if __name__ == "__main__":
    mcp.run(transport="http", port=8000)

This lets us run the server with python my_server.py. The stdio transport is the traditional way to connect MCP servers to clients, while the HTTP transport enables remote connections.

Why do we need the `if __name__ == "__main__":` block?

The __main__ block is recommended for consistency and compatibility, ensuring your server works with all MCP clients that execute your server file as a script. Users who will exclusively run their server with the FastMCP CLI can omit it, as the CLI imports the server object directly.

Using the FastMCP CLI

You can also use the fastmcp run command to start your server. Note that the FastMCP CLI does not execute the __main__ block of your server file. Instead, it imports your server object and runs it with whatever transport and options you provide.

For example, to run this server with the default stdio transport (no matter how you called mcp.run()), you can use the following command:

bash
fastmcp run my_server.py:mcp

To run this server with the HTTP transport, you can use the following command:

bash
fastmcp run my_server.py:mcp --transport http --port 8000

Call Your Server

Once your server is running with HTTP transport, you can connect to it with a FastMCP client or any LLM client that supports the MCP protocol:

python my_client.py
import asyncio
from fastmcp import Client

client = Client("http://localhost:8000/mcp")

async def call_tool(name: str):
    async with client:
        result = await client.call_tool("greet", {"name": name})
        print(result)

asyncio.run(call_tool("Ford"))

FastMCP clients are asynchronous, so the call goes through asyncio.run. Entering the client context with async with client: is what opens the connection, and it stays open for as many calls as you want to make inside the block.

Give Your Tool a UI

Tools normally return text, but any tool can return an interactive UI instead. Add app=True to your tool decorator and return a Prefab component — the host renders it as a chart, table, form, or any other visual element right in the conversation. This requires the apps extra (pip install "fastmcp[apps]").

The app=True flag tells FastMCP to wire up the renderer and protocol metadata automatically. The tool still works like any other MCP tool — it receives arguments and returns a result — but the result is a component tree that the host displays visually instead of as plain text.

python my_server.py
from prefab_ui.app import PrefabApp
from prefab_ui.components import Column, Heading, Text, Badge, Row
from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")


@mcp.tool(app=True)
def greet(name: str) -> PrefabApp:
    """Greet someone with a visual card."""
    with Column(gap=4, css_class="p-6") as view:
        Heading(f"Hello, {name}!")
        with Row(gap=2, align="center"):
            Text("Status")
            Badge("Greeted", variant="success")

    return PrefabApp(view=view)

You can preview app tools locally with fastmcp dev apps my_server.py — no MCP host required. See the Apps overview for the full guide, including state management, forms, charts, and server-connected interactivity.

Deploy Your Server

FastMCP HTTP servers run anywhere you can host a Python application. The HTTP deployment guide covers the transport settings and security boundaries for self-managed infrastructure.

For a managed deployment, FastMCP Gateway is the enterprise MCP platform built by the FastMCP team at Prefect. It provides hosting, authentication, access control, and observability for MCP servers.

FastMCP Gateway is free for personal projects and offers enterprise governance for teams.

To deploy your server, you'll need a GitHub account. Once you have one, you can deploy your server in three steps:

  1. Push your my_server.py file to a GitHub repository
  2. Sign in to FastMCP Gateway with your GitHub account
  3. Create a new project from your repository and enter my_server.py:mcp as the server entrypoint

FastMCP Gateway will build and deploy your server, making it available at a URL like https://your-project.fastmcp.app/mcp. You can chat with it to test its functionality, or connect to it from any LLM client that supports the MCP protocol.

For more details, see the FastMCP Gateway guide.


Servers Providers Overview (`docs/servers/providers/overview.mdx`)


title: Providers sidebarTitle: Overview icon: layer-group

import { VersionBadge } from '/snippets/version-badge.mdx'

Every FastMCP server has one or more component providers. A provider is a source of tools, resources, and prompts - it's what makes components available to clients.

What Is a Provider?

When a client connects to your server and asks "what tools do you have?", FastMCP asks each provider that question and combines the results. When a client calls a specific tool, FastMCP finds which provider has it and delegates the call.

You're already using providers. When you write @mcp.tool, you're adding a tool to your server's LocalProvider - the default provider that stores components you define directly in code. You just don't have to think about it for simple servers.

Providers become important when your components come from multiple sources: another FastMCP server to include, a remote MCP server to proxy, or a database where tools are defined dynamically. Each source gets its own provider, and FastMCP queries them all.

Why Providers?

The provider abstraction solves a common problem: as servers grow, you need to organize components across multiple sources without tangling everything together.

Composition: Break a large server into focused modules. A "weather" server and a "calendar" server can each be developed independently, then mounted into a main server. Each mounted server becomes a FastMCPProvider.

Proxying: Expose a remote MCP server through your local server. Maybe you're bridging transports (remote HTTP to local stdio) or aggregating multiple backends. Remote connections become ProxyProvider instances.

Dynamic sources: Load tools from a database, generate them from an OpenAPI spec, or create them based on user permissions. Custom providers let components come from anywhere.

Built-in Providers

FastMCP includes providers for common patterns:

Provider What it does How you use it
LocalProvider Stores components you define in code @mcp.tool, mcp.add_tool()
FastMCPProvider Wraps another FastMCP server mcp.mount(server)
ProxyProvider Connects to remote MCP servers create_proxy(client)

Most users only interact with LocalProvider (through decorators) and occasionally mount or proxy other servers. The provider abstraction stays invisible until you need it.

Transforms

Transforms modify components as they flow from providers to clients. Each transform sits in a chain, intercepting queries and modifying results before passing them along.

Transform Purpose
Namespace Prefixes names to avoid conflicts
ToolTransform Modifies tool schemas (rename, description, arguments)

The most common use is namespacing mounted servers to prevent name collisions. When you call mount(server, namespace="api"), FastMCP creates a Namespace transform automatically.

Transforms can be added to individual providers (affecting just that source) or to the server itself (affecting all components). See Transforms for the full picture.

Provider Order

When a client requests a component by name or URI, FastMCP queries providers and returns the highest matching version across the providers that have it. For unversioned components, or for components with equal versions, provider registration order is the tie-breaker.

LocalProvider is always registered first, so your decorator-defined components take precedence over equal-version components from mounted or proxied providers. Additional providers are registered in the order you add them.

When to Care About Providers

You can ignore providers entirely if you're building a simple server with decorators. Just use @mcp.tool, @mcp.resource, and @mcp.prompt - FastMCP handles the rest.

Learn about providers when you want to:

The decorators you already use are themselves a provider: LocalProvider is what backs @mcp.tool and its siblings.


V2 Getting Started Quickstart (`docs/v2/getting-started/quickstart.mdx`)


title: Quickstart icon: rocket-launch

Welcome! This guide will help you quickly set up FastMCP, run your first MCP server, and deploy a server to Prefect Horizon.

If you haven't already installed FastMCP, follow the installation instructions.

Create a FastMCP Server

A FastMCP server is a collection of tools, resources, and other MCP components. To create a server, start by instantiating the FastMCP class.

Create a new file called my_server.py and add the following code:

python my_server.py
from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")

That's it! You've created a FastMCP server, albeit a very boring one. Let's add a tool to make it more interesting.

Add a Tool

To add a tool that returns a simple greeting, write a function and decorate it with @mcp.tool to register it with the server:

python my_server.py {5-7}
from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")

@mcp.tool
def greet(name: str) -> str:
    return f"Hello, {name}!"

Run the Server

The simplest way to run your FastMCP server is to call its run() method. You can choose between different transports, like stdio for local servers, or http for remote access:

python my_server.py (stdio) {9, 10}
from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")

@mcp.tool
def greet(name: str) -> str:
    return f"Hello, {name}!"

if __name__ == "__main__":
    mcp.run()
python my_server.py (http) {9, 10}
from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")

@mcp.tool
def greet(name: str) -> str:
    return f"Hello, {name}!"

if __name__ == "__main__":
    mcp.run(transport="http", port=8000)

This lets us run the server with python my_server.py. The stdio transport is the traditional way to connect MCP servers to clients, while the HTTP transport enables remote connections.

Why do we need the `if __name__ == "__main__":` block?

The __main__ block is recommended for consistency and compatibility, ensuring your server works with all MCP clients that execute your server file as a script. Users who will exclusively run their server with the FastMCP CLI can omit it, as the CLI imports the server object directly.

Using the FastMCP CLI

You can also use the fastmcp run command to start your server. Note that the FastMCP CLI does not execute the __main__ block of your server file. Instead, it imports your server object and runs it with whatever transport and options you provide.

For example, to run this server with the default stdio transport (no matter how you called mcp.run()), you can use the following command:

bash
fastmcp run my_server.py:mcp

To run this server with the HTTP transport, you can use the following command:

bash
fastmcp run my_server.py:mcp --transport http --port 8000

Call Your Server

Once your server is running with HTTP transport, you can connect to it with a FastMCP client or any LLM client that supports the MCP protocol:

python my_client.py
import asyncio
from fastmcp import Client

client = Client("http://localhost:8000/mcp")

async def call_tool(name: str):
    async with client:
        result = await client.call_tool("greet", {"name": name})
        print(result)

asyncio.run(call_tool("Ford"))

Note that:

  • FastMCP clients are asynchronous, so we need to use asyncio.run to run the client
  • We must enter a client context (async with client:) before using the client
  • You can make multiple client calls within the same context

Deploy to Prefect Horizon

Prefect Horizon is the enterprise MCP platform built by the FastMCP team at Prefect. It provides managed hosting, authentication, access control, and observability for MCP servers.

Horizon is free for personal projects and offers enterprise governance for teams.

To deploy your server, you'll need a GitHub account. Once you have one, you can deploy your server in three steps:

  1. Push your my_server.py file to a GitHub repository
  2. Sign in to Prefect Horizon with your GitHub account
  3. Create a new project from your repository and enter my_server.py:mcp as the server entrypoint

That's it! Horizon will build and deploy your server, making it available at a URL like https://your-project.fastmcp.app/mcp. You can chat with it to test its functionality, or connect to it from any LLM client that supports the MCP protocol.

For more details, see the Prefect Horizon guide.


V3 Apps Overview (`docs/v3/apps/overview.mdx`)


title: Apps sidebarTitle: Overview icon: grid-2 mode: center

import { VersionBadge } from '/snippets/version-badge.mdx'
import PrefabPinWarning from '/snippets/prefab-pin-warning.mdx'
import { PrefabDemoFrame } from '/snippets/prefab-demo-frame.mdx'

A FastMCP app is a tool that returns an interactive UI instead of text. When the host calls it, the user sees a chart, a table, a form, or a whole dashboard rendered right inside the conversation, with working sort, search, tooltips, and state.

The dashboard above is a Prefab showcase — a taste of what you can deliver from a FastMCP tool. Every card, chart, slider, dialog, and carousel is a Python component. Build a composition like this, add @mcp.tool(app=True), and the host renders it inside the conversation.

Under the hood, FastMCP builds on the MCP Apps extension and uses Prefab to describe UIs in Python.

bash
pip install "fastmcp[apps]"

Pick your path

Four patterns cover almost everything you'd want to build. Most apps start with Interactive Tools; you only reach for the others when you've hit a specific limit.

[Interactive Tools](/apps/prefab) — start here

Add app=True to a tool and return a Prefab component. Charts, tables, dashboards, and client-side interactivity (toggles, tabs, filtering) all work without any server round-trips.

python
@mcp.tool(app=True)
def team_directory() -> DataTable:
    return DataTable(columns=[...], rows=employees, search=True)

[FastMCPApp](/apps/fastmcp-app) — when the UI calls back to the server

Forms that save data, buttons that trigger backend work, search that hits a database. FastMCPApp manages the wiring between UI actions and backend tools, with stable tool identifiers that survive server composition.

[Generative UI](/apps/generative) — when the LLM writes the UI

Register one provider and the model can write Prefab code tailored to the current data and request. The user watches the UI build up as the model generates it.

python
mcp.add_provider(GenerativeUI())

[Custom HTML](/apps/low-level) — when you need full control

Write your own HTML, CSS, and JavaScript. Use a specific framework, drop in a map or 3D viewer, embed video. You're talking to the MCP Apps protocol directly.

What's next

  • Quickstart — build a working app in a minute
  • Examples — complete working servers you can run today
  • Providers — ready-made capabilities (approvals, choice pickers, file upload, forms) you add with one line
  • Development — preview app tools locally with fastmcp dev apps

V3 Apps Quickstart (`docs/v3/apps/quickstart.mdx`)


title: Quickstart sidebarTitle: Quickstart icon: rocket tag: NEW

import { VersionBadge } from '/snippets/version-badge.mdx'
import { PrefabDemoFrame } from '/snippets/prefab-demo-frame.mdx'

By the end of this page, you'll have a working tool that returns this:

A pie chart the user can hover, a table they can sort and search — and a single Python tool.

Install

bash
pip install "fastmcp[apps]"

The apps extra pulls in Prefab, the Python component library used to build app UIs.

Write the tool

Create server.py. The interesting parts: app=True tells FastMCP this tool renders a UI, and with PrefabApp() as app: is the canonical pattern for composing one.

text
/* Detailed source-code truncated for AI context efficiency. */

The Prefab code reads top-to-bottom. PrefabApp() is the root; everything inside its with block becomes the UI. Column stacks children vertically, Grid lays them out in columns. DataTable takes rows and column definitions and gives you sort and search for free.

app=True does the rest: it sets up the renderer resource, the content security policy, and the metadata that tells the host "this tool returns a UI." The host loads the result in a sandboxed iframe where the user can interact with it — all client-side, no round-trips.

Preview it

FastMCP ships a dev server that renders your app tools in a browser, no MCP host needed:

bash
fastmcp dev apps server.py

Open http://localhost:8080, pick team_directory, and try sorting columns and searching.

Make it reactive

The UI above renders once from your Python. Prefab apps can also respond to user input live, without any server round-trips. The key concept is state: a client-side key-value store that components read from and write to.

Click a row in the demo below to see a detail card appear:

Add a few imports, give each member a couple more fields, wire up a click handler, and render a detail card when something's selected:

text
/* Detailed source-code truncated for AI context efficiency. */

Three new ideas do all the work:

  • on_row_click=SetState("selected", Rx("$event")) — clicking a row writes its data into the selected state key. $event is the clicked row dict.
  • Rx("selected.name") — a reactive reference. It doesn't hold a Python value; it compiles to a browser-side expression that re-evaluates whenever selected changes, so Text(Rx("selected.name")) always shows the latest clicked name.
  • If(STATE.selected) — conditionally renders its body. Before any click, selected is None and the card stays hidden.

The state={"selected": None} dict on PrefabApp sets the initial value. Everything else happens in the browser — no round-trips to your server when the user clicks.

Where to go next

You've built a tool that returns an interactive, reactive UI. This pattern covers a huge range of use cases: build a visualization, return it, and the user gets it rendered right in the conversation.

  • Interactive Tools — charts, tables, dashboards, reactive state, with live demos
  • FastMCPApp — when the UI needs to call back to your server (forms, search, CRUD)
  • Examples — complete working servers you can run today

V3 Cli Overview (`docs/v3/cli/overview.mdx`)


title: CLI sidebarTitle: Overview icon: terminal

import { VersionBadge } from '/snippets/version-badge.mdx'

The fastmcp CLI is installed automatically with FastMCP. It's the primary way to run, test, install, and interact with MCP servers from your terminal.

bash
fastmcp --help

Commands at a Glance

Command What it does
run Run a server (local file, factory function, remote URL, or config file)
dev apps Launch a browser-based preview UI for Prefab App tools
dev inspector Launch a server inside the MCP Inspector for interactive testing
install Install a server into Claude Code, Claude Desktop, Cursor, Gemini CLI, or Goose
inspect Print a server's tools, resources, and prompts as a summary or JSON report
list List a server's tools (and optionally resources and prompts)
call Call a single tool with arguments
discover Find MCP servers configured in your editors and tools
generate-cli Scaffold a standalone typed CLI from a server's tool schemas
project prepare Pre-install dependencies into a reusable uv project
auth cimd Create and validate CIMD documents for OAuth
version Print version info (--copy to copy to clipboard)

Server Targets

Most commands need to know which server to talk to. You pass a "server spec" as the first argument, and FastMCP resolves the right transport automatically.

URLs connect to a running HTTP server:

bash
fastmcp list http://localhost:8000/mcp
fastmcp call http://localhost:8000/mcp get_forecast city=London

Python files are loaded directly — no mcp.run() boilerplate needed. FastMCP finds a server instance named mcp, server, or app in the file, or you can specify one explicitly:

bash
fastmcp list server.py
fastmcp run server.py:my_custom_server

Config files work too — both FastMCP's own fastmcp.json format and standard MCP config files with an mcpServers key:

bash
fastmcp run fastmcp.json
fastmcp list mcp-config.json

Stdio commands connect to any MCP server that speaks over standard I/O. Use --command instead of a positional argument:

bash
fastmcp list --command 'npx -y @modelcontextprotocol/server-github'

Name-Based Resolution

If your servers are already configured in an editor or tool, you can refer to them by name. FastMCP scans configs from Claude Desktop, Claude Code, Cursor, Gemini CLI, and Goose:

bash
fastmcp list weather
fastmcp call weather get_forecast city=London

When the same name appears in multiple configs, use the source:name form to be specific:

bash
fastmcp list claude-code:my-server
fastmcp call cursor:weather get_forecast city=London

Run fastmcp discover to see what's available on your machine.

Authentication

When targeting an HTTP URL, the CLI enables OAuth authentication by default. If the server requires it, you'll be guided through the flow (typically opening a browser). If it doesn't, the setup is a silent no-op.

To skip authentication entirely — useful for local development servers — pass --auth none:

bash
fastmcp call http://localhost:8000/mcp my_tool --auth none

You can also pass a bearer token directly:

bash
fastmcp list http://localhost:8000/mcp --auth "Bearer sk-..."

Transport Override

FastMCP defaults to Streamable HTTP for URL targets. If the server only supports Server-Sent Events (SSE), force the older transport:

bash
fastmcp list http://localhost:8000 --transport sse

V3 Community README (`docs/v3/community/README.md`)

Community Section

This directory contains community-contributed content and showcases for FastMCP.

Structure

  • showcase.mdx - Main community showcase page featuring high-quality projects and examples

Adding Content

To add new community content:

  1. Create a new MDX file in this directory
  2. Update docs.json to include it in the navigation
  3. Follow the existing format for consistency

Guidelines

Community content should:

  • Demonstrate best practices
  • Provide educational value
  • Include proper documentation
  • Be maintained and up-to-date

V3 Getting Started Quickstart (`docs/v3/getting-started/quickstart.mdx`)


title: Quickstart icon: rocket-launch

Welcome! This guide will help you quickly set up FastMCP, run your first MCP server, give it a visual UI, and deploy it to Prefect Horizon.

If you haven't already installed FastMCP, follow the installation instructions.

Create a FastMCP Server

A FastMCP server is a collection of tools, resources, and other MCP components. To create a server, start by instantiating the FastMCP class.

Create a new file called my_server.py and add the following code:

python my_server.py
from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")

That's it! You've created a FastMCP server, albeit a very boring one. Let's add a tool to make it more interesting.

Add a Tool

To add a tool that returns a simple greeting, write a function and decorate it with @mcp.tool to register it with the server:

python my_server.py {5-7}
from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")

@mcp.tool
def greet(name: str) -> str:
    return f"Hello, {name}!"

Run the Server

The simplest way to run your FastMCP server is to call its run() method. You can choose between different transports, like stdio for local servers, or http for remote access:

python my_server.py (stdio) {9, 10}
from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")

@mcp.tool
def greet(name: str) -> str:
    return f"Hello, {name}!"

if __name__ == "__main__":
    mcp.run()
python my_server.py (http) {9, 10}
from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")

@mcp.tool
def greet(name: str) -> str:
    return f"Hello, {name}!"

if __name__ == "__main__":
    mcp.run(transport="http", port=8000)

This lets us run the server with python my_server.py. The stdio transport is the traditional way to connect MCP servers to clients, while the HTTP transport enables remote connections.

Why do we need the `if __name__ == "__main__":` block?

The __main__ block is recommended for consistency and compatibility, ensuring your server works with all MCP clients that execute your server file as a script. Users who will exclusively run their server with the FastMCP CLI can omit it, as the CLI imports the server object directly.

Using the FastMCP CLI

You can also use the fastmcp run command to start your server. Note that the FastMCP CLI does not execute the __main__ block of your server file. Instead, it imports your server object and runs it with whatever transport and options you provide.

For example, to run this server with the default stdio transport (no matter how you called mcp.run()), you can use the following command:

bash
fastmcp run my_server.py:mcp

To run this server with the HTTP transport, you can use the following command:

bash
fastmcp run my_server.py:mcp --transport http --port 8000

Call Your Server

Once your server is running with HTTP transport, you can connect to it with a FastMCP client or any LLM client that supports the MCP protocol:

python my_client.py
import asyncio
from fastmcp import Client

client = Client("http://localhost:8000/mcp")

async def call_tool(name: str):
    async with client:
        result = await client.call_tool("greet", {"name": name})
        print(result)

asyncio.run(call_tool("Ford"))

Note that:

  • FastMCP clients are asynchronous, so we need to use asyncio.run to run the client
  • We must enter a client context (async with client:) before using the client
  • You can make multiple client calls within the same context

Give Your Tool a UI

Tools normally return text, but any tool can return an interactive UI instead. Add app=True to your tool decorator and return a Prefab component — the host renders it as a chart, table, form, or any other visual element right in the conversation. This requires the apps extra (pip install "fastmcp[apps]").

The app=True flag tells FastMCP to wire up the renderer and protocol metadata automatically. The tool still works like any other MCP tool — it receives arguments and returns a result — but the result is a component tree that the host displays visually instead of as plain text.

python my_server.py
from prefab_ui.app import PrefabApp
from prefab_ui.components import Column, Heading, Text, Badge, Row
from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")


@mcp.tool(app=True)
def greet(name: str) -> PrefabApp:
    """Greet someone with a visual card."""
    with Column(gap=4, css_class="p-6") as view:
        Heading(f"Hello, {name}!")
        with Row(gap=2, align="center"):
            Text("Status")
            Badge("Greeted", variant="success")

    return PrefabApp(view=view)

You can preview app tools locally with fastmcp dev apps my_server.py — no MCP host required. See the Apps overview for the full guide, including state management, forms, charts, and server-connected interactivity.

Deploy to Prefect Horizon

Prefect Horizon is the enterprise MCP platform built by the FastMCP team at Prefect. It provides managed hosting, authentication, access control, and observability for MCP servers.

Horizon is free for personal projects and offers enterprise governance for teams.

To deploy your server, you'll need a GitHub account. Once you have one, you can deploy your server in three steps:

  1. Push your my_server.py file to a GitHub repository
  2. Sign in to Prefect Horizon with your GitHub account
  3. Create a new project from your repository and enter my_server.py:mcp as the server entrypoint

That's it! Horizon will build and deploy your server, making it available at a URL like https://your-project.fastmcp.app/mcp. You can chat with it to test its functionality, or connect to it from any LLM client that supports the MCP protocol.

For more details, see the Prefect Horizon guide.


V3 Servers Providers Overview (`docs/v3/servers/providers/overview.mdx`)


title: Providers sidebarTitle: Overview icon: layer-group tag: NEW

import { VersionBadge } from '/snippets/version-badge.mdx'

Every FastMCP server has one or more component providers. A provider is a source of tools, resources, and prompts - it's what makes components available to clients.

What Is a Provider?

When a client connects to your server and asks "what tools do you have?", FastMCP asks each provider that question and combines the results. When a client calls a specific tool, FastMCP finds which provider has it and delegates the call.

You're already using providers. When you write @mcp.tool, you're adding a tool to your server's LocalProvider - the default provider that stores components you define directly in code. You just don't have to think about it for simple servers.

Providers become important when your components come from multiple sources: another FastMCP server to include, a remote MCP server to proxy, or a database where tools are defined dynamically. Each source gets its own provider, and FastMCP queries them all seamlessly.

Why Providers?

The provider abstraction solves a common problem: as servers grow, you need to organize components across multiple sources without tangling everything together.

Composition: Break a large server into focused modules. A "weather" server and a "calendar" server can each be developed independently, then mounted into a main server. Each mounted server becomes a FastMCPProvider.

Proxying: Expose a remote MCP server through your local server. Maybe you're bridging transports (remote HTTP to local stdio) or aggregating multiple backends. Remote connections become ProxyProvider instances.

Dynamic sources: Load tools from a database, generate them from an OpenAPI spec, or create them based on user permissions. Custom providers let components come from anywhere.

Built-in Providers

FastMCP includes providers for common patterns:

Provider What it does How you use it
LocalProvider Stores components you define in code @mcp.tool, mcp.add_tool()
FastMCPProvider Wraps another FastMCP server mcp.mount(server)
ProxyProvider Connects to remote MCP servers create_proxy(client)

Most users only interact with LocalProvider (through decorators) and occasionally mount or proxy other servers. The provider abstraction stays invisible until you need it.

Transforms

Transforms modify components as they flow from providers to clients. Each transform sits in a chain, intercepting queries and modifying results before passing them along.

Transform Purpose
Namespace Prefixes names to avoid conflicts
ToolTransform Modifies tool schemas (rename, description, arguments)

The most common use is namespacing mounted servers to prevent name collisions. When you call mount(server, namespace="api"), FastMCP creates a Namespace transform automatically.

Transforms can be added to individual providers (affecting just that source) or to the server itself (affecting all components). See Transforms for the full picture.

Provider Order

When a client requests a tool, FastMCP queries providers in registration order. The first provider that has the tool handles the request.

LocalProvider is always first, so your decorator-defined tools take precedence. Additional providers are queried in the order you added them. This means if two providers have a tool with the same name, the first one wins.

When to Care About Providers

You can ignore providers entirely if you're building a simple server with decorators. Just use @mcp.tool, @mcp.resource, and @mcp.prompt - FastMCP handles the rest.

Learn about providers when you want to:

Next Steps

  • Local - How decorators work
  • Mounting - Compose servers together
  • Proxying - Connect to remote servers
  • Transforms - Namespace, rename, and modify components
  • Visibility - Control which components clients can access
  • Custom - Build your own providers

Changelog (`docs/changelog.mdx`)


title: "Changelog" icon: "list-check" rss: true tag: NEW

v4.2.0: Mad Skills

FastMCP 4.2 makes skills something a server can serve. A Skill is now a plain value — a name, a description, instructions and files, validated once when you build it — and you can load one from a directory or a package, or build it in code. Put skills on a server with SkillCatalogProvider or SkillsDirectoryProvider and they're served as ordinary resources; clients that speak the experimental Skills extension also get skills/list with a hashed manifest per skill. Client support is still uneven, so FastMCP's own client covers the gap: Client.read_skill() verifies every file's size and digest, and to_directory() installs a skill into any agent's skills folder. Skills follow the rest of FastMCP's composition: they namespace under mounts, pass through proxies with skills=True, list across a ClientGroup, and respect AuthMiddleware.

Dependencies got two upgrades. A dependency can live in the annotation (Annotated[dict, Depends(get_config)]), so the parameter keeps its real type, and a dependency can now own the tool argument it reads through CallArgument. The rest is a broad sweep of fixes across OpenAPI, proxies, auth, telemetry and tasks, including completion no longer suggesting values for prompts or templates a caller can't see.

Check these before upgrading:

  • Python 3.11 or newer is required.
  • The 4.1 skills API is deprecated and goes away in 4.3. The old providers in fastmcp.server.providers.skills and helpers in fastmcp.utilities.skills still work and warn with their replacement; the skills docs have a migration table.
  • Skill is now the authoring class. The wire model that used that name is MCPSkill; the old import keeps working until 4.3.

Thanks to our 129 contributors, including 55 first-time contributors.

Breaking Changes ⚠️

Enhancements ✨

Security 🔒

Fixes 🐞

Docs 📚

Examples & Contrib 💡

Dependencies 📦

Other Changes 🦾

New Contributors

  • @adam-zovos made their first contribution in #6039
  • @fprieto14 made their first contribution in #6077
  • @keremoktener made their first contribution in #6077
  • @gl1tchdust made their first contribution in #5976
  • @Yash-Tripath1 made their first contribution in #6104
  • @ianw made their first contribution in #6255
  • @hntrl made their first contribution in #6268
  • @YingzuoLiu made their first contribution in #6268
  • @mohitdixit02 made their first contribution in #6311
  • @chris00234 made their first contribution in #6075
  • @67-luck made their first contribution in #6376
  • @mahekara28 made their first contribution in #6310
  • @shayanxcyber made their first contribution in #6041
  • @DMomplaisir made their first contribution in #6045
  • @xu91102 made their first contribution in #6045
  • @KnittelK made their first contribution in #6215
  • @bkranendonk made their first contribution in #6264
  • @kartikmadan11 made their first contribution in #6158
  • @totoyang made their first contribution in #6133
  • @hanhyperfx made their first contribution in #6147
  • @xiong-wei1 made their first contribution in #6061
  • @anh-nguyenn made their first contribution in #6054
  • @jamesmaidment made their first contribution in #5775
  • @yannvr made their first contribution in #5779
  • @akushonkamen made their first contribution in #5666
  • @anormang1992 made their first contribution in #5666
  • @jeffsawatzky made their first contribution in #5566
  • @rasokiwayami made their first contribution in #5566
  • @omikader made their first contribution in #5565
  • @dream-star-end made their first contribution in #5562
  • @YogaSakti made their first contribution in #5665
  • @Pyhroff made their first contribution in #6063
  • @Larry-Labs made their first contribution in #5664
  • @adrianto-nanovest made their first contribution in #5062
  • @lancy69 made their first contribution in #5062
  • @xixi-box made their first contribution in #6198
  • @glopezz made their first contribution in #6107
  • @BHAWESHBHASKAR made their first contribution in #6012
  • @Christian-Sidak made their first contribution in #6012
  • @Kushal9889 made their first contribution in #5980
  • @Abhi2939 made their first contribution in #5969
  • @ezz3r made their first contribution in #5969
  • @Lpk124 made their first contribution in #5763
  • @maxime-gautre made their first contribution in #5763
  • @lux-liang made their first contribution in #5588
  • @gshklovs made their first contribution in #5169
  • @ninadewane made their first contribution in #6462
  • @MayankTamakuwala made their first contribution in #6419
  • @Ngtvu1752 made their first contribution in #6423
  • @dsfaccini made their first contribution in #6425
  • @ldlda made their first contribution in #6426
  • @carterthayer made their first contribution in #6428
  • @AlyLanier made their first contribution in #6422
  • @CaselIT made their first contribution in #6429
  • @swantzter made their first contribution in #6429

Full Changelog: v4.1.4...v4.2.0

v4.2.0a5: Skillium Fancyson

FastMCP 4.2.0a5 adds SkillManifestProvider, which serves skills from their manifests (frontmatter plus each file's digest and size) and reads a file only when a client reads it, so skills kept in a bucket or database don't have to be loaded to answer skills/list. SkillCatalogProvider now builds on it and no longer re-hashes every file on each request. Since a4, a dependency can own the tool argument it reads through CallArgument, completion no longer suggests values for prompts or templates a caller can't see, ctx.info() and the other logging helpers work inside background tasks, and a final polish pass covered docs, examples and docstrings. This is the last prerelease before 4.2.0. Thanks to our 128 contributors, including 54 first-time contributors.

Breaking Changes ⚠️

Enhancements ✨

Security 🔒

Fixes 🐞

Docs 📚

Examples & Contrib 💡

Dependencies 📦

Other Changes 🦾

New Contributors

  • @adam-zovos made their first contribution in #6039
  • @fprieto14 made their first contribution in #6077
  • @keremoktener made their first contribution in #6077
  • @gl1tchdust made their first contribution in #5976
  • @Yash-Tripath1 made their first contribution in #6104
  • @ianw made their first contribution in #6255
  • @hntrl made their first contribution in #6268
  • @YingzuoLiu made their first contribution in #6268
  • @mohitdixit02 made their first contribution in #6311
  • @chris00234 made their first contribution in #6075
  • @67-luck made their first contribution in #6376
  • @mahekara28 made their first contribution in #6310
  • @shayanxcyber made their first contribution in #6041
  • @DMomplaisir made their first contribution in #6045
  • @xu91102 made their first contribution in #6045
  • @KnittelK made their first contribution in #6215
  • @bkranendonk made their first contribution in #6264
  • @kartikmadan11 made their first contribution in #6158
  • @totoyang made their first contribution in #6133
  • @hanhyperfx made their first contribution in #6147
  • @xiong-wei1 made their first contribution in #6061
  • @anh-nguyenn made their first contribution in #6054
  • @jamesmaidment made their first contribution in #5775
  • @yannvr made their first contribution in #5779
  • @akushonkamen made their first contribution in #5666
  • @anormang1992 made their first contribution in #5666
  • @jeffsawatzky made their first contribution in #5566
  • @rasokiwayami made their first contribution in #5566
  • @omikader made their first contribution in #5565
  • @dream-star-end made their first contribution in #5562
  • @YogaSakti made their first contribution in #5665
  • @Pyhroff made their first contribution in #6063
  • @Larry-Labs made their first contribution in #5664
  • @adrianto-nanovest made their first contribution in #5062
  • @lancy69 made their first contribution in #5062
  • @xixi-box made their first contribution in #6198
  • @glopezz made their first contribution in #6107
  • @BHAWESHBHASKAR made their first contribution in #6012
  • @Christian-Sidak made their first contribution in #6012
  • @Kushal9889 made their first contribution in #5980
  • @Abhi2939 made their first contribution in #5969
  • @ezz3r made their first contribution in #5969
  • @Lpk124 made their first contribution in #5763
  • @maxime-gautre made their first contribution in #5763
  • @lux-liang made their first contribution in #5588
  • @gshklovs made their first contribution in #5169
  • @MayankTamakuwala made their first contribution in #6419
  • @Ngtvu1752 made their first contribution in #6423
  • @dsfaccini made their first contribution in #6425
  • @ldlda made their first contribution in #6426
  • @carterthayer made their first contribution in #6428
  • @AlyLanier made their first contribution in #6422
  • @CaselIT made their first contribution in #6429
  • @swantzter made their first contribution in #6429

Full Changelog: v4.1.4...v4.2.0a5

v4.2.0a4: Skills to Pay the Bills

FastMCP 4.2.0a4 requires Python 3.11 or newer and adds Annotated dependencies. Depends(...) and built-ins such as CurrentContext() can now be declared as Annotated metadata, so a type alias like Config = Annotated[dict, Depends(get_config)] works across tools, resources, and prompts. Skill discovery over plain resources no longer lists a nested supporting SKILL.md as its own skill, and download_skill URIs now encode manifest paths. Since a3, the redirect URI helpers normalize raw strings the way browsers read them, the joserfc and Authlib floors pick up security fixes, and fixes land for OpenAPI request bodies, CIMD redirect URIs, multi-select elicitation schemas, search indexing, and docstring parsing. Skills support remains experimental; this prerelease is intended for integration testing. Thanks to our 68 contributors, including 40 first-time contributors.

Breaking Changes ⚠️

Enhancements ✨

Security 🔒

Fixes 🐞

Docs 📚

Other Changes 🦾

New Contributors

  • @fprieto14 made their first contribution in #6077
  • @keremoktener made their first contribution in #6077
  • @gaker made their first contribution in #6170
  • @zhuweid made their first contribution in #6337
  • @jaeminbird made their first contribution in #6113
  • @mbishflavien made their first contribution in #6113
  • @shi-felix made their first contribution in #6352
  • @adam-zovos made their first contribution in #6039
  • @Yash-Tripath1 made their first contribution in #6104
  • @likecake made their first contribution in #6191
  • @PennEwan made their first contribution in #6200
  • @whoskn made their first contribution in #6097
  • @eli-yip made their first contribution in #5810
  • @gdut4140 made their first contribution in #5727
  • @BlueLi66 made their first contribution in #5716
  • @yongpange made their first contribution in #6240
  • @nosmile99 made their first contribution in #6242
  • @mheidari98 made their first contribution in #6242
  • @arieleven made their first contribution in #6248
  • @mumu-bird made their first contribution in #5633
  • @sonmaximum made their first contribution in #6252
  • @zurmag made their first contribution in #6257
  • @mohitdixit02 made their first contribution in #6311
  • @chris00234 made their first contribution in #6075
  • @ColePBryan made their first contribution in #6335
  • @codesphere-u made their first contribution in #6347
  • @Vivek1898 made their first contribution in #6361
  • @pratyu2h made their first contribution in #6277
  • @maxmorrish made their first contribution in #6277
  • @rome-xi made their first contribution in #6340
  • @wang1299 made their first contribution in #6340
  • @xunWhale made their first contribution in #6321
  • @67-luck made their first contribution in #6376
  • @mahekara28 made their first contribution in #6310
  • @gl1tchdust made their first contribution in #5976
  • @ianw made their first contribution in #6255
  • @madureira-gabriel made their first contribution in #6287
  • @DivyaNarahari97 made their first contribution in #6275
  • @jlx1999s made their first contribution in #6372
  • @ptrailblazer89 made their first contribution in #6372

Full Changelog: v4.1.6...v4.2.0a4

v4.2.0a3: A Particular Set of Skills

FastMCP 4.2.0a3 consolidates skills around Skill, SkillCatalogProvider, and the new strict SkillsDirectoryProvider in fastmcp.skills.provider. Directory loading validates each skill before publication, and skills with structured metadata or YAML allowed-tools lists are accepted without changing their values. This alpha also fixes stale proxy discovery caches, preserves OpenAPI schema references and explicit null values, and improves client connection recovery. Skills support remains experimental; this prerelease is intended for integration testing. If you import the 4.1 skills providers directly, they keep their behavior in 4.2 and now warn ahead of removal in 4.3. Move directory loading to from fastmcp.skills.provider import SkillsDirectoryProvider; its startup errors and the legacy providers' warnings identify folders that need fixing. For a single skill, use Skill.from_directory(...) with SkillCatalogProvider from fastmcp.skills.provider. Client.list_skill_resources() remains available for servers without the Skills extension. The old experimental_skills=True path redirects to the new provider for the base class and rejects subclasses to preserve access controls. Legacy Skill wire-model construction still works with a warning, wire entries retain isinstance(entry, Skill) behavior, and existing Pydantic Skill fields still validate wire payloads. Use MCPSkill for wire entries, annotations, and checks, and Skill for authoring. For manifest metadata on resource-only servers, read skill://<name>/_manifest with client.read_resource() and parse its JSON; client.get_skill() requires the Skills extension, while client.read_skill() downloads and validates the whole skill. Since a2, ClientGroup retains known tool routes after its context exits, OpenAPI tool inputs omit readOnly properties, and header and path parameters follow their declared simple serialization style. OAuth consent bindings survive concurrent approvals, exception middleware matches subclasses, and empty logging method filters mean “log nothing.” Thanks to our 46 contributors, including 29 first-time contributors.

Breaking Changes ⚠️

  • Make Skill a storage-neutral object with folders as one loader by @zzstoatzz in #6065

Enhancements ✨

Security 🔒

  • Verify advertised skill frontmatter when reading content by @zzstoatzz in #6090
  • Check skill limits before reading directory and remote files by @zzstoatzz in #6092
  • fix: preserve _list_query_params in FastMCPProviderResourceTemplate.wrap by @RS-ITACHI in #6130
  • Read composite action inputs from env and pin actions by digest by @gaker in #6168
  • Scope the /marvin App token to the permissions it uses by @zzstoatzz in #6206

Fixes 🐞

Docs 📚

Other Changes 🦾

New Contributors

  • @adam-zovos made their first contribution in #6039
  • @alpaylan made their first contribution in #6126
  • @BlueLi66 made their first contribution in #5716
  • @eli-yip made their first contribution in #5810
  • @fprieto14 made their first contribution in #6077
  • @gaker made their first contribution in #6168
  • @gdut4140 made their first contribution in #5727
  • @gl1tchdust made their first contribution in #5976
  • @hntrl made their first contribution in #6268
  • @ianw made their first contribution in #6255
  • @KashifManzer made their first contribution in #6119
  • @keremoktener made their first contribution in #6077
  • @likecake made their first contribution in #6191
  • @mheidari98 made their first contribution in #6242
  • @mssaleh made their first contribution in #6141
  • @mumu-bird made their first contribution in #5633
  • @nosmile99 made their first contribution in #6242
  • @PennEwan made their first contribution in #6200
  • @prassu017 made their first contribution in #6104
  • @RS-ITACHI made their first contribution in #6130
  • @serhiizghama made their first contribution in #5230
  • @sonmaximum made their first contribution in #6252
  • @taltal-beep made their first contribution in #6248
  • @whoskn made their first contribution in #6097
  • @xubenqiang made their first contribution in #6027
  • @Yash-Tripath1 made their first contribution in #6104
  • @YingzuoLiu made their first contribution in #6268
  • @yongpange made their first contribution in #6240
  • @zurmag made their first contribution in #6257

Full Changelog: v4.1.6...v4.2.0a3

v4.2.0a2: Skill Waters Run Deep

The second 4.2 alpha carries every fix from 4.1.5 plus the ones that only land on 4.2: Skills discovery through proxies pages its backends with a bound, pre-4.2 Prefab backend addresses rebind through 4.2 proxies, large tool catalogs expand their schemas faster, and kept-alive stdio transports respect each client's timeout. Before tagging, this build ran against pydantic-ai, langchain, agno, Microsoft Agent Framework, and the OpenAI Agents SDK. Skills support remains experimental; this prerelease is intended for integration testing. Behavior changes since a1: JSON Schema const and enum compare by JSON equality, so true no longer passes for 1; prompts/get with a missing argument returns invalid params (-32602); OpenAPI upstream errors are cut to 1 KB with HTML bodies dropped, and strict input validation rejects undeclared OpenAPI arguments; a later client with a different timeout restarts an idle kept-alive stdio subprocess, while one nested inside a live client shares its session's timeout and logs a warning. Thanks to our 22 contributors, including 13 first-time contributors.

Breaking Changes ⚠️

  • Make Skill a storage-neutral object with folders as one loader by @zzstoatzz in #6065

Enhancements ✨

Security 🔒

  • Verify advertised skill frontmatter when reading content by @zzstoatzz in #6090
  • Check skill limits before reading directory and remote files by @zzstoatzz in #6092
  • fix: preserve _list_query_params in FastMCPProviderResourceTemplate.wrap by @RS-ITACHI in #6130
  • Read composite action inputs from env and pin actions by digest by @gaker in #6168
  • Scope the /marvin App token to the permissions it uses by @zzstoatzz in #6206

Fixes 🐞

Docs 📚

New Contributors

  • @adam-zovos made their first contribution in #6039
  • @gl1tchdust made their first contribution in #5976
  • @RS-ITACHI made their first contribution in #6130
  • @prassu017 made their first contribution in #6126
  • @KashifManzer made their first contribution in #6119
  • @serhiizghama made their first contribution in #5230
  • @gaker made their first contribution in #6168
  • @fprieto14 made their first contribution in #6077
  • @keremoktener made their first contribution in #6077
  • @mssaleh made their first contribution in #6141
  • @alpaylan made their first contribution in #6126
  • @xubenqiang made their first contribution in #6027
  • @Yash-Tripath1 made their first contribution in #6104

Full Changelog: v4.1.4...v4.2.0a2

v4.2.0a1: Skill Issue

FastMCP 4.2's first alpha brings code-defined skills, discovery through mounted and proxied servers, and verified downloads into one workflow. Build a Skill in Python or load one from a folder or package, publish it through SkillCatalogProvider, and let clients discover its metadata or download and export its files. Proxy discovery is opt-in with skills=True. Skills support remains experimental; this prerelease is intended for integration testing. It also includes lazy, shared Prefab renderer resources and backend-addressing fixes. Migration: Skill now represents file contents; the wire metadata model is named MCPSkill. Whole-skill downloads require a standard SKILL.md with a name matching its URI and a description. Exports with overwrite=True replace the installed folder, including locally added files. Ordinary resource providers still support their existing document formats. Thanks to our 8 contributors, including 3 first-time contributors.

Breaking Changes ⚠️

  • Make Skill a storage-neutral object with folders as one loader by @zzstoatzz in #6065

Enhancements ✨

Security 🔒

  • Verify advertised skill frontmatter when reading content by @zzstoatzz in #6090
  • Check skill limits before reading directory and remote files by @zzstoatzz in #6092

Fixes 🐞

  • Make the version-check InvalidURL regression independent of proxy parsing by @HootRock in #6048
  • Build the Prefab renderer page on read, not on resources/list by @adam-zovos in #6039
  • Install mounted skills under their own name in sync_skills by @zzstoatzz in #6078
  • Stage skill exports before replacing installed files by @zzstoatzz in #6091
  • fix: Prefix backend hash addresses with double underscores by @jlowin and @BlueX888 in #6100

Docs 📚

New Contributors

  • @fprieto14 made their first contribution in #6077
  • @keremoktener made their first contribution in #6077
  • @adam-zovos made their first contribution in #6039

Full Changelog: v4.1.4...v4.2.0a1

v4.1.4: Token Gesture

Generated CLIs now preserve remote transports, empty arrays, and parameters whose names collide with their own helpers; mounted servers honor session visibility and mounted_components_raise_on_load_error, a stale client context no longer closes a newer session, and OAuth provider wrappers accept identity assertions. Tasks accept a redis-py credential provider that returns current credentials for each new connection (streaming providers such as redis-entraid's are rejected until Docket can refresh them safely), Redis 8.1.0 is excluded, and custom KeyringStore users must now install py-key-value-aio[keyring] explicitly. Thanks to our 16 contributors, including 9 first-time contributors.

Enhancements ✨

Security 🔒

Fixes 🐞

Docs 📚

New Contributors

  • @dailyun made their first contribution in #5961
  • @Vittuu made their first contribution in #5959
  • @leopranzl made their first contribution in #5966
  • @nazarii-plebanskyi-rf made their first contribution in #5970
  • @tom42-otera made their first contribution in #5987
  • @computeaholic made their first contribution in #6006
  • @jonaseck2 made their first contribution in #6006
  • @PrathmeshPawar2110 made their first contribution in #6016
  • @Lokeshrao69 made their first contribution in #6014

Full Changelog: v4.1.3...v4.1.4

v4.1.3: Root Awakening

This release updates certifi-backed dependencies following the eMudhra CA compromise and fixes public-client OAuth authentication, empty visibility selections, generator transforms, and per-server timeouts for ordinary requests. FastMCP 4 uses system trust by default: follow the security notice to update operating-system, container, custom, and installer trust stores; upgrading FastMCP alone is insufficient. Thanks to our 11 contributors, including 6 first-time contributors.

Security 🔒

  • Require certifi 2026.10.19 or later for certifi-backed server dependencies and optional SDK integrations, and document system, custom, and installer trust-store updates by @zzstoatzz in #5945.

Enhancements ✨

Fixes 🐞

New Contributors

  • @phnmn made their first contribution in #5758
  • @CRYPTONIKAV made their first contribution in #5758
  • @himanshuchawla0807-gif made their first contribution in #5944
  • @CharlesYXW made their first contribution in #5584
  • @atty57 made their first contribution in #5758
  • @Wilson0511 made their first contribution in #5940

Full Changelog: v4.1.2...v4.1.3

v4.1.2: License to Deny

Component authorization now applies after transforms, denied resources cannot fall through matching templates, and OAuth client credentials providers support issuer binding across fresh and cached-token flows. Existing configurations remain compatible, but users of ClientCredentialsOAuthProvider or PrivateKeyJWTOAuthProvider must set issuer to enable this protection; upgrading alone is insufficient. Thanks to our 18 contributors, including 9 first-time contributors.

Security 🔒

  • Authorize transformed components and prevent denied-resource template fallback by @zzstoatzz and @rishid in #5933
  • Bind OAuth client credentials to a configured issuer, including cached-token renewal, by @zzstoatzz and @LHMisme420 in #5933

Enhancements ✨

  • Add SEP-2640 Skills extension foundation by @strawgate in #5057
  • Write down triage and merge norms in docs/development by @zzstoatzz in #5872
  • Add experimental Skills discovery to SkillsDirectoryProvider by @zzstoatzz in #5704

Fixes 🐞

Docs 📚

Examples & Contrib 💡

Other Changes 🦾

New Contributors

  • @AarnavNoble made their first contribution in #5751

  • @hardness1020 made their first contribution in #5742

  • @jsphbtst made their first contribution in #5647

  • @marcinbelczewski made their first contribution in #5190

  • @jiuyueQ made their first contribution in #5582

  • @massimiliano1991 made their first contribution in #5063

  • @imranq2 made their first contribution in #5832

  • @rishid made their first contribution in #5933

  • @LHMisme420 made their first contribution in #5933

Full Changelog: v4.1.1...v4.1.2

v4.1.1: Regex Marks the Spot

Regex tool search now rejects patterns over 1,000 characters and stops after about a second, and SkillsDirectoryProvider discovers skill folders that are links again, including links to folders outside the skills root; a skill's own files must still resolve inside the folder it links to. All 4.x users are encouraged to upgrade. Thanks to our 4 contributors, including 1 first-time contributor.

Security 🔒

Fixes 🐞

Examples & Contrib 💡

  • fix: convert version query param to VersionSpec in component manager routes by @BlueX888 in #5575

New Contributors

  • @ker2xu made their first contribution in #5639

Full Changelog: v4.1.0...v4.1.1

v4.1.0: Fourth and One

FastMCP 4.1.0 is a maintenance release at heart: a broad sweep of fixes across OpenAPI, proxies, auth, tasks, and the CLI, plus full Python 3.15 support. It doesn't change how most servers behave. A few security fixes do tighten inputs that FastMCP previously accepted, though, and our versioning policy keeps breaking changes out of patch releases, so this ships as a point-one release.

Check these before upgrading:

  • MultiAuth now qualifies client IDs by source, so existing MultiAuth sessions and tasks start new ownership scopes. Finish pending tasks before upgrading.
  • Regex tool search uses Pydantic's regex engine, which doesn't support lookarounds or backreferences.
  • Skill files must resolve inside their configured directories.
  • OpenAPI path parameters reject . and .. segments.
  • HTTP sessions now expire after the MCP SDK's 30-minute idle default instead of never.
  • CodeMode requires Monty 1.1, which renames max_duration_secs to max_feed_duration_secs.

Thanks to our 48 contributors, including 21 first-time contributors!

Breaking Changes ⚠️

  • fix(http): preserve the SDK's default session idle timeout by @asts-top in #5229
  • Restore full Python 3.15 support by @Kludex in #5558

Enhancements ✨

Security 🔒

  • fix!: Qualify MultiAuth client identities by @jlowin in #5455
  • fix!: Validate OpenAPI path parameter segments by @jlowin in #5457
  • fix!: Resolve skill files within their configured directories by @jlowin and @GEONWOOHAN in #5459
  • fix!: Use Pydantic’s regex engine for tool search by @jlowin in #5467

Fixes 🐞

Docs 📚

Examples & Contrib 💡

  • Don't evaluate properties when registering MCPMixin methods by @asasemahmed in #5620

Dependencies 📦

New Contributors

  • @mikamikasuki made their first contribution in #5438
  • @HootRock made their first contribution in #5376
  • @alex-feel made their first contribution in #5363
  • @HuaTNA made their first contribution in #5407
  • @andreivince made their first contribution in #5404
  • @ch-z-hc made their first contribution in #5359
  • @Amazinghorseli made their first contribution in #5385
  • @hulkbig made their first contribution in #5397
  • @jerive made their first contribution in #5366
  • @goran-revops made their first contribution in #5231
  • @lzyruc made their first contribution in #5270
  • @sherxlg-gif made their first contribution in #5184
  • @baba9811 made their first contribution in #5153
  • @mayankkumar-cmd made their first contribution in #5162
  • @77cjj made their first contribution in #5011
  • @liang0417 made their first contribution in #5183
  • @Ashfaqbs made their first contribution in #4949
  • @qingshungLI made their first contribution in #5485
  • @dennisimoo made their first contribution in #5161
  • @FanouZeng-TT made their first contribution in #5203
  • @GEONWOOHAN made their first contribution in #5459

Full Changelog: v4.0.11...v4.1.0

v4.0.11: Fort Knocks

This release contains important security and bug fixes. All users are encouraged to upgrade. Thanks to our 10 contributors, including 6 first-time contributors.

Enhancements ✨

  • agents: make AGENTS.md the entry point and tighten repo skills by @zzstoatzz in #5278
  • ci: publish maintenance status and add MAINTAINING.md by @zzstoatzz in #5284
  • rate_limiting: deprecate a burst_capacity below 1 by @zzstoatzz and @sclfcz in #5296
  • agents: consolidate PR review guidance by @zzstoatzz in #5297
  • status: unify dashboard and terminal issue ranking by @zzstoatzz in #5300
  • Enable ruff flake8-bandit (S) rules on the library by @strawgate in #5356
  • Bundle extensions with providers by @jlowin in #5360
  • Expand supported Python CI coverage by @jlowin in #5391
  • docs: credit issue authors in maintainer implementations by @jlowin in #5410
  • enhancement: scan release notes for shared contributor credit by @jlowin in #5433

Security 🔒

Fixes 🐞

Docs 📚

Dependencies 📦

Other Changes 🦾

New Contributors

  • @Harsh23Kashyap made their first contribution in #5351
  • @aritejhg made their first contribution in #5372
  • @Patrick-SCH03 made their first contribution in #5291
  • @sclfcz made their first contribution in #5296
  • @asasemahmed made their first contribution in #5345
  • @TJReinert made their first contribution in #5388

Full Changelog: v4.0.10...v4.0.11

v4.0.10: Inside Job

Task-enabled tools now work behind search transforms and CodeMode: they're registered with the task backend even when hidden, and a tool, resource, or prompt that calls one through ctx.fastmcp.call_tool() (including the search call_tool proxy and CodeMode's execute) now gets its result instead of an empty task receipt.

Fixes 🐞

  • fix(stdio): tolerate a transport whose construction failed in __del__ by @kbkb628 in #5256
  • tasks: register task tools hidden by search and CodeMode by @zzstoatzz in #5262
  • tasks: run tools called from another tool in the foreground by @zzstoatzz in #5275

Docs 📚

New Contributors

  • @kbkb628 made their first contribution in #5256

Full Changelog: v4.0.9...v4.0.10

v4.0.9: Cache and Release

ResourceTemplate now keeps its compiled URI pattern for its own lifetime while the shared cache is bounded again, preventing dynamic proxies from growing process memory without restoring the 4,096-template performance cliff.

Fixes 🐞

  • resources: keep each template's compiled pattern on the template by @zzstoatzz in #5253

Full Changelog: v4.0.8...v4.0.9

v4.0.8: Take Three

Completion goes back to its 4.0.5 behavior. The visibility check added in 4.0.6 and reworked in 4.0.7 simulated list requests through middleware, and in 4.0.7 that could let a response cache serve hidden prompts to other clients. New tests pin both problems, and withholding suggestions for hidden references will return with a proper design. Resource template patterns are now cached without a size limit, so servers with thousands of templates read fast again, and OAuthProxy revokes the upstream refresh token instead of sending its own token upstream.

Security 🔒

  • completions: revert the list-based visibility check (#5240, #5244) by @zzstoatzz in #5250

Fixes 🐞

  • Fix OAuthProxy upstream refresh token revocation by @Ujemny in #5243
  • resources: keep every compiled template pattern cached by @zzstoatzz in #5248

New Contributors

  • @Ujemny made their first contribution in #5243

Full Changelog: v4.0.7...v4.0.8

v4.0.7: Double Take

Fixes two regressions from 4.0.6. The completion visibility check runs only the list-specific middleware hooks, so rate limits, logging, and metrics see a single request per completion again. Resource template patterns are cached, which makes template reads faster than in 4.0.5.

Fixes 🐞

  • completions: check reference visibility through typed list hooks only by @zzstoatzz in #5244
  • resources: cache compiled URI template patterns by @zzstoatzz in #5245

Full Changelog: v4.0.6...v4.0.7

v4.0.6: Comma Chameleon

Resource templates now match what clients actually send: literals raw or percent-encoded, and list query parameters exploded or comma-joined. A Client whose exit is cancelled releases its session instead of leaking it, completion no longer answers for prompts and templates the caller can't see, and JSON schemas with float or oversized length limits load instead of failing. The auth fixes cache OIDC discovery and keep Google tokens out of request URLs.

Enhancements ✨

Security 🔒

  • fix(auth): keep Google access tokens out of request URLs by @zzstoatzz in #5185
  • completions: answer only references the caller can list by @zzstoatzz in #5240

Fixes 🐞

  • codemode: raise legible errors in the sandbox; render enums and defaults in get_schema by @zzstoatzz in #4970
  • fix(ci): stabilize Marvin label triage by @zzstoatzz in #5197
  • fix(resources): percent-encode URI template literals (RFC 6570 §3.1) by @LGUIUX in #5167
  • fix(resources): encode data-backed file names by @RaycarlLei in #5140
  • Preserve binary resource contents in response cache by @brennanbutler01 in #5181
  • fix(auth): preserve DNS resolver order when deduplicating resolved IP addresses (#5151) by @seotarek in #5157
  • Keep shared stdio sessions alive until the last client exits by @Aurelucien in #5180
  • fix(transforms): bound Jev search narrowing by @zzstoatzz in #5199
  • fix(auth): cache OIDC discovery configuration by @sui-ni2 in #4861
  • fix(resources): support exploded list query parameters by @zzstoatzz in #5206
  • Keep string length and pattern constraints when a format is set by @zzstoatzz in #5208
  • fix(openapi): rewrite model references in prefixItems by @asts-top in #5131
  • Accept integral float counts like minLength 2.0 in JSON schemas by @zzstoatzz in #5214
  • Stop an unshared stdio subprocess when its session exits under cancellation by @zzstoatzz in #5215
  • Match resource template literals whether they arrive raw or percent-encoded by @zzstoatzz in #5216
  • Accept non-exploded list query params as comma-joined values by @zzstoatzz in #5218
  • Revert shared keep_alive=False stdio sessions (#5180, #5215) by @zzstoatzz in #5219
  • Render non-JSON schema defaults and enums in the markdown tool serializer by @zzstoatzz in #5220
  • Tolerate JSON schema counts larger than any real length by @zzstoatzz in #5221
  • Release a Client's session hold before any await when a context exits by @zzstoatzz in #5223
  • ci: retry downstream version lookups and bind the wedge test's names by @zzstoatzz in #5239

Docs 📚

  • docs: explain HttpResource uri versus url by @zzstoatzz in #5168
  • docs: fix version label and language dropdown overlap by @zzstoatzz in #5172
  • docs: accessibility sweep by @zzstoatzz in #5174
  • docs: fix dead links to relocated Anthropic and Docket docs by @uhhgxg in #5205
  • Update the Pydantic AI integration docs for MCPToolset and the 2.45 floor by @zzstoatzz in #5211

Dependencies 📦

Other Changes 🦾

New Contributors

  • @LGUIUX made their first contribution in #5167
  • @RaycarlLei made their first contribution in #5140
  • @brennanbutler01 made their first contribution in #5181
  • @seotarek made their first contribution in #5157
  • @spark-328 made their first contribution in #5164
  • @Aurelucien made their first contribution in #5180
  • @uhhgxg made their first contribution in #5205

Full Changelog: v4.0.5...v4.0.6

v4.0.5: No Country for Loose Ints

Tool parameters declared strict with Field(strict=True), StrictInt, or a strict model config are honored again, on both direct calls and task submission. Since the SDK v2 migration the server's lax default overrode them and silently coerced values.

Security 🔒

  • Add regression test for the unconfigured ID-JAG guard by @zzstoatzz in #5146

Fixes 🐞

  • Preserve field-level strict validation in lax mode by @zzstoatzz in #5141

Full Changelog: v4.0.4...v4.0.5

v4.0.4: Here Be No Dragons

OpenAPI request bodies get most of the attention in this patch: multipart string arrays are sent as repeated fields, whole-body arguments no longer clobber same-named HTTP parameters, dictionary bodies and raw content types survive intact, and JSON scalar bodies are encoded. On the auth side, OAuthProxy rejects ID-JAG tokens unless identity assertion is configured and refuses non-positive upstream token expiries. Clients now follow empty pagination cursors and servers reject malformed ones.

Enhancements ✨

Security 🔒

  • Fix #5115: OAuthProxy accepts self-contained ID-JAG tokens even when identity_ass by @nandanadileep in #5119

Fixes 🐞

  • Fix upgrade checks for the M2M storage warning test by @zzstoatzz in #5040
  • Fix OpenAPI query explode defaults by @zzstoatzz in #5065
  • fix(openapi): encode JSON scalar request bodies by @Gonghan-Princess in #5052
  • fix(versions): deterministic meta.fastmcp.versions ordering by @feiiiiii5 in #4880
  • Parse skills frontmatter with yaml.safe_load, falling back to the line parser by @vishnujayvel in #4701
  • Keep client data out of tool validation warnings by @zzstoatzz in #5106
  • fix: follow empty pagination cursors in client lists by @sicauzxl in #5026
  • fix: reject non-positive upstream token expiry by @sui-ni2 in #4849
  • fix(server): reject a malformed pagination cursor offset by @L4XB in #5071
  • fix(openapi): preserve dictionary request bodies by @asts-top in #5097
  • Preserve OpenAPI raw body content types by @pentaoa in #5093
  • fix(openapi): preserve HTTP parameters that match whole-body names by @asts-top in #5113
  • fix(local-provider): apply transforms in get_tasks by @BlueX888 in #5117
  • Fix multipart string-array default encoding by @zzstoatzz in #5121

Other Changes 🦾

New Contributors

  • @Gonghan-Princess made their first contribution in #5052
  • @tdsmith made their first contribution in #5066
  • @feiiiiii5 made their first contribution in #4880
  • @vishnujayvel made their first contribution in #4701
  • @sicauzxl made their first contribution in #5026
  • @sui-ni2 made their first contribution in #4849
  • @L4XB made their first contribution in #5071
  • @asts-top made their first contribution in #5097
  • @pentaoa made their first contribution in #5093
  • @BlueX888 made their first contribution in #5117
  • @nandanadileep made their first contribution in #5119

Full Changelog: v4.0.3...v4.0.4

v4.0.3: Once Is Enough

Multi-server clients with legacy-only backends now avoid unnecessary startup retries, and tools returning unconstrained sequences no longer send images twice. This patch also fixes task timing values rejected by strict clients and cleans up unfinished Monty callbacks when execution ends.

Enhancements ✨

Fixes 🐞

Docs 📚

  • docs: point What's New at the changelog for later releases by @zzstoatzz in #4992
  • docs: attribute the back-channel removal to SEP-2322/2575, not SEP-2577 by @zzstoatzz in #4988

New Contributors

  • @fsecada01 made their first contribution in #4999
  • @ningmao-hlyz made their first contribution in #4971

Full Changelog: v4.0.2...v4.0.3

v4.0.2: Root Access

ClientGroup is now importable from the package root, from fastmcp import ClientGroup, with the same lazy export and install hint as Client, so integrations no longer couple to FastMCP's internal module layout.

Enhancements ✨

  • Expose ClientGroup from package root by @jlowin in #4987
  • skills: add release skill with changelog entry helper by @zzstoatzz in #4982

Fixes 🐞

Docs 📚

  • docs: note the 4.0.1 floor for ClientGroup reentrancy by @zzstoatzz in #4980
  • docs: link the GA announcement and blog from What's New by @zzstoatzz in #4984

Full Changelog: v4.0.1...v4.0.2

v4.0.1: Come Back Any Time

ClientGroup now reference-counts its context the way Client does, so entering a connected group from a nested block or a concurrent task reuses the existing connections instead of raising. Adapters written against Client's reentrancy can hold a ClientGroup the same way.

Fixes 🐞

Docs 📚

  • docs: update banner for FastMCP 4 GA by @zzstoatzz in #4958
  • docs: correct whats-new and upgrade guide for GA by @zzstoatzz in #4961
  • docs: drop prerelease install framing from installation and SDK migration guides by @zzstoatzz in #4963
  • docs: refresh sidebar tags and fix audit findings by @zzstoatzz in #4965

Full Changelog: v4.0.0...v4.0.1

v4.0.0: Four Real

FastMCP 4 is the FastMCP release for the new MCP: full support for the 2026-07-28 protocol revision and the rewritten Python SDK v2, with per-connection negotiation so old-protocol clients keep working against upgraded servers. Interactive tools, background tasks via the io.modelcontextprotocol/tasks extension, a first-class extension model, identity assertion, dependency injection with call-argument binding, and ClientGroup all land as stable surfaces. Most FastMCP 3 applications upgrade without code changes.

New Features 🎉

  • Migrate to MCP Python SDK v2 by @jlowin in #4437
  • Teach fastmcp.Client the modern protocol: mode negotiation, MRTR driver, response cache by @jlowin in #4450
  • Forward-port Hugging Face auth provider by @jlowin in #4475
  • Add server-side identity assertion (SEP-990 ID-JAG) by @jlowin in #4483
  • Add guard-mode multi-round-trip tools (SEP-2322) by @jlowin in #4544
  • Add FastMCP-native server extension API (SEP-2133) by @jlowin in #4602
  • Add stateless session state (UserSession / SessionId) by @jlowin in #4604
  • Add background tasks via the io.modelcontextprotocol/tasks extension (SEP-2663) by @jlowin in #4603

Breaking Changes ⚠️

  • Emit one SERVER span per request and adopt spec-correct error codes by @jlowin in #4445
  • Remove 3.x deprecated module shims and dead parameters by @jlowin in #4447
  • Remove 3.0-deprecated FastMCP server methods by @jlowin in #4451
  • Remove 3.x deprecated parameters and object-mode decorators by @jlowin in #4453
  • Migrate to MCP SDK v2.0.0b2 (httpx2) by @jlowin in #4503
  • Fix typos by @szepeviktor in #4498
  • Stop proxies from validating backend results or mutating shared transports by @jlowin in #4552
  • Surface resource, prompt, and proxy errors on the modern protocol by @jlowin in #4579
  • Negotiate the best mutual protocol era by default by @jlowin in #4572
  • Remove server-initiated sampling and roots from the server API by @jlowin in #4648
  • Remove 3.x-era compatibility shims by @jlowin in #4661

Enhancements ✨

  • Deprecate ctx.sample and add clear errors for push features on 2026 connections by @jlowin in #4448
  • Add server-level cache hints (SEP-2549) by @jlowin in #4464
  • Add KeyValueResponseCacheStore for distributed client response caching by @jlowin in #4479
  • Test lifespan fires once per process over HTTP by @jlowin in #4480
  • Add telemetry off-switch and mcp.protocol.version span attribute by @jlowin in #4481
  • Trace client task management requests by @jlowin in #4525
  • Stabilize upgraded ty checks by @jlowin in #4526
  • Improve DescopeProvider scope discovery and well-known URL support by @gaokevin1 in #4489
  • Add examples/ to the ty static-analysis gate by @jlowin in #4466
  • Expose telemetry attributes on span start by @zzstoatzz in #4487
  • Fix-issue-4284 : Add Auth0MCPProvider for Auth0 Auth for MCP by @vijaydeepsinha in #4411
  • Run FastMCP middleware for every inbound message by @jlowin in #4553
  • Add 'prs welcome' label to waive the PR assignment gate by @jlowin in #4557
  • Rename martian workflows to marvin by @jlowin in #4558
  • Bump pinned Claude models to current versions by @jlowin in #4561
  • Make the unit suite fast: in-process HTTP tests, no real sleeps, parallel Windows CI by @jlowin in #4554
  • Mirror the frontend's protocol era on a proxy's backend connection by @jlowin in #4573
  • Drop forked client protocol helpers in favor of the SDK's by @jlowin in #4574
  • Bring the v4 developer notes up to date with what shipped by @jlowin in #4581
  • Trim fastmcp.types to FastMCP-unique types by @jlowin in #4584
  • Let a server answer argument-completion requests by @jlowin in #4582
  • Add machine-to-machine client authentication by @jlowin in #4583
  • Expose era-neutral client server metadata by @zzstoatzz in #4599
  • Support routable transport headers for gateways (SEP-2243) by @jlowin in #4622
  • Emit scope step-up challenges for incremental authorization (SEP-2350) by @jlowin in #4623
  • Honor OAuth application_type in DCR (SEP-837) by @jlowin in #4621
  • Drop stale label-noting instructions from CLAUDE.md by @jlowin in #4654
  • Add require_roles auth check by @jlowin in #4656
  • Add valid_scopes parameter to OIDC proxy valid scopes by @Educg550 in #4660
  • feat: Add telemetry interop mode for FastMCP by @strawgate in #4046
  • Note that review comment threads should get an acknowledgement by @jlowin in #4678
  • Soften the review-comment reply guidance by @jlowin in #4683
  • Resolve review threads on fix, reply on decline by @jlowin in #4685
  • Move to the stable MCP Python SDK 2.0.0 by @jlowin in #4655
  • Add comprehensive Codex code review rules by @jlowin in #4710
  • Give parallel Windows CI more timeout headroom by @zzstoatzz in #4680
  • add language dropdown to docs sidebar by @znicholasbrown in #4716
  • Route published docs through pull requests by @jlowin in #4713
  • Improve HTTP server startup performance by @jlowin in #4729
  • Avoid loading MCP and CLI stacks during lightweight imports by @jlowin in #4763
  • Preserve legacy httpx compatibility without importing it by @jlowin in #4766
  • Clarify review of closed contributor PRs by @jlowin in #4780
  • Support EdDSA verification in JWTVerifier by @zzstoatzz in #4752
  • Forward proxy server metadata across protocol eras by @jakekaplan in #4776
  • feat(renovate): migrate to Renovate, retire Dependabot by @jamiezieziula in #4754
  • Add Prefect Horizon authentication client and local state by @parkedwards in #4785
  • Clarify auto-closed PR message by @jlowin in #4820
  • Support CallArgument and Depends bindings from uncalled-for 0.4.0 by @chrisguidry in #4802
  • Fix static analysis under newer ty releases by @zzstoatzz in #4831
  • Cover CallArgument resolution in background tasks by @zzstoatzz in #4833
  • Scalekit issuer updates backward compatibility by @AkshayParihar33 in #4798
  • Add Prefect Horizon account commands by @parkedwards in #4786
  • Cap anthropic dependency to <1 by @craigie-ant in #4864
  • Remove obsolete Docket memory-server reset fixtures by @TyceHerrman in #4912
  • add independent client groups by @zzstoatzz in #4904

Security 🔒

  • Drive the FastMCP lifespan through the SDK session manager by @jlowin in #4446
  • Route skill file access through SDK path-security primitives by @jlowin in #4449
  • Screen templated resource parameters for path traversal by default by @jlowin in #4482
  • [codex] Add OAuthProxy RFC 9207 issuer responses by @jlowin in #4438
  • Apply app visibility where no host can by @jlowin in #4692
  • Encrypt task context snapshots at rest by @chrisguidry in #4772
  • Add audience pinning to GoogleTokenVerifier by @zzstoatzz in #4827
  • Bump cryptography to 50.0.0 by @zzstoatzz in #4836
  • Scope Marvin App token to each job's declared permissions by @zzstoatzz in #4834
  • Exclude Cookie from forwarded HTTP headers by @zzstoatzz in #4843
  • Bump cryptography to 50.0.0 in the testing_demo example by @zzstoatzz in #4844
  • Bound CIMD cache growth by @jlowin in #4852
  • client: deprecate inferring stdio transports from str, prefer Path by @zzstoatzz in #4941

Fixes 🐞

  • Capture SharedContext for task-enabled Docket servers by @jlowin in #4443
  • Fix stale mcp.types imports in examples by @jlowin in #4452
  • Forward-port HTTP host guard compatibility by @jlowin in #4474
  • Fix Azure scope fallback by @zzstoatzz in #4469
  • fix(server): omit ScalarElicitationType wrapper title from elicitation schemas by @syf2211 in #4502
  • Skip unsupported JWKS keys instead of failing the whole key set (#4515) by @earfman in #4517
  • Don't mutate the caller's schema in compress_schema by @winklemad in #4492
  • Forward upstream instructions through create_proxy by @verdie-g in #4512
  • Serialize deep object query parameters by @jlowin in #4523
  • Reject positional-only tool parameters by @jlowin in #4524
  • Clarify PR-reopen flow and fix label-race that broke auto-reopen by @jlowin in #4518
  • Clean up disconnected task sessions by @jlowin in #4519
  • Handle expired OAuth client registrations by @jlowin in #4520
  • Fix OAuth request annotation after httpx2 migration by @jlowin in #4534
  • Fix docs banner contrast by @jlowin in #4522
  • Preserve component metadata in response cache by @jlowin in #4521
  • Clean up task sessions on connection exit by @jlowin in #4535
  • Include scopes in auth challenges by @jlowin in #4527
  • Make examples/ actually trigger the ty gate by @jlowin in #4541
  • Add subject field to AccessToken initialization by @piaudonn in #4267
  • Restore Mintlify's fixed banner positioning by @jlowin in #4542
  • Fix #4292: SSRF guard breaks OAuth/JWKS fetches behind a corporate HTTP proxy by @endofcake in #4412
  • Preserve telemetry attributes when a sampler does not forward them by @jlowin in #4539
  • Speed up the unit test suite, and fix the task-notification race it surfaced by @jlowin in #4550
  • Fix label triage applying no labels, and make blocked tool calls fail by @jlowin in #4555
  • Fix AI workflow allowlists being destroyed by tokenization by @jlowin in #4560
  • Make transformed tool required order deterministic by @Kludex in #4564
  • Stop gather() from creating coroutines it may never schedule by @jlowin in #4559
  • Restore upgraded dependency checks by @zzstoatzz in #4576
  • Fix skill frontmatter parsing with UTF-8 BOM by @hxaxd in #4533
  • Fix File helper extension handling by @VectorPeak in #4531
  • Fix percent-encoded skill file names unreadable in resources mode by @jlowin in #4590
  • Fix flaky stdio crash-recovery tests by @jlowin in #4594
  • Bridge camelCase ToolAnnotations reads by @zzstoatzz in #4597
  • Preserve raw CallToolResult tool returns by @LarryHu0217 in #4587
  • Advertise only supported token endpoint auth methods in OAuthProxy metadata by @jlowin in #4608
  • Fix OAuth proxy override typing by @zzstoatzz in #4612
  • Pin burner-redis below the Windows-crashing 0.1.7 release by @jlowin in #4618
  • fix : canonical mime type mapping from formats to remove inconsistency #4627 by @Aman071106 in #4628
  • fix: accept callable roots handlers by @ShuyingZhang in #4639
  • Pass the MCP conformance suite's draft and pending scenarios by @jlowin in #4650
  • Use issuer_url for OAuth issuer identity by @jlowin in #4652
  • Fix the ty failure blocking upgrade checks on main by @jlowin in #4657
  • Bind CIMD assertion audience to the advertised token endpoint by @jlowin in #4659
  • Record effective scopes on the OAuth transaction by @jlowin in #4670
  • Copy schemas iteratively so deep nesting still compresses by @jlowin in #4671
  • Fix OpenAPI allOf reference fields by @hxaxd in #4653
  • Flatten OpenAPI discriminator subtypes into request bodies by @jlowin in #4677
  • Let maintenance releases publish without fastmcp-tasks by @jlowin in #4676
  • Read CLI-scanned MCP config files as UTF-8 explicitly by @jlowin in #4690
  • Late-bind app tool names so UIs survive composition by @jlowin in #4682
  • Always emit a tool title, derived from name when unset by @jlowin in #4694
  • Fix self-referential connection error causes by @jakekaplan in #4720
  • Write downloaded skill text as UTF-8 by @zzstoatzz in #4715
  • Fix CodeMode tool error propagation by @YAO-001 in #4704
  • Forward enable_cimd to Auth0, AWS Cognito and OCI providers by @StykMartin in #4719
  • fix: preserve valid servers during CLI discovery by @ShuyingZhang in #4714
  • Preserve string-compatible prompt arguments by @jlowin in #4730
  • Canonicalize response cache arguments by @jlowin in #4753
  • Serve empty list results from the response cache by @LHMQ878 in #4738
  • Don't cache error results in ResponseCachingMiddleware by @SaiMouli3 in #4705
  • Declare run-claude extra allowed tools input by @zzstoatzz in #4740
  • Sanitize forwarded request metadata where the proxy copies it by @jakekaplan in #4770
  • fix(context): move elicit overload docs inside the stubs so mypy sees the chain by @yonatangross in #4774
  • Delegate typed tool output serialization to Pydantic by @jlowin in #4771
  • Serialize the event store's stream list read-modify-write by @SaiMouli3 in #4758
  • Fix partial parameter hints on Python 3.14 by @zzstoatzz in #4796
  • fix(openapi): extract parameter-level example and examples by @doneman536 in #4793
  • Keep earlier consent CSRF tokens valid within a transaction by @trevhud in #4818
  • Fix StatefulProxyClient reconnection after session failure by @jlowin in #4829
  • Fix instructions in MCP inspect output by @zzstoatzz in #4873
  • fix: support Unicode tokens in BM25 search by @zzstoatzz in #4889
  • fix: support modern protocol in multi-server clients by @zzstoatzz in #4893
  • fix(ci): satisfy latest ty control-flow checks by @zzstoatzz in #4928
  • fix(middleware): align response limits with output schemas by @zzstoatzz in #4931
  • Accept any issuer scoped to the Descope project by @gaokevin1 in #4909
  • Fix response cache partitioning for versioned components by @CoralGarden52 in #4948

Docs 📚

  • Docs: forward-port v3.4.4 changelog entries by @jlowin in #4476
  • Document icon theme support by @jlowin in #4537
  • Add missing 4.0.0 version badge to Path Security docs by @jlowin in #4540
  • Align server component docs by @strawgate in #4260
  • Align CLI, deployment, and config docs by @strawgate in #4259
  • Align client, Apps, and integration docs by @strawgate in #4261
  • Fix stale MRTR/elicitation framing in client and upgrade docs by @jlowin in #4551
  • docs: quote pip extras install examples by @RachGranville in #4568
  • Document Windows CI parallelism and the subprocess_heavy marker by @jlowin in #4575
  • Document v3->v4 removals and add upgrade-reality tests by @jlowin in #4585
  • Archive v3 docs and publish v4 as the primary version by @jlowin in #4613
  • Document targeted v4 prerelease installation by @zzstoatzz in #4598
  • Fix stale Mac/Windows-vs-Linux OAuth key/storage docs by @jlowin in #4617
  • v4 docs quality pass: stale task/era claims, broken links, polish by @jlowin in #4619
  • whats-new: add the argument completion capability by @jlowin in #4620
  • docs: fix ProxyProvider docstring example calling nonexistent with_namespace() by @andrew-stelmach-fleet in #4633
  • Unpublish v4 development notes; prep docs for beta 1 by @jlowin in #4644
  • Expand the FAQ for the v4 transition by @jlowin in #4649
  • Document the issuer_url identity change for upgraders by @jlowin in #4658
  • Cover require_roles in the v4 highlights by @jlowin in #4666
  • Fix FAQ: sampling/roots/elicitation legacy-mode advice, SessionProvider registration by @jlowin in #4672
  • Audit v4 docs: fix missing version badges, fill whats-new gaps by @jlowin in #4668
  • Docs: add v3.4.5 changelog entries to main by @jlowin in #4674
  • Split the SDK upgrade guides by SDK version by @jlowin in #4684
  • Add v4.0.0b1 changelog and updates entries by @jlowin in #4681
  • Use mcp.types directly instead of aliasing to mcp_types in docs by @jlowin in #4696
  • Rewrite the v4 What's New page and document server extensions by @jlowin in #4698
  • Improve the v4 docs by @jlowin in #4707
  • Rewrite the FastMCP docs welcome page by @jlowin in #4709
  • docs: clarify external OAuth consent mode by @jlowin in #4746
  • Docs: mirror v3.4.6 changelog entries by @jlowin in #4764
  • Document MCP protocol support and conformance by @jlowin in #4781
  • Docs language dropdown by @znicholasbrown in #4801
  • Docs: mirror v3.4.7 release notes by @jlowin in #4811
  • docs: prepare FastMCP 4 beta 3 by @jlowin in #4840
  • docs: add FastMCP 4 beta 3 release entries by @jlowin in #4841
  • docs: fix idempotent tool hint wording by @Theater-ahyeon in #4875
  • docs: prepare FastMCP 4 beta 4 by @zzstoatzz in #4914
  • docs: fix beta 4 changelog MDX by @zzstoatzz in #4916
  • docs: prepare FastMCP 4 beta 5 by @zzstoatzz in #4934
  • docs: cover list_tools and restore client modules in the SDK reference by @zzstoatzz in #4936
  • docs: transport inference trust contract; trim SDK session-group comparison by @zzstoatzz in #4940

Dependencies 📦

Other Changes 🦾

New Contributors

  • @syf2211 made their first contribution in #4502
  • @earfman made their first contribution in #4517
  • @winklemad made their first contribution in #4492
  • @verdie-g made their first contribution in #4512
  • @vijaydeepsinha made their first contribution in #4411
  • @piaudonn made their first contribution in #4267
  • @szepeviktor made their first contribution in #4498
  • @endofcake made their first contribution in #4412
  • @Kludex made their first contribution in #4564
  • @RachGranville made their first contribution in #4568
  • @hxaxd made their first contribution in #4533
  • @VectorPeak made their first contribution in #4531
  • @LarryHu0217 made their first contribution in #4587
  • @andrew-stelmach-fleet made their first contribution in #4633
  • @Aman071106 made their first contribution in #4628
  • @ShuyingZhang made their first contribution in #4639
  • @Educg550 made their first contribution in #4660
  • @znicholasbrown made their first contribution in #4716
  • @YAO-001 made their first contribution in #4704
  • @StykMartin made their first contribution in #4719
  • @LHMQ878 made their first contribution in #4738
  • @SaiMouli3 made their first contribution in #4705
  • @yonatangross made their first contribution in #4774
  • @jamiezieziula made their first contribution in #4754
  • @parkedwards made their first contribution in #4785
  • @trevhud made their first contribution in #4818
  • @prefect-renovate[bot] made their first contribution in #4808
  • @craigie-ant made their first contribution in #4864
  • @Theater-ahyeon made their first contribution in #4875
  • @TyceHerrman made their first contribution in #4912
  • @CoralGarden52 made their first contribution in #4948

Full Changelog: v3.4.7...v4.0.0

v4.0.0b5: Group Effourt

FastMCP 4 beta 5 introduces ClientGroup — one managed client per server, each negotiating its own protocol era independently, with collision-checked tool namespacing and call routing and no proxy in the middle — and aligns middleware response limits with output schemas.

Enhancements ✨

Fixes 🐞

  • fix(ci): satisfy latest ty control-flow checks by @zzstoatzz in #4928
  • fix(middleware): align response limits with output schemas by @zzstoatzz in #4931

Docs 📚

New Contributors

  • @TyceHerrman made their first contribution in #4912

Full Changelog: v4.0.0b4...v4.0.0b5

v4.0.0b4: Calm Befour the Storm

FastMCP 4 beta 4 improves modern multi-server clients and adds Prefect Horizon account commands, while tightening proxy and CIMD security boundaries and fixing Unicode search and inspect output.

Enhancements ✨

Security 🔒

Fixes 🐞

Docs 📚

Other Changes 🦾

New Contributors

  • @prefect-renovate[bot] made their first contribution in #4808
  • @craigie-ant made their first contribution in #4864
  • @Theater-ahyeon made their first contribution in #4875

Full Changelog: v4.0.0b3...v4.0.0b4

v4.0.0b3: Fast Fourward

FastMCP 4 beta 3 moves the v4 line toward general availability with Prefect Horizon authentication, CallArgument and Depends bindings for tools and background tasks, and a round of OAuth, proxy, OpenAPI, and Python 3.14 compatibility hardening.

Enhancements ✨

Security 🔒

Fixes 🐞

  • Fix partial parameter hints on Python 3.14 by @zzstoatzz in #4796
  • fix(openapi): extract parameter-level example and examples by @doneman536 in #4793
  • Keep earlier consent CSRF tokens valid within a transaction by @trevhud in #4818
  • Fix StatefulProxyClient reconnection after session failure by @jlowin in #4829

Docs 📚

New Contributors

  • @parkedwards made their first contribution in #4785
  • @trevhud made their first contribution in #4818

Full Changelog: v4.0.0b2...v4.0.0b3

v3.4.7: Know Your Audience

FastMCP 3.4.7 fixes CIMD private_key_jwt authentication on bare-origin OAuth proxy deployments by validating client assertions against the exact token endpoint advertised in OAuth metadata.

Security 🔒

  • Backport CIMD assertion audience fix to v3 by @jlowin in #4799

Docs 📚

Full Changelog: v3.4.6...v3.4.7

v3.4.6: Trust, but Proxy

FastMCP 3.4.6 backports trusted-proxy support for SSRF-protected OAuth metadata and JWKS fetches. Deployments can now route these requests through a mandated corporate proxy while preserving custom CA certificates; FastMCP refuses the fetch when no proxy is configured instead of risking an unprotected direct request.

Fixes 🐞

  • Backport #4412 to 3.x: support trusted SSRF proxies by @jlowin in #4755

Docs 📚

Full Changelog: v3.4.5...v3.4.6

v4.0.0b1: Fourgone Conclusion

FastMCP 4 makes stateful MCP applications work on the sessionless 2026-07-28 protocol while one deployment continues serving handshake-era clients. Tools can ask follow-up questions across requests, preserve authenticated user state, and move long-running work into background tasks without sticky sessions. Protocol extensions and enterprise identity become first-class surfaces, and most FastMCP 3 servers upgrade unchanged even though MCP Python SDK v2 rewrote the engine underneath them. Server-initiated sampling and roots are removed from the server API; the upgrade guide covers their replacements.

New Features 🎉

  • Migrate to MCP Python SDK v2 by @jlowin in #4437
  • Teach fastmcp.Client the modern protocol: mode negotiation, MRTR driver, response cache by @jlowin in #4450
  • Forward-port Hugging Face auth provider by @jlowin in #4475
  • Add server-side identity assertion (SEP-990 ID-JAG) by @jlowin in #4483
  • Add guard-mode multi-round-trip tools (SEP-2322) by @jlowin in #4544
  • Add FastMCP-native server extension API (SEP-2133) by @jlowin in #4602
  • Add stateless session state (UserSession / SessionId) by @jlowin in #4604
  • Add background tasks via the io.modelcontextprotocol/tasks extension (SEP-2663) by @jlowin in #4603

Breaking Changes ⚠️

  • Emit one SERVER span per request and adopt spec-correct error codes by @jlowin in #4445
  • Remove 3.x deprecated module shims and dead parameters by @jlowin in #4447
  • Remove 3.0-deprecated FastMCP server methods by @jlowin in #4451
  • Remove 3.x deprecated parameters and object-mode decorators by @jlowin in #4453
  • Migrate to MCP SDK v2.0.0b2 (httpx2) by @jlowin in #4503
  • Fix typos by @szepeviktor in #4498
  • Stop proxies from validating backend results or mutating shared transports by @jlowin in #4552
  • Surface resource, prompt, and proxy errors on the modern protocol by @jlowin in #4579
  • Negotiate the best mutual protocol era by default by @jlowin in #4572
  • Remove server-initiated sampling and roots from the server API by @jlowin in #4648
  • Remove 3.x-era compatibility shims by @jlowin in #4661

Enhancements ✨

  • Deprecate ctx.sample and add clear errors for push features on 2026 connections by @jlowin in #4448
  • Add server-level cache hints (SEP-2549) by @jlowin in #4464
  • Add KeyValueResponseCacheStore for distributed client response caching by @jlowin in #4479
  • Test lifespan fires once per process over HTTP by @jlowin in #4480
  • Add telemetry off-switch and mcp.protocol.version span attribute by @jlowin in #4481
  • Trace client task management requests by @jlowin in #4525
  • Stabilize upgraded ty checks by @jlowin in #4526
  • Improve DescopeProvider scope discovery and well-known URL support by @gaokevin1 in #4489
  • Add examples/ to the ty static-analysis gate by @jlowin in #4466
  • Expose telemetry attributes on span start by @zzstoatzz in #4487
  • Fix-issue-4284 : Add Auth0MCPProvider for Auth0 Auth for MCP by @vijaydeepsinha in #4411
  • Run FastMCP middleware for every inbound message by @jlowin in #4553
  • Add 'prs welcome' label to waive the PR assignment gate by @jlowin in #4557
  • Rename martian workflows to marvin by @jlowin in #4558
  • Bump pinned Claude models to current versions by @jlowin in #4561
  • Make the unit suite fast: in-process HTTP tests, no real sleeps, parallel Windows CI by @jlowin in #4554
  • Mirror the frontend's protocol era on a proxy's backend connection by @jlowin in #4573
  • Drop forked client protocol helpers in favor of the SDK's by @jlowin in #4574
  • Bring the v4 developer notes up to date with what shipped by @jlowin in #4581
  • Trim fastmcp.types to FastMCP-unique types by @jlowin in #4584
  • Let a server answer argument-completion requests by @jlowin in #4582
  • Add machine-to-machine client authentication by @jlowin in #4583
  • Expose era-neutral client server metadata by @zzstoatzz in #4599
  • Support routable transport headers for gateways (SEP-2243) by @jlowin in #4622
  • Emit scope step-up challenges for incremental authorization (SEP-2350) by @jlowin in #4623
  • Honor OAuth application_type in DCR (SEP-837) by @jlowin in #4621
  • Drop stale label-noting instructions from CLAUDE.md by @jlowin in #4654
  • Add require_roles auth check by @jlowin in #4656
  • Add valid_scopes parameter to OIDC proxy valid scopes by @Educg550 in #4660
  • feat: Add telemetry interop mode for FastMCP by @strawgate in #4046
  • Note that review comment threads should get an acknowledgement by @jlowin in #4678
  • Soften the review-comment reply guidance by @jlowin in #4683
  • Resolve review threads on fix, reply on decline by @jlowin in #4685
  • Move to the stable MCP Python SDK 2.0.0 by @jlowin in #4655

Security 🔒

  • Drive the FastMCP lifespan through the SDK session manager by @jlowin in #4446
  • Route skill file access through SDK path-security primitives by @jlowin in #4449
  • Screen templated resource parameters for path traversal by default by @jlowin in #4482
  • [codex] Add OAuthProxy RFC 9207 issuer responses by @jlowin in #4438
  • Apply app visibility where no host can by @jlowin in #4692

Fixes 🐞

  • Capture SharedContext for task-enabled Docket servers by @jlowin in #4443
  • Fix stale mcp.types imports in examples by @jlowin in #4452
  • Forward-port HTTP host guard compatibility by @jlowin in #4474
  • Fix Azure scope fallback by @zzstoatzz in #4469
  • fix(server): omit ScalarElicitationType wrapper title from elicitation schemas by @syf2211 in #4502
  • Skip unsupported JWKS keys instead of failing the whole key set (#4515) by @earfman in #4517
  • Don't mutate the caller's schema in compress_schema by @winklemad in #4492
  • Forward upstream instructions through create_proxy by @verdie-g in #4512
  • Serialize deep object query parameters by @jlowin in #4523
  • Reject positional-only tool parameters by @jlowin in #4524
  • Clarify PR-reopen flow and fix label-race that broke auto-reopen by @jlowin in #4518
  • Clean up disconnected task sessions by @jlowin in #4519
  • Handle expired OAuth client registrations by @jlowin in #4520
  • Fix OAuth request annotation after httpx2 migration by @jlowin in #4534
  • Fix docs banner contrast by @jlowin in #4522
  • Preserve component metadata in response cache by @jlowin in #4521
  • Clean up task sessions on connection exit by @jlowin in #4535
  • Include scopes in auth challenges by @jlowin in #4527
  • Make examples/ actually trigger the ty gate by @jlowin in #4541
  • Add subject field to AccessToken initialization by @piaudonn in #4267
  • Restore Mintlify's fixed banner positioning by @jlowin in #4542
  • Fix #4292: SSRF guard breaks OAuth/JWKS fetches behind a corporate HTTP proxy by @endofcake in #4412
  • Preserve telemetry attributes when a sampler does not forward them by @jlowin in #4539
  • Speed up the unit test suite, and fix the task-notification race it surfaced by @jlowin in #4550
  • Fix label triage applying no labels, and make blocked tool calls fail by @jlowin in #4555
  • Fix AI workflow allowlists being destroyed by tokenization by @jlowin in #4560
  • Make transformed tool required order deterministic by @Kludex in #4564
  • Stop gather() from creating coroutines it may never schedule by @jlowin in #4559
  • Restore upgraded dependency checks by @zzstoatzz in #4576
  • Fix skill frontmatter parsing with UTF-8 BOM by @hxaxd in #4533
  • Fix File helper extension handling by @VectorPeak in #4531
  • Fix percent-encoded skill file names unreadable in resources mode by @jlowin in #4590
  • Fix flaky stdio crash-recovery tests by @jlowin in #4594
  • Bridge camelCase ToolAnnotations reads by @zzstoatzz in #4597
  • Preserve raw CallToolResult tool returns by @LarryHu0217 in #4587
  • Advertise only supported token endpoint auth methods in OAuthProxy metadata by @jlowin in #4608
  • Fix OAuth proxy override typing by @zzstoatzz in #4612
  • Pin burner-redis below the Windows-crashing 0.1.7 release by @jlowin in #4618
  • fix : canonical mime type mapping from formats to remove inconsistency #4627 by @Aman071106 in #4628
  • fix: accept callable roots handlers by @ShuyingZhang in #4639
  • Pass the MCP conformance suite's draft and pending scenarios by @jlowin in #4650
  • Use issuer_url for OAuth issuer identity by @jlowin in #4652
  • Fix the ty failure blocking upgrade checks on main by @jlowin in #4657
  • Bind CIMD assertion audience to the advertised token endpoint by @jlowin in #4659
  • Record effective scopes on the OAuth transaction by @jlowin in #4670
  • Copy schemas iteratively so deep nesting still compresses by @jlowin in #4671
  • Fix OpenAPI allOf reference fields by @hxaxd in #4653
  • Flatten OpenAPI discriminator subtypes into request bodies by @jlowin in #4677
  • Let maintenance releases publish without fastmcp-tasks by @jlowin in #4676
  • Read CLI-scanned MCP config files as UTF-8 explicitly by @jlowin in #4690
  • Late-bind app tool names so UIs survive composition by @jlowin in #4682

Docs 📚

  • Docs: forward-port v3.4.4 changelog entries by @jlowin in #4476
  • Document icon theme support by @jlowin in #4537
  • Add missing 4.0.0 version badge to Path Security docs by @jlowin in #4540
  • Align server component docs by @strawgate in #4260
  • Align CLI, deployment, and config docs by @strawgate in #4259
  • Align client, Apps, and integration docs by @strawgate in #4261
  • Fix stale MRTR/elicitation framing in client and upgrade docs by @jlowin in #4551
  • docs: quote pip extras install examples by @RachGranville in #4568
  • Document Windows CI parallelism and the subprocess_heavy marker by @jlowin in #4575
  • Document v3->v4 removals and add upgrade-reality tests by @jlowin in #4585
  • Archive v3 docs and publish v4 as the primary version by @jlowin in #4613
  • Document targeted v4 prerelease installation by @zzstoatzz in #4598
  • Fix stale Mac/Windows-vs-Linux OAuth key/storage docs by @jlowin in #4617
  • v4 docs quality pass: stale task/era claims, broken links, polish by @jlowin in #4619
  • whats-new: add the argument completion capability by @jlowin in #4620
  • docs: fix ProxyProvider docstring example calling nonexistent with_namespace() by @andrew-stelmach-fleet in #4633
  • Unpublish v4 development notes; prep docs for beta 1 by @jlowin in #4644
  • Expand the FAQ for the v4 transition by @jlowin in #4649
  • Document the issuer_url identity change for upgraders by @jlowin in #4658
  • Cover require_roles in the v4 highlights by @jlowin in #4666
  • Fix FAQ: sampling/roots/elicitation legacy-mode advice, SessionProvider registration by @jlowin in #4672
  • Audit v4 docs: fix missing version badges, fill whats-new gaps by @jlowin in #4668
  • Docs: add v3.4.5 changelog entries to main by @jlowin in #4674
  • Split the SDK upgrade guides by SDK version by @jlowin in #4684

Dependencies 📦

  • chore(deps): bump mcp from 1.26.0 to 1.27.2 in /examples/testing_demo in the uv group across 1 directory by @dependabot in #4514
  • chore(deps): bump actions/setup-node from 6 to 7 by @dependabot in #4546
  • Bump actions/upload-artifact from 4 to 7 by @dependabot in #4640
  • Bump actions/setup-python from 6 to 7 by @dependabot in #4641
  • chore(deps): bump mcp from 1.27.2 to 1.28.1 in /examples/testing_demo in the uv group across 1 directory by @dependabot in #4614

Other Changes 🦾

  • Test: HTTP lifespan fires once per process across sessions by @jlowin in #4470

New Contributors

  • @syf2211 made their first contribution in #4502
  • @earfman made their first contribution in #4517
  • @winklemad made their first contribution in #4492
  • @verdie-g made their first contribution in #4512
  • @vijaydeepsinha made their first contribution in #4411
  • @piaudonn made their first contribution in #4267
  • @szepeviktor made their first contribution in #4498
  • @endofcake made their first contribution in #4412
  • @Kludex made their first contribution in #4564
  • @RachGranville made their first contribution in #4568
  • @hxaxd made their first contribution in #4533
  • @VectorPeak made their first contribution in #4531
  • @LarryHu0217 made their first contribution in #4587
  • @andrew-stelmach-fleet made their first contribution in #4633
  • @Aman071106 made their first contribution in #4628
  • @ShuyingZhang made their first contribution in #4639
  • @Educg550 made their first contribution in #4660

Full Changelog: v3.4.5...v4.0.0b1

v3.4.5: Key Change

FastMCP 3.4.5 collects five fixes for the 3.x line, led by JWTVerifier no longer rejecting every token when an authorization server publishes an unrecognized key type such as Ed25519.

Fixes 🐞

  • Backport #4517 to release/3.x: skip unsupported JWKS keys (#4515) by @kakiii in #4631
  • Backport #4469 to release/3.x: fix Azure scope fallback by @jlowin in #4662
  • Backport #4523 to release/3.x: serialize deep object query parameters by @jlowin in #4664
  • Backport #4564 to release/3.x: make transformed tool required order deterministic by @jlowin in #4665
  • Backport #4492 to release/3.x: don't mutate the caller's schema in compress_schema by @jlowin in #4663

New Contributors

  • @kakiii made their first contribution in #4631

Full Changelog: v3.4.4...v3.4.5

v3.4.4: Host in Translation

FastMCP 3.4.4 restores HTTP deployment compatibility after the 3.4.3 Host/Origin guard changed default behavior for existing ASGI, serverless, and reverse-proxy deployments. The guard implementation remains available for deployments that opt in with explicit trusted hosts and origins, while 3.x returns to accepting traffic that worked before the patch. This release also adds Hugging Face OAuth provider support, with docs and examples for public and private apps, PKCE, Dynamic Client Registration, and CIMD.

Enhancements ✨

Fixes 🐞

New Contributors

  • @evalstate made their first contribution in #4385

Full Changelog: v3.4.3...v3.4.4

v3.4.3: The Fast and the Secure-ious

FastMCP 3.4.3 closes out a month of SSRF and OAuth hardening: NAT64, 6to4, Teredo, and ISATAP transition addresses can no longer smuggle private IPv4 targets past the SSRF allow-list, Streamable HTTP now validates Host and Origin before session handling to block DNS rebinding against localhost-bound servers, and OAuth redirect validation rejects unsafe schemes and unregistered DCR redirect URIs. Alongside the security work, this release also fixes proxy session teardown races, discriminator-tag handling in JSON schema conversion, and several smaller reliability issues.

Enhancements ✨

  • Dedupe discriminator-required helper across schema converters by @jlowin in #4362
  • Add real Monty sandbox e2e coverage for CodeMode call_tool by @AlexlaGuardia in #4274
  • Switch prettier hook to rbubley/mirrors-prettier by @jlowin in #4366
  • feat(remote): add --verify flag for TLS certificate verification by @jlowin in #4369

Security 🔒

Fixes 🐞

  • fix: caching middleware TypeError on cache miss due to mismatched call_next parameter by @gmenziesint in #4301
  • Fix: async rate limiting middleware get_client_id callbacks by @Chotom in #4319
  • Recognize all GitHub issue-link forms in require-issue-link workflow by @jlowin in #4359
  • fix: preserve required discriminator tags by @he-yufeng in #4297
  • fix(proxy): shield stateful proxy disconnect during session teardown by @jlowin in #4363
  • fix(fs): isolate same-named package imports across providers by @jlowin in #4361
  • fix: StatefulProxyClient.clear() no longer causes KeyError on session teardown by @tcconnally in #4328
  • fix: guard recursive refs in json_schema_to_type by @Epochex in #4312
  • Forward IdP auth errors to MCP client instead of showing HTML error page by @bobbyjames839 in #4293
  • fix(resources): round-trip path values with reserved characters in URI templates by @jlowin in #4368
  • fix: bracket IPv6 hosts in server startup log URL by @jlowin in #4372
  • fix: bound default OIDC discovery timeout and expose it on provider wrappers by @jlowin in #4374
  • fix: validate task tool arguments against declared types by @jlowin in #4373
  • fix(tools): honor serialize_by_alias in tool result serialization by @jlowin in #4391
  • Fix/cimd flow issue by @twjackysu in #4206
  • Reject empty env var keys by @CodingFeng101 in #4410
  • fix: correct replace_type docstring parameter descriptions by @hiSandog in #4375
  • Fix ty 0.0.55 diagnostics and prefab-ui protocol version drift by @jlowin in #4428
  • [codex] Fix OpenAPI resource template requests by @jlowin in #4407

Docs 📚

Dependencies 📦

  • chore(deps): bump actions/checkout from 6 to 7 by @dependabot in #4343
  • chore(deps): bump joserfc from 1.6.5 to 1.6.7 in the uv group across 1 directory by @dependabot in #4394
  • chore(deps): bump joserfc from 1.6.7 to 1.6.8 in the uv group across 1 directory by @dependabot in #4429

Other Changes 🦾

  • Raise fastmcp.ValidationError for invalid tool arguments by @jlowin in #4392
  • Fix versioned auth middleware checks by @jlowin in #4401

New Contributors

  • @gmenziesint made their first contribution in #4301
  • @Chotom made their first contribution in #4319
  • @he-yufeng made their first contribution in #4297
  • @AlexlaGuardia made their first contribution in #4274
  • @tcconnally made their first contribution in #4328
  • @Epochex made their first contribution in #4312
  • @Michael-WhiteCapData made their first contribution in #4344
  • @bobbyjames839 made their first contribution in #4293
  • @twjackysu made their first contribution in #4206
  • @CodingFeng101 made their first contribution in #4410
  • @hiSandog made their first contribution in #4375

Full Changelog: v3.4.2...v3.4.3

v3.4.2: Heads Up

FastMCP 3.4.2 restores JWT compatibility for providers that include private, non-critical JWS header parameters. Tokens from providers like Clerk can carry header metadata such as cat without being rejected before signature and claim validation, while unsupported critical headers are still rejected.

Fixes 🐞

Docs 📚

Full Changelog: v3.4.1...v3.4.2

v3.4.1: Floor It

FastMCP 3.4.1 floors Starlette at >=1.0.1 so installs can no longer resolve to a version affected by CVE-2026-48710, which was previously only constrained transitively through mcp. It also makes OAuthProxy log refresh-token cache misses instead of failing silently.

Enhancements ✨

  • Log refresh-token misses in OAuthProxy instead of failing silently by @jlowin in #4276

Security 🔒

  • Add explicit starlette>=1.0.1 floor (CVE-2026-48710) by @jlowin in #4286

Docs 📚

  • Document --notes-start-tag in release instructions by @jlowin in #4275

Full Changelog: v3.4.0...v3.4.1

v3.4.0: Remote Control

FastMCP 3.4 is about reaching servers that live somewhere else. The headline is fastmcp-remote, a standalone bridge that connects stdio-only MCP hosts to servers hosted over HTTP. Around it, the proxy layer those connections depend on is hardened: a proxy now forwards initialize upstream and fails loudly when the backend is missing or misconfigured, instead of reporting a connected-but-empty proxy. And FastMCP-issued access tokens can now outlive short-lived upstream tokens, so authenticated sessions survive the long idle periods remote clients are prone to.

New Features 🎉

Breaking Changes ⚠️

  • Forward proxy initialize as bridge behavior by @jlowin in #4228

Enhancements ✨

  • ci: require external PRs to link a tracked issue by @strawgate in #4173
  • feat: new options --host and --no-log-panel | --log-panel to cli dev apps by @itaru2622 in #4123
  • Add valid_scopes and extra_authorize_params to WorkOSProvider by @tiagoskaneta in #4135
  • Add token_expiry_threshold_seconds for proactive token refresh by @mohankumarelec in #4142
  • Add review-issue skill for triaging gated external contributions by @jlowin in #4212
  • Add contract gate to review-issue skill by @jlowin in #4214
  • Let ToolResult return an error result via is_error by @jlowin in #4217
  • Update published docs after PyPI release by @jlowin in #4211
  • Allow pre-bound HTTP sockets by @jlowin in #4222
  • Add targeted coverage tests by @strawgate in #4230
  • Upgrade ty to 0.0.39 by @jlowin in #4225
  • Decouple FastMCP access token lifetime from upstream expires_in by @jlowin in #4254

Security 🔒

  • feat(code-mode): default sandbox limits and per-execution tool-call cap by @strawgate in #4170
  • Security: Fix 3 findings in GitHub Actions workflows by @jpr5 in #4183
  • Add outbound comment guardrails by @jlowin in #4196
  • Add uv dependency cooldown by @jlowin in #4213

Fixes 🐞

  • fix: VersionSpec eq matching normalizes versions and selects deterministically by @strawgate in #4058
  • fix(tests): hoist azure-identity import out of the OBO test timeout window by @strawgate in #4176
  • fix(auth): disambiguate auth-denied vs missing component messages by @strawgate in #4165
  • fix: preserve annotations, meta, title, icons when creating resources from templates by @strawgate in #4061
  • fix: add OTEL spans to sampling step and tool execution by @strawgate in #4059
  • fix(config): read MCP config files as UTF-8 by @pragnyanramtha in #4164
  • fix(schema): preserve root metadata on fallback by @yuyua9 in #4178
  • fix(proxy): restore _current_server in _restore_request_context by @strawgate in #4168
  • fix(auth): add /.well-known/openid-configuration alias for OAuth server metadata by @shigechika in #4167
  • fix(code-mode): cancel Monty sandbox future on task cancellation by @strawgate in #4169
  • fix(auth): unprefix Azure scopes echoed back to MCP clients by @rgillinlz in #4130
  • fix(cli): forward stateless flag in uv run path by @yuyua9 in #4177
  • fix(ci): scope minimize-reviews concurrency by event name by @strawgate in #4174
  • Fix docs app demo iframe assets by @jlowin in #4194
  • Guard require-issue-link check job to pull_request_target events by @jlowin in #4209
  • Migrate auth JWTs to joserfc by @jlowin in #4221
  • Skip published docs update for prereleases by @jlowin in #4224
  • Surface proxy upstream failures by @jlowin in #4227
  • Close upstream OAuth clients by @jlowin in #4248
  • Fix GitHub MCP resource integration test by @jlowin in #4253
  • Fix resource templates with query params on proxied servers by @rene84 in #4251

Docs 📚

  • Document pip upgrade recovery for the fastmcp-slim package split by @jlowin in #4215
  • Move pip upgrade recovery into a Troubleshooting section by @jlowin in #4219
  • Restore Horizon docs banner by @jlowin in #4240
  • fix: Trendshift link and badge in README.md by @bhantos in #4236
  • docs: add tool fingerprinting recipe by @dgenio in #4233

Dependencies 📦

  • chore(deps): bump the uv group across 2 directories with 1 update by @dependabot in #4113
  • chore(deps-dev): bump pydantic-monty from 0.0.16 to 0.0.17 by @dependabot in #4023

Other Changes 🦾

  • Exempt maintainers from MRE auto-close by @jlowin in #4220

New Contributors

  • @pragnyanramtha made their first contribution in #4164
  • @yuyua9 made their first contribution in #4178
  • @tiagoskaneta made their first contribution in #4135
  • @mohankumarelec made their first contribution in #4142
  • @rgillinlz made their first contribution in #4130
  • @jpr5 made their first contribution in #4183
  • @bhantos made their first contribution in #4236
  • @rene84 made their first contribution in #4251

Full Changelog: v3.3.1...v3.4.0

v3.3.1: Loop There It Is

A hotfix for the 3.3 packaging split. Clean installs could fail on standalone component imports like from fastmcp.tools import tool, because component modules reached auth and task primitives through fastmcp.server and pulled in the full server/provider stack. Those primitives now live in lightweight utility modules, with the old server import paths preserved as compatibility re-exports.

Fixes 🐞

  • fix(docs): use valid FA icon on client-only package page by @jlowin in #4139
  • Decouple component imports from server by @jlowin in #4150

Full Changelog: v3.3.0...v3.3.1

v3.3.0: Slim Reaper

FastMCP 3.3 ships fastmcp-slim, a dependency-light distribution that separates the client from the server stack — install FastMCP's client and transport layer without Starlette, Uvicorn, or the rest of the server machinery. The import namespace is unchanged. It also closes out a backlog of OAuth proxy security hardening, MCP-compliant OTEL instrumentation, and auth additions that accumulated through the 3.2 cycle.

New Features 🎉

  • Add fastmcp-slim for client-only installs by @jlowin in #4122

Enhancements ✨

  • Add default prefill to FormInput.collect_input by @jlowin in #3937
  • OTEL: Fix attribute compliance with MCP semantic conventions by @strawgate in #3889
  • OTEL: Instrument all MCP list operations and enrich delegate spans by @strawgate in #3890
  • Improve real-world schema crash test: failure dump, cluster analysis, TypeErrors baseline ratchet by @jlowin in #3958
  • feat: add AzureB2CProvider for Azure AD B2C user flows by @carlos-rian in #3995
  • Add run_in_thread opt-out for sync tools with thread affinity by @jlowin in #4010
  • Add missing return type annotation to getattr by @ZLeventer in #4026
  • Add experimental_capabilities kwarg to FastMCP constructor by @jlowin in #4042
  • Add log_level parameter to FastMCP errors by @daniel-tsiang in #4036
  • Bump pydocket to 0.20.0 by @chrisguidry in #4031
  • enh: Add public API for updating OAuthProxy scopes after initialization by @taylorwilsdon in #4091
  • Refine fastmcp-slim packaging by @jlowin in #4125

Security 🔒

  • Harden OAuth Proxy silent consent against AS-in-the-middle by @jlowin in #3960
  • Reject dot-segments in redirect URI allowlist matching by @jlowin in #3963
  • Bump deps with open dependabot alerts by @jlowin in #3965
  • Partition ResponseCachingMiddleware cache by access token by @jlowin in #4041

Fixes 🐞

  • fix: reject self-mount to prevent infinite recursion by @strawgate in #3925
  • fix: ProxyTool crashes on non-TextContent error responses by @strawgate in #3926
  • fix: _prune_param and _convert_nullable_field mutate input schemas by @strawgate in #3927
  • fix: narrow OpenAI audio format dict to Literal for ty by @jlowin in #3936
  • fix: allow hyphens in resource template parameter names by @strawgate in #3929
  • fix: OpenAPI request director sends multipart and form-urlencoded as JSON by @strawgate in #3932
  • Fix raise_on_error handling for tool tasks by @gnanirahulnutakki in #3946
  • fix: FileSystemProvider reload race condition by @strawgate in #3938
  • fix tests that relied on task=True returning error results by @jlowin in #3954
  • Restore task snapshot via a worker-level dependency by @chrisguidry in #3945
  • Forward backend capabilities in ProxyProvider by @jlowin in #3956
  • Allow upstream client_id to be used directly without DCR by @jlowin in #3957
  • Graceful fallback for unsupported regex patterns in json_schema_to_type by @jlowin in #3959
  • Revert "Forward backend capabilities in ProxyProvider (#3956)" by @jlowin in #3964
  • fix: skip stdio subprocess test on Windows CI by @jlowin in #3966
  • fix: bound _refresh_locks with LRU eviction to prevent memory leak by @jlowin in #3968
  • fix: handle circular JSON Pointer $ref in dereference_refs by @lawrence3699 in #3896
  • fix: honor upstream refresh token expiry in OAuthProxy by @jlowin in #3990
  • fix: narrow _token_validator with isinstance for ty in AzureProvider.from_b2c by @jlowin in #4007
  • fix: cancel orphaned session_task when Client._disconnect times out by @jlowin in #4011
  • fix: preserve @tool metadata in from_function by @lawrence3699 in #4072
  • fix(openapi): keep blank values in parse_qs (refs #4056) by @MukundaKatta in #4076
  • Fix #4056: keep blank query values, add token bucket regression test by @MukundaKatta in #4069
  • fix(ping): exit ping loop cleanly when session stream is closed by @ashwin153 in #4087
  • Fix sampling from background tasks by @cuyua9 in #4068
  • Make Docket reentrant; mounted servers enter their own lifespan by @jlowin in #4095
  • fix(tool_transform): hoist $defs to schema root when ArgTransform introduces them by @SarthakB11 in #4101
  • fix(auth): silence authlib.jose DeprecationWarning at JWT import by @SarthakB11 in #4100
  • fix: don't cache import map in dev apps bundle by @jlowin in #4106
  • #4084 [Issues] Windows startup crash due to UnicodeDecodeError when l… by @doneman536 in #4092
  • fix: drop exc_info for expected tool failures, remove unreachable ValidationError by @sergeykad in #4029
  • fix: cli option --no-banner is NOT passed to cli but server-spec in-correctly when cli --reload option is specified. by @itaru2622 in #4083
  • Fix None backend_* span attributes on un-renamed proxy components by @ringerc in #4109
  • Fix OCI Provider issue in 3.x version. Add OCI auth provider example … by @kiranthakkar in #4116
  • fix(http): terminate active streamable-HTTP transports before lifespan shutdown by @SarthakB11 in #4118

Docs 📚

Dependencies 📦

  • chore(deps-dev): bump pydantic-monty from 0.0.11 to 0.0.12 by @dependabot in #3940
  • chore(deps-dev): bump pydantic-monty from 0.0.14 to 0.0.16 by @dependabot in #3984

Other Changes 🦾

  • fix: Don't completely hide plain mcp.tool app-only tools by @owtaylor in #4112

New Contributors

  • @gnanirahulnutakki made their first contribution in #3946
  • @lawrence3699 made their first contribution in #3896
  • @carlos-rian made their first contribution in #3995
  • @ZLeventer made their first contribution in #4026
  • @MukundaKatta made their first contribution in #4001
  • @daniel-tsiang made their first contribution in #4036
  • @ashwin153 made their first contribution in #4087
  • @cuyua9 made their first contribution in #4068
  • @taylorwilsdon made their first contribution in #4091
  • @SarthakB11 made their first contribution in #4101
  • @doneman536 made their first contribution in #4092
  • @sergeykad made their first contribution in #4029
  • @ringerc made their first contribution in #4109

Full Changelog: v3.2.4...v3.3.0

v3.2.4: Patch Me If You Can

A grab bag of fixes, hardening, and polish. The headline behavior change: background tasks are now scoped to the authorization context rather than the MCP session, so a task survives session churn and stays tied to who started it — a breaking change for anyone relying on the old session-scoped semantics. Plus actual-size validation in FileUpload, a Keycloak OAuth provider, automatic parameter descriptions from docstrings, and dozens of schema and sampling fixes.

Breaking Changes ⚠️

Enhancements ✨

  • Bump pydocket>=0.19.0, drop fakeredis pin by @chrisguidry in #3822
  • Add real-world schema crash test (232K schemas from APIs.guru) by @strawgate in #3826
  • Enable 7 zero-violation ruff rules by @strawgate in #3841
  • Promote 7 ty rules from ignore to warn by @strawgate in #3852
  • Replace ___ with hash-based backend tool routing and per-tool prefab resources by @jlowin in #3824
  • Enable 4 ruff rules (DTZ, ERA, ISC, INP) and fix 9 violations by @strawgate in #3842
  • Extract parameter descriptions from docstrings by @jlowin in #3872
  • ci: speed up schema crash test (CSafeLoader + xdist-safe aggregation) by @jlowin in #3873
  • test: bump OpenAPI init perf threshold to 200ms for Windows CI by @jlowin in #3879
  • refactor: unify object-schema conversion through _object_schema_to_type by @jlowin in #3884
  • Add Keycloak OAuth Provider for Enterprise Authentication and local dev by @stephaneberle9 in #1937
  • Allow auth providers to override protected resource base URLs by @aaazzam in #3900
  • Enable PERF and T20 ruff rules by @strawgate in #3845
  • Add response_title and response_description to ctx.elicit() by @jlowin in #3912
  • Deprecate ctx.elicit() without response_type by @jlowin in #3916

Security 🔒

  • Validate actual base64 data size in FileUpload, not client-reported size by @strawgate in #3816
  • Stop forwarding inbound HTTP headers to unrelated remote servers by @jlowin in #3837
  • AuthKit: auto-bind token audience to resource URL (RFC 8707) by @jlowin in #3905

Fixes 🐞

  • Version-check is_docket_available() to avoid transitive pydocket crash by @jlowin in #3807
  • fix: materialize generators before result conversion, handle bytes gracefully by @strawgate in #3830
  • Fix json_schema_to_type crashes on keywords, boolean schemas, empty enums, and name collisions by @strawgate in #3818
  • fix: replace or with is not None checks for config/override merging by @strawgate in #3833
  • fix: TransformedTool sync fn crash and schema mutation by @strawgate in #3823
  • fix: cross-provider duplicate detection, error visibility, mask propagation by @strawgate in #3827
  • fix: don't pass HTTP kwargs when transport is unspecified by @strawgate in #3838
  • fix: strip title fields from tool schemas for Gemini 2.5 Flash compatibility by @strawgate in #3861
  • fix: retry when LLM returns text instead of calling final_response by @strawgate in #3850
  • Raise on unhandled content types in sampling handler dispatch chains by @strawgate in #3857
  • Fix broken code examples in docs by @strawgate in #3869
  • fix: GoogleGenaiSamplingHandler leaks thought parts and gives unhelpful errors on empty responses by @strawgate in #3849
  • fix: cap consecutive final_response validation retries by @strawgate in #3851
  • Fix test quality issues by @strawgate in #3854
  • Fix MCP tool on docs welcome page by @lkiesow in #3874
  • Fix CIMD clients getting required_scopes instead of valid_scopes by @jlowin in #3836
  • Rename filesystem-provider example dir to avoid mcp/ collision by @jlowin in #3878
  • fix: drop configurable dedupe from AggregateProvider, always warn by @jlowin in #3877
  • fix: resolve list[dict] return type producing Root() instead of dicts by @KeWang0622 in #3880
  • fix: strip titles from bare-metadata nodes (Gemini 2.5 Flash) by @jlowin in #3881
  • Fix wildcard resource template params in mounted servers by @jlowin in #3899
  • Harden forced client disconnect cleanup by @vonbai in #3885
  • fix: elicitation scalar return, resource auto-serialization, Client.new() state, prompt errors by @strawgate in #3859
  • fix: task.wait() hangs indefinitely when task enters input_required by @mrishav in #3798
  • Fix RetryMiddleware not retrying tool errors by @strawgate in #3858
  • Stop pydantic 2.13 from leaking _WrappedResult docstring into tool output schemas by @jlowin in #3918

Docs 📚

  • Note generate-notes API in release workflow docs by @jlowin in #3806
  • docs: require agents to respect DNM markers on PRs by @jlowin in #3871
  • docs: add uv-managed dependencies and uvx examples to mcp-json configuration by @vincent067 in #3843
  • docs: link fastmcp-keycloak-local companion project from Keycloak integration page by @stephaneberle9 in #3904
  • Overhaul apps docs by @jlowin in #3915

Dependencies 📦

New Contributors

  • @lkiesow made their first contribution in #3874
  • @KeWang0622 made their first contribution in #3880
  • @vonbai made their first contribution in #3885

Full Changelog: v3.2.3...v3.2.4

v3.2.3: Redis or Not

A stopgap pin: fakeredis 2.35.0 shipped an undocumented rename that broke pydocket's memory:// backend, causing fastmcp[tasks] installs to fail at startup with an ImportError. This pins fakeredis<2.35.0 in the tasks extra until a fixed pydocket ships.

Fixes 🐞

Docs 📚

  • Document session state isolation across mount boundaries by @jlowin in #3801

Full Changelog: v3.2.2...v3.2.3

v3.2.2: Audience Appreciation

Fixes the Azure audience regression from 3.2.1: validation switched from client_id to identifier_uri, which fixed custom Application ID URIs but broke the default case where Azure AD v2 tokens set aud to the bare client ID GUID. Both formats are now accepted.

Fixes 🐞

  • fix: accept both client_id and identifier_uri as Azure audience by @jlowin in #3797

Dependencies 📦

  • chore(deps): bump the uv group across 2 directories with 1 update by @dependabot in #3795

Full Changelog: v3.2.1...v3.2.2

v3.2.1: Audience Participation

A patch focused on auth-provider audience validation. Cognito tokens now validate on client_id (they carry no aud), Azure honors the identifier_uri parameter for Entra v2.0 tokens, and consent cookies are LRU-capped to prevent unbounded growth past reverse proxy header limits. Also fixes OpenAPI 3.0 nullable fields leaking into tool input schemas and server-variable substitution in base URLs.

Breaking Changes ⚠️

  • fix(google): use sub (user ID) for client_id instead of aud (app ID) by @shigechika in #3722
  • fix: remove CSP from tool metadata, keep on resource only by @jlowin in #3754

Enhancements ✨

  • [codex] Add FastMCP docs telemetry by @aaazzam in #3727
  • chore: split SDK navigation into standalone $ref file by @jlowin in #3773
  • fix: bump ty to >=0.0.29 and suppress new false positives by @jlowin in #3790

Fixes 🐞

  • fix: use explicit None checks for JWT exp validation by @jlowin in #3724
  • Unify background task context forwarding, fix concurrent dependency bugs by @chrisguidry in #3710
  • fix: add proxy timeouts and modernize networking in apps dev by @mateeaaa in #3741
  • fix: ResponseLimitingMiddleware no longer breaks outputSchema tools by @jlowin in #3756
  • fix: substitute server variable defaults when building base URL from OpenAPI spec by @mrishav in #3770
  • fix: FastAPI TestClient compatibility and lifespan re-initialization by @kvdhanush06 in #3736
  • fix: propagate upstream_claims in load_access_token by @kvdhanush06 in #3750
  • Remove deprecated asyncio.iscoroutinefunction fallback by @kaiisfree in #3767
  • fix: changeable allowed_client_redirect_uris on OAuthProxy by @fengarix in #3772
  • fix: broken link in changelog by @jlowin in #3775
  • fix(docs): correct FastMCP tool name in welcome docs by @buyua9 in #3781
  • fix: cap consent cookie size to prevent header overflow by @jlowin in #3784
  • Fix boolean property schemas in JSON Schema parsing by @jlowin in #3785
  • Fix OpenAPI 3.0 nullable fields in tool input schemas by @kvdhanush06 in #3768
  • fix: Cognito token verification checks client_id instead of aud by @jlowin in #3786
  • fix: use identifier_uri as audience for Azure token validation by @jlowin in #3787
  • Harden client tool result error handling by @aimable100 in #3778

Docs 📚

  • Github integraiton documentation fix: use result.data otherwise CallToolResult not scriptable by @c4jquick in #3753
  • chore: split v2 docs navigation into separate file by @jlowin in #3762
  • docs: document forward_resource parameter on OAuthProxy by @jlowin in #3788

Examples & Contrib 💡

  • fix: boolean false values dropped in form submissions by @jlowin in #3776

Dependencies 📦

  • chore(deps): bump fastmcp from 3.1.1 to 3.2.0 in /examples/testing_demo in the uv group across 1 directory by @dependabot in #3728
  • chore(deps): bump anthropic from 0.86.0 to 0.87.0 in the uv group across 1 directory by @dependabot in #3742

New Contributors

  • @c4jquick made their first contribution in #3753
  • @mateeaaa made their first contribution in #3741
  • @mrishav made their first contribution in #3770
  • @kvdhanush06 made their first contribution in #3736
  • @kaiisfree made their first contribution in #3767
  • @fengarix made their first contribution in #3772
  • @buyua9 made their first contribution in #3781
  • @aimable100 made their first contribution in #3778

Full Changelog: v3.2.0...v3.2.1

v3.2.0: Show Don't Tool

FastMCP 3.2 is the Apps release: your tools can now return interactive UIs — charts, dashboards, forms, maps — rendered right inside the conversation. FastMCPApp separates the tools the LLM sees from the backend tools the UI calls, five built-in providers (FileUpload, Approval, Choice, FormInput, GenerativeUI) cover common interaction patterns, and fastmcp dev apps gives you a browser preview. The release also lands a significant security hardening pass across SSRF/path-traversal, JWT algorithm restrictions, OAuth scope enforcement, and CSRF.

New Features 🎉

  • Add FastMCPApp — a Provider for composable MCP applications by @jlowin in #3385
  • Add fastmcp dev apps command with browser UI preview by @jlowin in #3489
  • Add GenerativeUI provider, bump prefab-ui 0.14.0 by @jlowin in #3647
  • Add FileUpload provider by @jlowin in #3669
  • Add Approval and Choice providers by @jlowin in #3686
  • Add FormInput provider, bump prefab-ui to 0.15.0 by @jlowin in #3687

Breaking Changes ⚠️

  • Route app tool calls via ___-prefixed names by @jlowin in #3667

Enhancements ✨

  • feat: add --config-path flag to claude-desktop install command by @Sumanshu-Nankana in #3380
  • Support ImageContent and AudioContent in Message class by @ericrobinson-indeed in #3396
  • Deprecate PromptToolMiddleware and ResourceToolMiddleware by @jlowin in #3389
  • Block HS* algorithms when JWTVerifier is configured with JWKS by @jlowin in #3419
  • Remove prek from Marvin workflows by @jlowin in #3444
  • Add dependency version compatibility guidance to code-review skill by @jlowin in #3475
  • Remove "good first issue" label by @jlowin in #3482
  • Cache component lists in ProxyProvider by @jlowin in #3479
  • Support logging/setLevel and add client_log_level by @jlowin in #3491
  • Propagate x-fastmcp-wrap-result in tool result _meta by @jlowin in #3490
  • feat(auth): add external_consent param to suppress misleading warning by @mtthidoteu in #3473
  • Add verify parameter for SSL certificate configuration by @jlowin in #3487
  • Expose minimum_check_interval, reduce task pickup latency by @jlowin in #3500
  • Fix test timeouts, suppress deprecation warnings, speed up auth tests by @jlowin in #3504
  • Auto-close upgrade check issue when build passes by @jlowin in #3505
  • feat: make upstream_client_secret optional in OAuthProxy by @jlowin in #3486
  • Add security label to triage workflow and release notes by @jlowin in #3516
  • Claude/review contributor guidelines by @jlowin in #3517
  • pin pydantic-monty to 0.0.8 by @jlowin in #3539
  • Support ImageContent and AudioContent in sampling handlers by @jlowin in #3550
  • Graceful degradation for multi-server proxy setup by @jlowin in #3546
  • Extract TokenCache utility, add caching to GitHubTokenVerifier by @jlowin in #3547
  • Add review-pr skill for Codex bot workflow by @jlowin in #3552
  • Add MCP message inspector to dev apps UI by @jlowin in #3570
  • Comprehensive MCP Apps docs, string CallTool resolution by @jlowin in #3575
  • Replace UUID global keys with (app_name, tool_name) registry by @jlowin in #3585
  • Route app tool calls through provider chain by @jlowin in #3587
  • Dev apps: show more/less for long tool descriptions by @jlowin in #3600
  • Apps Phase 1: docs, examples, app-only tool filtering by @jlowin in #3593
  • Forward enable_cimd to OAuthProxy in all provider subclasses by @jlowin in #3608
  • Tune too-long triage heuristic by @jlowin in #3610
  • Update ty ignore comments for 0.0.25 compatibility by @jlowin in #3614
  • Move app modules to fastmcp.apps package by @jlowin in #3616
  • Tighten too-long heuristic for design-document issues by @jlowin in #3620
  • Run MCP conformance tests by @strawgate in #3628
  • Add PrefabAppConfig for customizable Prefab tool setup by @jlowin in #3648
  • Clean error when dev apps ports are in use by @jlowin in #3658
  • Add Clerk OAuth provider by @mostafa6765 in #3677
  • Add interactive map example with geocoding by @jlowin in #3702
  • Bump pydantic-monty to 0.0.9 by @jlowin in #3707
  • Add forward_resource flag to OAuthProxy by @jlowin in #3711

Security 🔒

  • fix: enforce per-tool auth checks in sampling tool wrapper by @jlowin in #3494
  • fix: handle re.error from malformed URI templates by @jlowin in #3501
  • fix: reject empty/OIDC-only required_scopes in AzureProvider by @jlowin in #3503
  • fix: restrict $ref resolution to local refs only (SSRF/LFI) by @jlowin in #3502
  • fix: URL-encode path params to prevent SSRF/path traversal (GHSA-vv7q-7jx5-f767) by @jlowin in #3507
  • fix: prevent path traversal in skill download by @jlowin in #3493
  • fix: prefer IdP-granted scopes over client-requested scopes in OAuthProxy by @jlowin in #3492
  • fix: remove forced follow_redirects from httpx_client_factory calls by @jlowin in #3496
  • Bump PyJWT >= 2.12.0 (CVE-2026-32597) by @jlowin in #3515
  • Drop diskcache from examples/testing_demo lockfile (CVE-2025-69872) by @jlowin in #3518
  • fix: CSRF double-submit cookie check in consent flow by @jlowin in #3519
  • fix: validate server names in install commands by @jlowin in #3522
  • fix: reject refresh tokens used as Bearer access tokens by @jlowin in #3524
  • fix: route ResourcesAsTools/PromptsAsTools through server middleware by @jlowin in #3495

Fixes 🐞

  • Update docs banner and fix mobile layout by @jlowin in #3370
  • Remove form-action from consent CSP, forward consent_csp_policy in providers by @jlowin in #3372
  • Fix resource templates with query params on mounted servers by @jlowin in #3373
  • Increase uv transport test timeout for CI cold starts by @jlowin in #3376
  • Fix stale catalog in CodeMode execute by @jlowin in #3375
  • Deduplicate versioned tools in CatalogTransform catalog by @jlowin in #3374
  • Fix ty 0.0.20 compatibility by @jlowin in #3377
  • Forward scopes_supported through RemoteAuthProvider subclasses by @jlowin in #3388
  • Enforce token scopes in WorkOS verifier to prevent scope bypass by @jlowin in #3407
  • Bind Discord token verification to configured client_id by @jlowin in #3405
  • Return after McpError in initialization middleware to prevent fallthrough by @jlowin in #3413
  • Escape client_id in OAuth consent advanced details by @jlowin in #3418
  • Bound client auto-pagination loops to prevent unbounded list fetches by @jlowin in #3411
  • Raise ValueError for invalid boolean query params in resource templates by @jlowin in #3434
  • Validate workspace path is a directory in cursor install by @jlowin in #3435
  • Validate version metadata to reject non-scalar types by @jlowin in #3437
  • Bind AWS Cognito token verification to configured app client by @jlowin in #3406
  • Avoid stale context leakage when proxying with an already‑connected ProxyClient by @jlowin in #3408
  • Prevent skills manifests from hashing files outside the skill directory by @jlowin in #3410
  • Harden fastmcp metadata parsing in proxy paths by @jlowin in #3412
  • Re-hash response caching keys to avoid persisting raw request input by @jlowin in #3414
  • Handle Windows npx detection when npx.cmd is missing by @jlowin in #3416
  • Guard OAuth callback result from post-completion overwrites by @jlowin in #3417
  • Fix tool argument rename collisions with passthrough params by @jlowin in #3431
  • Guard default progress handler against total=0 notifications by @jlowin in #3432
  • Fix get_* returning None when latest version is disabled by @jlowin in #3439
  • Fix server lifespan overlap teardown by @jlowin in #3415
  • Fix $ref output schema object detection regression by @jlowin in #3420
  • Preserve kw-only defaults when rebuilding functions for resolved annotations by @jlowin in #3429
  • Redact sensitive headers in OpenAPI provider debug logging by @jlowin in #3436
  • Fix async partial callables rejected by iscoroutinefunction by @jlowin in #3438
  • Block insecure HS* JWT verification with JWKS/public keys by @jlowin in #3430
  • Sanitize untrusted output in fastmcp list and fastmcp call by @jlowin in #3409
  • fix: propagate version to components in FileSystemProvider by @martimfasantos in #3458
  • fix: use intent-based flag for OIDC scope patch in load_access_token by @voidborne-d in #3465
  • Set readOnlyHint=True on ResourcesAsTools generated tools by @jlowin in #3476
  • fix: normalize Google scope shorthands and surface valid_scopes by @jlowin in #3477
  • fix: resolve ty 0.0.23 type-checking errors by @jlowin in #3481
  • fix: shield lifespan teardown from cancellation by @jlowin in #3480
  • fix: forward custom_route endpoints from mounted servers by @voidborne-d in #3462
  • fix: use dynamic version in CLI help text instead of hardcoded 2.0 by @saschabuehrle in #3456
  • Fix Monty 0.0.8 compatibility by @hkc5 in #3468
  • Fix task test teardown hanging 5s per test by @jlowin in #3499
  • fix: validate workspace path is a directory before cursor install by @nightcityblade in #3440
  • Treat refresh_expires_in=0 as missing, fall back to 30-day default by @jlowin in #3514
  • fix: use raw strings for regex in pytest.raises match by @jlowin in #3523
  • fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators by @jlowin in #3540
  • fix: flaky KEY_PREFIX warning test in lowest-direct deps by @jlowin in #3549
  • fix: suppress output schema for ToolResult subclass annotations by @jlowin in #3548
  • Bump anthropic minimum to 0.48.0 by @jlowin in #3553
  • Update startup banner deploy URL to Prefect Horizon by @zzstoatzz in #3557
  • fix: increase sleep duration in proxy cache tests by @strawgate in #3567
  • fix: store absolute token expiry to prevent stale expires_in on reload by @jlowin in #3572
  • fix: preserve tool properties named 'title' during schema compression by @jlowin in #3582
  • Add encoding parameter to FileResource by @shulkx in #3580
  • Transparently refresh upstream token in OAuthProxy.load_access_token() by @jlowin in #3584
  • Fix loopback redirect URI port matching per RFC 8252 §7.3 by @radoshi in #3589
  • Fix app tool routing: visibility check and middleware propagation by @jlowin in #3591
  • Fix query parameter serialization to respect OpenAPI explode setting by @jlowin in #3595
  • Fix dev apps form: union types, textarea support, JSON parsing by @jlowin in #3597
  • Respect OpenAPI content type in request body serialization by @jlowin in #3611
  • fix(google): replace deprecated /oauth2/v1/tokeninfo with /oauth2/v3/userinfo by @shigechika in #3603
  • fix: resolve EntraOBOToken dependency injection through MultiAuth by @jer805 in #3609
  • fix: filesystem provider import machinery by @strawgate in #3626
  • fix: recover StdioTransport after subprocess exits by @strawgate in #3630
  • fix(server): preserve mounted tool task metadata by @pandego in #3632
  • fix: scope deprecation warning filter to FastMCPDeprecationWarning by @jlowin in #3649
  • fix: resolve CurrentFastMCP/ctx.fastmcp to child server in mounted background tasks by @jlowin in #3651
  • Fix blocking docs issues: chart imports, Select API, Rx consistency by @jlowin in #3652
  • Fix prompt caching round-trip on cache miss by @strawgate in #3666
  • fix: serialize object query params per OpenAPI style/explode rules by @4444J99 in #3662
  • fix: HTTP request headers not accessible in background task workers by @pandego in #3631
  • fix: restore HTTP headers in worker execution path for background tasks by @jlowin in #3681
  • fix: strip discriminator after dereferencing schemas by @jlowin in #3682
  • fix: remove stale ty:ignore directives for ty 0.0.26 by @jlowin in #3684
  • fix: dev apps log panel UX improvements by @jlowin in #3698
  • Add quiz example app, fix dev server empty string args by @jlowin in #3700

Docs 📚

  • Add early-development warning to Prefab docs by @jlowin in #3362
  • Add tag to docs by @jlowin in #3382
  • Add settings and environment variables reference by @jlowin in #3384
  • Add contributing guidelines and update issue/PR templates by @jlowin in #3485
  • [Documentation] Move stateless_http transport kwarg to http_app as FastMCP constructor… by @mhallo in #3510
  • Update security policy by @jlowin in #3521
  • Add release instructions to CLAUDE.md by @jlowin in #3583
  • fix(docs): correct misleading stateless_http header by @jlowin in #3622
  • Add tag to deployment pages by @jlowin in #3624
  • Docs: generative UI page, fix imports, add PrefabAppConfig by @jlowin in #3650
  • docs: improve contributor guidelines for framework contributions by @jlowin in #3653
  • Add release notes for v3.1.0, v3.1.1, and v2.14.6 by @jlowin in #3659
  • Docs: showcase hero, narrative improvements, panel closed by default by @jlowin in #3657
  • Docs: add FileTreeStore sanitization warnings and update examples by @strawgate in #3661
  • Add prefab-ui version pinning warning to docs by @jlowin in #3688
  • Reorganize apps overview TOC by @jlowin in #3689
  • Fix docs gaps in app provider pages by @jlowin in #3690
  • Polish apps docs for 3.2 release by @jlowin in #3693
  • Add apps quickstart tutorial by @jlowin in #3695
  • Improve quickstart: pie chart, interactive row selection, screenshots by @jlowin in #3699
  • Add sales dashboard and live system monitor examples, bump prefab-ui to 0.17 by @jlowin in #3696
  • Add examples gallery page by @jlowin in #3705
  • docs: note that custom routes are unauthenticated by @jlowin in #3706
  • Remove hardcoded prefab-ui version from pinning warnings by @jlowin in #3708

Examples & Contrib 💡

  • Block recursive self-invocation in BulkToolCaller by @jlowin in #3433

Dependencies 📦

  • Bump authlib from 1.6.6 to 1.6.7 in /examples/testing_demo in the uv group across 1 directory by @dependabot in #3390
  • Bump actions/create-github-app-token from 2 to 3 by @dependabot in #3511
  • chore(deps): bump pyasn1 from 0.6.2 to 0.6.3 in the uv group across 1 directory by @dependabot in #3538
  • chore(deps): bump j178/prek-action from 1 to 2 by @dependabot in #3578
  • chore(deps): bump requests from 2.32.5 to 2.33.0 in the uv group across 1 directory by @dependabot in #3638
  • chore(deps): bump cryptography from 46.0.5 to 46.0.6 in /examples/testing_demo in the uv group across 1 directory by @dependabot in #3685
  • chore(deps): bump actions/setup-node from 4 to 6 by @dependabot in #3691

New Contributors

  • @Sumanshu-Nankana made their first contribution in #3380
  • @ericrobinson-indeed made their first contribution in #3396
  • @voidborne-d made their first contribution in #3465
  • @mtthidoteu made their first contribution in #3473
  • @saschabuehrle made their first contribution in #3456
  • @hkc5 made their first contribution in #3468
  • @nightcityblade made their first contribution in #3440
  • @mhallo made their first contribution in #3510
  • @radoshi made their first contribution in #3589
  • @shigechika made their first contribution in #3603
  • @pandego made their first contribution in #3632
  • @4444J99 made their first contribution in #3662
  • @mostafa6765 made their first contribution in #3677

Full Changelog: v3.1.0...v3.2.0

v3.1.1: 'Tis But a Patch

Pins pydantic-monty below 0.0.8 to fix a breaking change in Monty that affects code mode. Monty 0.0.8 removed the external_functions constructor parameter, causing MontySandboxProvider to fail. This patch caps the version so existing installs work correctly.

Fixes 🐞

  • Pin pydantic-monty below 0.0.8 to fix code mode by @jlowin in #3497

Full Changelog: v3.1.0...v3.1.1

v3.1.0: Code to Joy

FastMCP 3.1 is the Code Mode release. The 3.0 architecture introduced providers and transforms as the extensibility layer — 3.1 puts that architecture to work, shipping the most requested capability since launch: servers that can find and execute code on behalf of agents, without requiring clients to know what tools exist.

New Features 🎉

  • feat: Search transforms for tool discovery by @jlowin in #3154
  • Add experimental CodeMode transform by @aaazzam in #3297
  • Add Prefab Apps integration for MCP tool UIs by @jlowin in #3316

Enhancements 🔧

  • Lazy-load heavy imports to reduce import time by @jlowin in #3295
  • Add http_client parameter to all token verifiers for connection pooling by @jlowin in #3300
  • Add in-memory caching for token introspection results by @jlowin in #3298
  • Add SessionStart hook to install gh CLI in cloud sessions by @jlowin in #3308
  • Fix ty 0.0.19 type errors by @jlowin in #3310
  • Code Mode: Add resource limits to MontySandboxProvider by @jlowin in #3326
  • Accept transforms as FastMCP init kwarg by @jlowin in #3324
  • Split large test files to comply with loq line limit by @jlowin in #3328
  • Add -m/--module flag to fastmcp run and dev inspector by @dgenio in #3331
  • Add search_result_serializer hook and serialize_tools_for_output_markdown by @MagnusS0 in #3337
  • Add MultiAuth for composing multiple token verification sources by @jlowin in #3335
  • Adds PropelAuth as an AuthProvider by @andrew-propelauth in #3358
  • Replace vendored DI with uncalled-for by @chrisguidry in #3301
  • Decompose CodeMode into composable discovery tools by @jlowin in #3354
  • feat(contrib): auto-sync MCPMixin decorators with from_function signatures by @AnkeshThakur in #3323
  • Add Google GenAI Sampling Handler by @strawgate in #2977
  • Add ListTools, search limit, and catalog size annotation to CodeMode by @jlowin in #3359
  • Allow configuring FastMCP transport setting in the same way as other configuration by @jvdmr in #1796
  • Add include_unversioned option to VersionFilter by @yangbaechu in #3349

Fixes 🐞

  • Fix docs banner pushing nav down by @jlowin in #3282
  • fix: Replace hardcoded TTL with DEFAULT_TTL_MS - issue #3279 by @cedric57 in #3280
  • fix: stop suppressing server stderr in fastmcp call by @jlowin in #3283
  • fix: skip max_completion_tokens when maxTokens is None by @eon01 in #3284
  • OpenAPI: rewrite $ref under propertyNames and patternProperties in _replace_ref_with_defs; add regression test for dict[StrEnum, Model] by @manojPal23234 in #3306
  • Remove stale add_resource() key parameter from docs by @jlowin in #3309
  • Handle AuthorizationError as exclusion in AuthMiddleware list hooks by @yangbaechu in #3338
  • Fix flaky OpenAPI performance test threshold by @jlowin in #3355
  • Fix flaky SSE timeout test by @jlowin in #3343
  • Remove system role references from docs by @jlowin in #3356
  • Fix session persistence across tool calls in multi-server MCPConfigTransport by @jer805 in #3330

Docs 📚

  • Add v3.0.2 release notes by @jlowin in #3276
  • Fix "FastMCP Constructor Parameters" in documentation server.mdx (Remove old parameters & Add new parameter) by @wangyy04 in #3317
  • Fix stale docs: tag filtering API and missing output_schema param by @jlowin in #3322
  • Narrate search example clients by @jlowin in #3321
  • Code Mode: Document resource limits and fix docs formatting by @jlowin in #3327
  • Add reverse proxy (nginx) section to HTTP deployment docs by @dgenio in #3344
  • Restructure docs navigation: CLI section, Composition, More by @jlowin in #3361

Other Changes 🦾

  • Don't advertise sampling.tools capability by default by @jlowin in #3334

New Contributors

  • @cedric57 made their first contribution in #3280
  • @eon01 made their first contribution in #3284
  • @manojPal23234 made their first contribution in #3306
  • @wangyy04 made their first contribution in #3317
  • @yangbaechu made their first contribution in #3338
  • @andrew-propelauth made their first contribution in #3358
  • @jer805 made their first contribution in #3330
  • @jvdmr made their first contribution in #1796

Full Changelog: v3.0.2...v3.1.0

v3.0.2: Threecovery Mode II

Two community-contributed fixes: auth headers from MCP transport no longer leak through to downstream OpenAPI APIs, and background task workers now correctly receive the originating request ID. Plus a new docs example for context-aware tool factories.

Fixes 🐞

  • fix: prevent MCP transport auth header from leaking to downstream OpenAPI APIs by @stakeswky in #3262
  • fix: propagate origin_request_id to background task workers by @gfortaine in #3175

Docs 📚

Full Changelog: v3.0.1...v3.0.2

v3.0.1: Three-covery Mode

First patch after 3.0 — mostly smoothing out rough edges discovered in the wild. The big ones: middleware state that wasn't surviving the trip to tool handlers now does, Tool.from_tool() accepts callables again, OpenAPI schemas with circular references no longer crash discovery, and decorator overloads now return the correct types in function mode. Also adds verify_id_token to OIDCProxy for providers (like some Azure AD configs) that issue opaque access tokens but standard JWT id_tokens.

Enhancements 🔧

  • Add verify_id_token option to OIDCProxy by @jlowin in #3248

Fixes 🐞

  • Fix v3.0.0 changelog compare link by @jlowin in #3223
  • Fix MDX parse error in upgrade guide prompts by @jlowin in #3227
  • Fix non-serializable state lost between middleware and tools by @jlowin in #3234
  • Accept callables in Tool.from_tool() by @jlowin in #3235
  • Preserve skill metadata through provider wrapping by @jlowin in #3237
  • Fix circular reference crash in OpenAPI schemas by @jlowin in #3245
  • Fix NameError with future annotations and Context/Depends parameters by @jlowin in #3243
  • Fix ty ignore syntax in OpenAPI provider by @jlowin in #3253
  • Use max_completion_tokens instead of deprecated max_tokens in OpenAI handler by @jlowin in #3254
  • Fix ty compatibility with upgraded deps by @jlowin in #3257
  • Fix decorator overload return types for function mode by @jlowin in #3258

Docs 📚

  • Sync README with welcome.mdx, fix install count by @jlowin in #3224
  • Document dict-to-Message prompt migration in upgrade guides by @jlowin in #3225
  • Fix v2 upgrade guide: remove incorrect v1 import advice by @jlowin in #3226
  • Animated banner by @jlowin in #3231
  • Document mounted server state store isolation in upgrade guide by @jlowin in #3236

Full Changelog: v3.0.0...v3.0.1

v3.0.0: Three at Last

FastMCP 3.0 is stable. Two betas, two release candidates, 21 new contributors, and more than 100,000 pre-release installs later — the architecture held up, the upgrade path was smooth, and we're shipping it.

The surface API is largely unchanged — @mcp.tool() still works exactly as before. What changed is everything underneath: a provider/transform architecture that makes FastMCP extensible, observable, and composable in ways v2 couldn't support. If we did our jobs right, you'll barely notice the redesign. You'll just notice that more is possible.

This is also the release where FastMCP moves from jlowin/fastmcp to PrefectHQ/fastmcp. GitHub forwards all links, PyPI is the same, imports are the same. A major version felt like the right moment to make it official.

Build servers from anything

🔌 Components no longer have to live in one file with one server. FileSystemProvider discovers tools from directories with hot-reload. OpenAPIProvider wraps REST APIs. ProxyProvider proxies remote MCP servers. SkillsProvider delivers agent skills as resources. Write your own provider for whatever source makes sense. Compose multiple providers into one server, share one across many, or chain them with transforms that rename, namespace, filter, version, and secure components as they flow to clients. ResourcesAsTools and PromptsAsTools expose non-tool components to tool-only clients.

Ship to production

🔐 Component versioning: serve @tool(version="2.0") alongside older versions from one codebase. Granular authorization on individual components with async auth checks, server-wide policies via AuthMiddleware, and scope-based access control. OAuth gets CIMD, Static Client Registration, Azure OBO via dependency injection, JWT audience validation, and confused-deputy protections. OpenTelemetry tracing with MCP semantic conventions. Response size limiting. Background tasks with distributed Redis notification and ctx.elicit() relay. Security fixes include dropping diskcache (CVE-2025-69872) and upgrading python-multipart and protobuf for additional CVEs.

Adapt per session

💾 Session state persists across requests via ctx.set_state() / ctx.get_state(). ctx.enable_components() and ctx.disable_components() let servers adapt dynamically per client — show admin tools after authentication, progressively reveal capabilities, or scope access by role.

Develop faster

⚡ --reload auto-restarts on file changes. Standalone decorators return the original function, so decorated tools stay callable in tests and non-MCP contexts. Sync functions auto-dispatch to a threadpool. Tool timeouts, MCP-compliant pagination, composable lifespans, PingMiddleware for keepalive, and concurrent tool execution when the LLM returns multiple calls in one response.

Use FastMCP as a CLI

🖥️ fastmcp list and fastmcp call query and invoke tools on any server from a terminal. fastmcp discover scans your editor configs (Claude Desktop, Cursor, Goose, Gemini CLI) and finds configured servers by name. fastmcp generate-cli writes a standalone typed CLI where every tool is a subcommand. fastmcp install registers your server with Claude Desktop, Cursor, or Goose in one command.

Build apps (3.1 preview)

📱 Spec-level support for MCP Apps is in: ui:// resource scheme, typed UI metadata via AppConfig, extension negotiation, and runtime detection. The full Apps experience lands in 3.1.


If you hit 3.0 because you didn't pin your dependencies and something breaks — the upgrade guides will get you sorted. We minimized breaking changes, but a major version is a major version.

bash
pip install fastmcp -U

📖 Documentation
🚀 Upgrade from FastMCP v2
🔀 Upgrade from MCP Python SDK

What's Changed

New Features 🎉

  • Refactor resource behavior and add meta support by @jlowin in #2611
  • Refactor prompt behavior and add meta support by @jlowin in #2610
  • feat: Provider abstraction for dynamic MCP components by @jlowin in #2622
  • Unify component storage in LocalProvider by @jlowin in #2680
  • Introduce ResourceResult as canonical resource return type by @jlowin in #2734
  • Introduce Message and PromptResult as canonical prompt types by @jlowin in #2738
  • Add --reload flag for auto-restart on file changes by @jlowin in #2816
  • Add FileSystemProvider for filesystem-based component discovery by @jlowin in #2823
  • Add standalone decorators and eliminate fastmcp.fs module by @jlowin in #2832
  • Add authorization checks to components and servers by @jlowin in #2855
  • Decorators return functions instead of component objects by @jlowin in #2856
  • Add transform system for modifying components in provider chains by @jlowin in #2836
  • Add OpenTelemetry tracing support by @chrisguidry in #2869
  • Add component versioning and VersionFilter transform by @jlowin in #2894
  • Add version discovery and calling a certain version for components by @jlowin in #2897
  • Refactor visibility to mark-based enabled system by @jlowin in #2912
  • Add session-specific visibility control via Context by @jlowin in #2917
  • Add Skills Provider for exposing agent skills as MCP resources by @jlowin in #2944
  • Add MCP Apps Phase 1 — SDK compatibility (SEP-1865) by @jlowin in #3009
  • Add fastmcp list and fastmcp call CLI commands by @jlowin in #3054
  • Add fastmcp generate-cli command by @jlowin in #3065
  • Add CIMD (Client ID Metadata Document) support for OAuth by @jlowin in #2871

Enhancements 🔧

  • Convert mounted servers to MountedProvider by @jlowin in #2635
  • Simplify .key as computed property by @jlowin in #2648
  • Refactor MountedProvider into FastMCPProvider + TransformingProvider by @jlowin in #2653
  • Enable background task support for custom component subclasses by @jlowin in #2657
  • Use CreateTaskResult for background task creation by @jlowin in #2660
  • Refactor provider execution: components own their execution by @jlowin in #2663
  • Add supports_tasks() method to replace string mode checks by @jlowin in #2664
  • Replace type: ignore[attr-defined] with isinstance assertions in tests by @jlowin in #2665
  • Add poll_interval to TaskConfig by @jlowin in #2666
  • Refactor task module: rename protocol.py to requests.py and reduce redundancy by @jlowin in #2667
  • Refactor FastMCPProxy into ProxyProvider by @jlowin in #2669
  • Move OpenAPI to providers/openapi submodule by @jlowin in #2672
  • Use ergonomic provider initialization pattern by @jlowin in #2675
  • Fix ty 0.0.5 type errors by @jlowin in #2676
  • Remove execution methods from Provider base class by @jlowin in #2681
  • Add t