FastMCP
Use case: MCP
Pythonic high-level framework for MCP servers and clients with auth, proxying and composition.
FastMCP is a Python framework for building Model Context Protocol applications. Its documentation describes three parts. Servers expose Python functions, data and instructions as MCP tools, resources and prompts. Clients connect to local or remote MCP servers from Python or the command line. Apps give tools interactive interfaces that render inside the conversation. You declare a function with a decorator, and FastMCP generates the schema, validates inputs and outputs, and handles transport and authentication. It is made by Prefect, and FastMCP 1.0 was incorporated into the official MCP Python SDK in 2024.
Pick FastMCP when you want to expose your own code or an internal API to agents through MCP without writing protocol plumbing. A server starts as ordinary Python: you declare a function and FastMCP builds the MCP tool around it. It also fits when you need a client to talk to existing MCP servers, since the same package covers both directions. If you work in TypeScript, the same team maintains FastMCP for TypeScript, which you install as @prefecthq/fastmcp-ts. The documentation also publishes llms.txt files and a docs MCP server so coding agents can look up its API.
FastMCP is released under the Apache License 2.0 and installs with uv add fastmcp. The library is free to use. Prefect also offers Prefect Horizon, an enterprise MCP gateway for deploying servers from GitHub, managing a private registry, and adding SSO, role-based access and audit logs. The documentation we read does not list Horizon pricing, so contact Prefect or check its site for current terms. The docs also note that the main branch documentation may describe features that have not reached a stable release yet.
Like FastMCP? Find tools like it on X.
Follow @AgentstackDaily, plus the free Top 25 Agent Tools checklist.
At a glance
- Category
- MCP
- Best for
- Best MCP servers and tools in 2026 · MCP use cases
- Official site
- github.com
- Link checked
- November 4, 2026
- Data
- JSON
How FastMCP fits an agent workflow
In an agent stack, FastMCP belongs to the MCP category, which covers the tool-access layer, where an agent reaches external data and actions through the Model Context Protocol. You will also find it in our curated list: Best MCP servers and tools in 2026. Other MCP entries worth a look alongside it include MCP Python SDK, MCP Inspector and GitHub MCP Server.
FastMCP alternatives
- Model Context Protocol spec — The open standard for connecting LLM apps to tools, resources and prompts
- MCP reference servers — Official collection of reference servers (filesystem, git, fetch, memory) to learn from or
- MCP TypeScript SDK — Official SDK for building MCP servers and clients in TypeScript with stdio and streamable
- MCP Python SDK — Official Python SDK including FastMCP-style decorators for quickly exposing tools.
- MCP Inspector — Developer tool to connect to any MCP server and interactively test tools, resources and pr
- GitHub MCP Server — GitHub's official server exposing repos, issues, PRs and Actions to agents.
All MCP tools → · Best MCP servers and tools in 2026
Related tools
- Playwright MCP
Microsoft's server that lets agents drive a browser via accessibility snapshots instead of screenshots.
- MCP Registry
Official community registry for discovering published MCP servers.
- Smithery
Hub for finding, hosting and installing MCP servers into clients.
- Context7
MCP server that injects up-to-date, version-specific library docs into coding agents' context.
- Cloudflare remote MCP servers
Guide to building and deploying remote MCP servers with OAuth on Cloudflare Workers.
FAQ
What is FastMCP used for?
FastMCP is used to build MCP servers, clients and interactive apps in Python. It turns ordinary Python functions into MCP tools with generated schemas, validation, transport and authentication handled for you.
How do I install FastMCP?
Run uv add fastmcp. The documentation has an installation guide covering verification and upgrading, and a quickstart that builds a first server.
Is FastMCP open source?
Yes. The repository is licensed under Apache 2.0. Prefect Horizon, a separate enterprise gateway from the same team, is a different product.
Is there a TypeScript version?
Yes. FastMCP for TypeScript is described as the official counterpart, built and maintained by the same team, and is installed with npm install @prefecthq/fastmcp-ts.
Get new agent tools and tips as they're added
Follow @AgentstackDaily on X for new tools and copy-paste tips. Free.