FastMCP

The fast, Pythonic framework for building Model Context Protocol servers, clients, and apps

Framework
PyPI
v4.1.3
28,186 stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
88 /100 Excellent
Development Activity 100
Maintenance 100
Community 68
Maturity 44
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
85 /100 Excellent
Architecture 84
Code Quality 85
Innovation 88
Learning Curve 82

FastMCP is the standard Python framework for the Model Context Protocol (MCP), the open protocol that connects LLMs to external tools and data. It turns a plain Python function into an MCP-compliant tool with a single decorator, auto-generating schema, validation, and documentation, and provides matching abstractions for MCP clients and interactive in-conversation apps.

Originally created by Jeremiah Lowin, FastMCP 1.0 was incorporated into the official MCP Python SDK in 2024; the actively maintained standalone project (now backed by Prefect) has since grown into the dominant MCP framework, reportedly downloaded a million times a day and powering roughly 70% of MCP servers across all languages, with a companion commercial gateway (Prefect Horizon) for production deployment.

What You Get

  • @mcp.tool / @mcp.resource / @mcp.prompt decorators that turn plain Python functions into MCP-compliant capabilities with auto-generated schemas
  • A full-featured MCP client for connecting to any server (local subprocess, remote HTTP/SSE) programmatically or via CLI
  • Built-in auth provider integrations and transport handling so servers don’t hand-roll protocol plumbing
  • An Apps layer for rendering interactive UI directly inside an LLM conversation, beyond plain text tool results
  • A CLI (fastmcp run, fastmcp install, fastmcp dev) for running, installing, and debugging MCP servers

Common Use Cases

  • Exposing internal APIs, databases, or scripts as MCP tools for Claude, ChatGPT, or other MCP-compatible LLM clients
  • Building MCP servers that need production concerns like auth, structured error handling, and multiple transports (stdio, HTTP, SSE)
  • Writing MCP clients to programmatically call tools on existing MCP servers as part of an agent pipeline
  • Prototyping agent tools quickly, since a decorated Python function is enough to get a working MCP server

Under The Hood

Architecture - The package (now organized under fastmcp_slim/fastmcp, ~75k lines of Python) is split into clear subsystems: server/ for the core FastMCP server object and tool/resource/prompt registration, client/ for the MCP client implementation, cli/ for the fastmcp command (run.py, install/, discovery.py, generate.py, auth.py), apps/ for the interactive-UI layer, contrib/ for community extensions, and experimental/ for in-progress features; mcp_config.py centralizes server configuration and telemetry.py handles opt-in usage metrics. Tech Stack - Built on the official low-level MCP Python SDK, targeting Python 3.10+, packaged with hatchling and uv-dynamic-versioning, dependency-managed via uv.lock; the repo also ships a separate fastmcp_remote package for remote-server tooling. Code Quality - Test coverage is extensive and organized by subsystem (tests/server, tests/client, tests/tools, tests/resources, tests/prompts, tests/cli, tests/conformance, tests/integration_tests, tests/telemetry), with a dedicated tests/deprecated suite tracking backward-compatibility guarantees across the 1.0→3.x evolution — a strong signal of discipline for a fast-moving project with 100+ releases. API Design - The signature design goal is near-zero boilerplate: from fastmcp import FastMCP; mcp = FastMCP(...) plus a @mcp.tool decorator is enough to produce a working server, with schema/validation/docs generated automatically from type hints and docstrings — explicitly built to make MCP best practices the path of least resistance rather than something developers must assemble themselves.

Used by 14 apps in this directory

Python
97%
MIT

Stealth Browser MCP

Developer Tools · Mcp

3,266

An MCP server giving AI agents real, undetectable browser automation — built on nodriver and Chrome DevTools Protocol to navigate sites protected by Cloudflare and other anti-bot systems for automation and testing workflows.

View details
74
Repo Health
66
Technical
73
Dependency
Built with
Python 97%
Updated 6 days ago
Go
75%
AGPL 3.0

Teleport

Authentication · Security

21,016

Zero-trust infrastructure access platform that replaces credentials and VPNs with short-lived certificates, SSO, and identity-aware proxies for SSH, Kubernetes, databases, RDP, and AI agents.

View details
94
Repo Health
81
Technical
68
Dependency
Built with
Go 75%
TypeScript 16%
Updated 1 weeks ago
Python
68%
AGPL 3.0

Tracecat

AI Agents · Automation · Security

3,860

Open-source agentic security automation platform that runs AI agents and durable workflows at scale with sandboxed execution.

View details
89
Repo Health
88
Technical
66
Dependency
Built with
Python 68%
TypeScript 30%
Updated 6 days ago
Python
73%
Apache 2.0

Unsloth

AI Assistants · AI Development

78,493

Run and fine-tune LLMs, diffusion, audio and embedding models on your own hardware, from a native desktop app, a browser UI, or a Python library.

View details
89
Repo Health
83
Technical
70
Dependency
Built with
Python 73%
TypeScript 22%
Updated 6 days ago
Python
46%
MIT

Voicebox

AI Development · Productivity · Voice AI

58,409

Clone voices, dictate anywhere, and give AI agents your voice — all locally.

View details
84
Repo Health
76
Technical
67
Dependency
Built with
Python 46%
TypeScript 42%
Updated 3 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers