
FastMCP
Python framework for building MCP servers, clients and apps
About FastMCP
FastMCP is a Python framework for the Model Context Protocol, the standard that lets a language model call your tools and read your data. Writing an MCP server by hand means writing JSON schemas, validating inputs and outputs, negotiating a protocol version, handling transports and wiring up authentication before you get to the part you actually care about. FastMCP treats all of that as the framework's job. You decorate an ordinary Python function with mcp.tool, and the schema, validation and transport come from the type annotations you already wrote.
It is Apache-2.0 licensed and maintained by Prefect. Its history matters for judging it: FastMCP created the high-level Python API that was folded into the official MCP Python SDK in 2024, and the standalone project kept going from there. The current release is FastMCP 4, built on version 2 of the MCP Python SDK, and at the time of writing it is at v4.0.0 beta 1. That is the honest caveat: FastMCP 4 carries documented breaking changes from 3.0. ctx.sample() and ctx.list_roots() are gone, the McpError constructor signature changed, custom httpx clients handed to a transport become httpx2, and one change is silent rather than loud, which the project's own FAQ tells you to go looking for. There is no pricing page because there is no paid tier; the docs navigation links Prefect Horizon, which is a separate Prefect product.
You install it with uv add fastmcp or pip install fastmcp, optionally with extras such as tasks for background work. A server is a FastMCP instance plus decorated functions: write add(a: int, b: int) -> int with a docstring, decorate it, and the tool description, argument schema and return schema all come from the signature. Call mcp.run() and the server speaks MCP over whichever transport you configured. On the client side you point a FastMCP client at a local or remote server by URL and it handles protocol negotiation, authentication and connection lifecycle for you. There is a CLI for running and inspecting servers, and fastmcp version prints the FastMCP version, the MCP protocol version and your Python version together, which is the first thing to check when a client will not connect.
- •Schema From Type Hints - Annotate a Python function and FastMCP derives the tool schema, validates inputs and outputs, and exposes it over MCP, with no hand-written JSON schema anywhere
- •Servers, Clients and Apps - One coherent API across all three, so the same framework builds the server you expose and the client that consumes somebody else's
- •Interactive Apps - Tools can return interactive interfaces, generative UI and custom HTML rather than only text, which is the newer half of the framework
- •Transport and Protocol Handling - Protocol negotiation, version compatibility across the two MCP protocol eras, and a legacy pin for older clients, handled by the framework rather than your code
- •Authentication - Built-in auth for servers and clients, with integrations for common web frameworks and auth providers
- •Packaging Options - fastmcp-slim for a smaller dependency footprint and fastmcp-remote for remote servers, plus a documented note on Cyclopts and docutils for organisations whose licence compliance review cares
Python developers building an MCP server so that Claude, Cursor, Codex or any other MCP client can call into their systems, and anyone who has tried it against the raw SDK and would rather not maintain the schema plumbing. It suits internal platform teams exposing company data and APIs to coding agents, and library authors shipping an MCP interface alongside their existing package. Because it is Apache-2.0 with no paid tier, there is nothing to negotiate before using it in production. It is not the right choice if your stack is not Python, and it is not the right choice today if you need a stable API surface, because FastMCP 4 is a beta with real breaking changes from 3.0 and the migration is mechanical but not free. It is also a library rather than an application: there is no interface to open, only documentation and a package to install.
Pricing
No pricing page found
Free and Apache-2.0 licensed. FastMCP publishes no pricing page and has no paid tier. It is maintained by Prefect, whose separate commercial product (Prefect Horizon) is linked from the docs.
From the vendor pricing page, 2026-10-08

















