Home / Directory / FastMCP

FastMCP: the Python (and TypeScript) way to build an MCP server

MCPPYTHON

By Jeremiah Lowin / Prefect · License: Apache-2.0

FastMCP is how a lot of Python MCP servers get written: decorate a function, run the module, the schema shows up. The well-known GitHub URL redirects to PrefectHQ/fastmcp.

Open FastMCP

What it does

You declare tools, resources and prompts in Python. The framework handles schema generation, validation, transports and a client that can talk to other servers. There is a TypeScript counterpart under @prefecthq/fastmcp-ts.

FastMCP 1.0 was incorporated into the official MCP Python SDK. The standalone project continues and is the one this page links. The README's adoption claims are theirs; we are not repeating download figures.

This is a library for people building MCP, not a server you add to Cursor to get Stripe or GitHub.

Who it is for

Python developers exposing internal tools to Claude, Cursor or any MCP client. Also useful if you want a typed client to someone else's server.

If you only need to consume Stripe or Supabase, use those official servers. You do not need FastMCP for that.

Our take

For Python, this is the default framework in practice. The decorator API is the reason people reach for it instead of the lower-level SDK.

Limits: an MCP server is production software. Auth, authorization, prompt injection via tool results, and least privilege are on you. FastMCP will not write your AGENTS.md or your pytest layout.

Pin a version. "The fast way" still ships breaking changes like any active project. Read the changelog before you upgrade a server that already has clients in the wild.

Compared with AgentKit Drawer

Our Python/FastAPI kit is about the API you ship to users: ownership checks, Alembic, Pydantic v2, no blocking I/O in async def. FastMCP is about the API you ship to an agent.

If you are building an MCP server inside a FastAPI shop, use both: the kit for the HTTP service, FastMCP for the agent surface. Different processes, different threat models.

Related AgentKit pack

AGENTS.md, CLAUDE.md and scoped Cursor rules for FastAPI + SQLAlchemy 2 + Pydantic v2 + Alembic + pytest: ownership checks, migrations and testing.

One-time payment · instant download · 14-day refund. We do not claim this third-party kit is affiliated with AgentKit Drawer.

FREE · 1 FILE · WORKS IN EVERY AGENT

Try the free Starter AGENTS.md first

A 40-line rules file that makes Cursor, Claude Code, Codex and Windsurf plan first, keep diffs small and run your tests before saying "done". It works alongside anything in this directory. We email it to you instantly.