FastMCP

The Python framework for building MCP servers. Decorator-driven, Pydantic-powered, with built-in composition, proxying, and OpenAPI import.

Why FastMCP

MCP servers need tools, resources, and prompts exposed over a transport (stdio, HTTP, streamable HTTP). The raw MCP SDK requires manual schema definition and protocol plumbing. FastMCP wraps all of that behind Python decorators and type hints - you write normal functions, it generates the schemas and handles the protocol.

FastMCP v1 was incorporated into the official mcp SDK as mcp.server.fastmcp. The standalone fastmcp package (v2+) diverged significantly with composition, proxying, OpenAPI import, auth, a client SDK, and more. The standalone package is the one to use going forward.

MCP itself was donated to the Agentic AI Foundation (AAIF), a Linux Foundation directed fund, in December 2025 - co-founded by Anthropic, Block, and OpenAI. The spec is now vendor-neutral with an open governance process.

Key facts:

  • Repo: prefecthq/fastmcp (gofastmcp.com)
  • Python: >=3.10
  • Core dep: mcp>=1.24.0,<2.0 (builds on the official SDK)
  • Install: pip install fastmcp or uv add fastmcp
  • 1M+ downloads/day, powers ~70% of MCP servers across all languages

Relationship to Your Existing MCP Servers

Your current servers (largefile, diffchunk, md-server) use from mcp.server.fastmcp import FastMCP - this is FastMCP v1 bundled in the mcp SDK. Migration to standalone fastmcp is straightforward (change the import) and unlocks:

Featuremcp SDK (v1)standalone fastmcp (v2+)
Tool/resource decoratorsYesYes
Composition/mountingNoYes
Proxy remote serversNoYes
OpenAPI importNoYes
Auth (OAuth, JWT)NoYes
Client SDKSeparateBuilt-in
Custom HTTP routesNoYes
Task support (long-running)NoYes
Output schemasNoYes

Contents

Resources