Skip to content
← Tools / Skills
ToolPrefect/10 trustVerified
FastMCP logo

FastMCP

The fast, Pythonic way to build MCP servers and clients

Visit official site →

About

FastMCP is the standard Python framework for building Model Context Protocol (MCP) applications — servers, clients, and interactive apps. A plain Python function decorated with @mcp.tool becomes an MCP tool with auto-generated JSON Schema, validation, and documentation; transports (stdio, Streamable HTTP), auth, and protocol lifecycle are handled by the framework.

Verified live 2026-10-13: the project now lives at PrefectHQ/fastmcp (moved from jlowin/fastmcp at v3.0.0, Feb 2026; the old URL redirects), maintained by the Prefect team, with 28,052 stars, Apache-2.0 license, and docs at gofastmcp.com. FastMCP 1.0 was incorporated into the official Anthropic MCP Python SDK in 2024 — independently corroborated by third-party architecture decision records (serpeter/diatagma ADR-001 documents choosing FastMCP 3.x over the official SDK). Three pillars: Servers (tools, resources, prompts), Clients (any MCP server, programmatic or CLI), and Apps (interactive UIs rendered inside the conversation). Notable production features: OAuth/OIDC auth, server composition and proxying, OpenAPI/FastAPI import, middleware, lifespan management, elicitation, sampling, OpenTelemetry, and a CLI that installs servers into Claude Desktop/Code, Cursor, ChatGPT, Gemini CLI, and Goose.

What it can do

  • Decorator API: @mcp.tool / @mcp.resource / @mcp.prompt turn Python functions into MCP capabilities with auto-generated schemas, validation, and docs.
  • Servers: expose tools, resources, and prompts; transports stdio, Streamable HTTP (SSE deprecated).
  • Clients: connect to any MCP server (local or remote) with transport negotiation, auth, and lifecycle managed.
  • Apps: tools can return interactive UIs (forms, tables, charts) rendered inside the host conversation.
  • Auth: first-class OAuth/OIDC plus enterprise providers (Google, GitHub, WorkOS, Azure, Auth0).
  • Advanced patterns: server composition, proxying, OpenAPI/FastAPI import (docs note curated servers outperform auto-converted ones — best for bootstrapping).
  • Production tooling: middleware, lifespan management, elicitation, sampling, progress reporting, OpenTelemetry.
  • CLI: run, inspect, and install servers into Claude Desktop/Code, Cursor, ChatGPT, Gemini CLI, Goose.
  • TypeScript counterpart: @prefecthq/fastmcp-ts maintained by the same team.

Setup

  1. Add to your project: uv add fastmcp (or pip install fastmcp), Python 3.10+.
  2. Write a server — minimal example:

```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()

```

  1. Run it: fastmcp run server.py (stdio for local clients, or Streamable HTTP for remote).
  2. Install into a client: fastmcp install server.py wires it into Claude Desktop/Code, Cursor, etc.
  3. Full walkthrough: https://gofastmcp.com/getting-started/quickstart (upgrade guides exist for v2 → v3 and SDK v1 → v2).

Prerequisites

Python 3.10 or higher. A package manager (uv recommended, pip works). For remote servers with auth: an OAuth/OIDC provider or API-key setup per the deployment guide. Docs are LLM-friendly (llms.txt / llms-full.txt and an MCP server at gofastmcp.com/mcp) if an agent is doing the integration.

Use cases

mcpagentstool-useintegrations

Works with

Claude CodeCursorCodexWindsurfChatGPTGeneric APIAny agent (.md)

Trust score — 9/10

/10 trustVerified

Scored 9/10 (verified tier, metrics-v1). Evidence: 28,052 GitHub stars (log-scaled vs catalog peers); blended with ~53,693,015 monthly package downloads; last push 0d ago; 67 releases/12mo; 470 open issues. Manual review: repo moved jlowin/fastmcp → PrefectHQ/fastmcp (Feb 2026); Horizon upsell + version churn; '70% of MCP servers' claim unverified. License: Apache-2.0.

★ 28,052 GitHub stars

How the trust score is built

Full methodology →
Adoption · stars/downloads, log-scaled vs peers
8.8/10
Maintenance · recency, releases, issue load
9.3/10
Openness · license + docs
10.0/10
Manual review · sanity read + red-flag check
9.0/10
  • · 28,052 GitHub stars (log-scaled vs catalog peers)
  • · blended with ~53,693,015 monthly package downloads
  • · last push 0d ago; 67 releases/12mo; 470 open issues
  • · manual review: repo moved jlowin/fastmcp → PrefectHQ/fastmcp (Feb 2026); Horizon upsell + version churn; '70% of MCP servers' claim unverified

Sources

Every fact above was checked against these sources. Where a claim comes from the provider and couldn't be independently verified, the text says so.