FastMCP

Agent frameworks and SDKs

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

Your AI app calls the FastMCP MCP server, which does the agent frameworks and SDKs work and sends the result back to the chat.

About FastMCP

FastMCP is a community MCP server from PrefectHQ, filed in our directory under agent frameworks and sdks. The fast, Pythonic way to build MCP servers and clients.

At a glance

Publisher
PrefectHQ (community)
Runs
See the README for setup
Written in
Python
License
Apache-2.0
GitHub stars
28,856

How to set up FastMCP

  1. Follow the install steps in the FastMCP README; it is written in Python, so have that toolchain ready.
  2. Check the FastMCP README for keys or settings; the registry lists none that FastMCP requires.
  3. Add FastMCP to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the FastMCP tools to confirm the connection.
  5. Run one read-only task with FastMCP first, and keep your app asking before each tool call until the results look right.

FastMCP compared with similar servers

  • MCP Python SDK by modelcontextprotocol has fewer GitHub stars than FastMCP (25k against 28.9k); MCP Python SDK is official while FastMCP is a community server, and both run locally.
  • GitHub by github has more GitHub stars than FastMCP (34.9k against 28.9k); GitHub is official while FastMCP is a community server, and GitHub runs as a remote server and FastMCP runs on your own machine.
  • Casdoor by casdoor has fewer GitHub stars than FastMCP (15k against 28.9k); both are community servers, and both run locally.

Before you connect FastMCP

  • Give FastMCP its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each FastMCP tool call until you trust what it does with them.
  • Treat text that FastMCP fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for FastMCP on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for FastMCP

How marketing and sales teams put FastMCP to work, by company size. Pick the size closest to yours and start FastMCP on one use case.

Small business

  • A small business with a developer can use FastMCP to build one focused agent, such as lead follow-up, without a big platform.
  • Technical founders can prototype marketing agents with FastMCP and keep what works as a small, owned tool.
  • FastMCP runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineering teams can use FastMCP to build agents that combine CRM, analytics and content tools behind one workflow.
  • Marketing ops can standardize on FastMCP so every agent they ship has the same logging, approvals and error handling.
  • Start FastMCP on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can build on FastMCP with their own identity, policy and evaluation layers, so agents meet the same bar as other software.
  • Platform teams can use FastMCP to give business units a governed way to ship agents without each one starting from scratch.
  • FastMCP is a community server, so have security review the code and pin a version before FastMCP touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

FastMCP README

From PrefectHQ/fastmcp on GitHub, shared under its Apache-2.0 license. Images are left out; the original has them.

README.md

FastMCP 🚀

Move fast and make things.

Made with 💙 by Prefect

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:

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:

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.

Questions about FastMCP

What is the FastMCP MCP server?

The fast, Pythonic way to build MCP servers and clients. FastMCP is maintained by PrefectHQ on GitHub at PrefectHQ/fastmcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the FastMCP MCP server?

FastMCP doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (PrefectHQ/fastmcp). Like most servers, FastMCP ends with a command or URL you paste into your AI app's MCP config.

Does FastMCP need an API key?

The registry lists no required keys for FastMCP. Check the FastMCP README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is FastMCP an official MCP server?

No. FastMCP is a community server maintained by PrefectHQ. Community servers can be excellent; read the code and the open issues before you give FastMCP access to company data.

What license is FastMCP under?

FastMCP is released under the Apache-2.0 license, according to its GitHub repository. The license covers the code of FastMCP; the service it connects to has its own terms.