FastMCP is a Python application framework for the Model Context Protocol (MCP), the standard that connects large language models to tools and data. It covers the three sides of an MCP application: servers that expose tools, resources, and prompts; clients that connect to any MCP server; and apps that render interactive UIs for tools inside the conversation.
On the server side, you decorate an ordinary Python function with @mcp.tool and FastMCP generates the schema, validation, and documentation from the function signature. On the client side, you connect with a URL and the library handles transport negotiation, authentication, and the protocol lifecycle.
FastMCP 1.0 was incorporated into the official MCP Python SDK in 2024; the standalone project continues as the actively developed line, with upgrade guides from FastMCP 2 and 3 and from the low-level SDK. A TypeScript counterpart, FastMCP for TypeScript, is available. Prefect Horizon, a separate product from the same team, adds an enterprise gateway layer for deploying, discovering, and governing MCP servers across teams.
Features
- Servers: wrap Python functions as MCP-compliant tools, resources, and prompts with auto-generated schemas
- Clients: connect to local or remote MCP servers, programmatically or from the CLI, with full protocol support
- Apps: attach interactive UIs to tools that render directly in the chat conversation
- Transport and auth handling: transport negotiation, authentication, and protocol lifecycle are managed by the framework
- Upgrade paths: guides for moving from FastMCP 2 and 3, MCP SDK v1 and v2, and the low-level SDK
- TypeScript edition: @prefecthq/fastmcp-ts follows the same server, client, and app model
- LLM-readable docs: documentation is published in llms.txt and llms-full.txt formats
