FastMCP logo

FastMCP

Python framework for building MCP servers, clients, and interactive applications with automatic schemas and protocol handling.

Install FastMCP

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for FastMCP, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

FastMCP provides a Python framework for creating MCP servers, clients, and interactive apps. Python functions can become MCP tools, with schemas, validation, and documentation generated from their definitions. Its client support connects to local or remote MCP servers while handling transport negotiation, authentication, and protocol lifecycles. Reach for FastMCP when building MCP applications that need more structure than a low-level SDK.

Use cases

  • Build MCP servers from Python functions
  • Expose tools, resources, and prompts to AI clients
  • Connect applications to local or remote MCP servers
  • Create interactive tool interfaces in conversations

Key features

  • Python-based MCP server framework
  • Automatic schemas and input validation
  • Server support for tools, resources, and prompts
  • Client support for local and remote MCP servers
  • Interactive app interfaces
  • Transport and protocol lifecycle handling

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

26/26 checks healthy over the last 79d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars28kStargazers on the source repository.
Last commitTodayMost recent push to the default branch.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How FastMCP works

What FastMCP does

FastMCP is a Python framework for building applications around the Model Context Protocol. It covers three related areas: servers that expose tools, resources, and prompts; clients that connect to MCP servers; and apps that render interactive tool interfaces inside a conversation.

A server can wrap ordinary Python functions as MCP-compliant tools. Function signatures and docstrings provide the basis for generated schemas, input validation, and tool documentation. This lets application code remain focused on its underlying logic while FastMCP manages the MCP-specific layer.

The project also has an official TypeScript counterpart, @prefecthq/fastmcp-ts, for teams building MCP applications in TypeScript.

How it works

A minimal Python application creates a FastMCP instance, decorates a function with @mcp.tool, and starts the server with mcp.run():

server.ts
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()

The decorated function becomes an MCP tool. FastMCP derives the tool schema and documentation from the Python definition, then handles the protocol details needed to expose it to an MCP client.

For client applications, a server URL is enough to begin a connection. FastMCP manages transport negotiation, authentication, and the protocol lifecycle for connections to local or remote servers.

Setup and configuration

Install the Python package with uv:

bash
uv add fastmcp

Create a Python module containing a FastMCP instance and one or more decorated functions, then run the module so that mcp.run() starts the server. The project publishes installation, quickstart, API, upgrade, and advanced-pattern documentation at gofastmcp.com.

FastMCP is intended for Python projects. A separate package, @prefecthq/fastmcp-ts, provides the corresponding TypeScript implementation.

Tools and capabilities

  • Expose Python functions as MCP tools.
  • Generate tool schemas from Python function definitions.
  • Validate tool inputs automatically.
  • Derive tool documentation from function docstrings.
  • Publish MCP resources and prompts from servers.
  • Connect programmatically to local or remote MCP servers.
  • Build interactive app interfaces rendered in conversations.
  • Handle transport negotiation, authentication, and protocol lifecycles for clients.

Limitations and notes

FastMCP is an application framework rather than a directory of ready-made business integrations. The developer supplies the Python logic that the server exposes through MCP.

The project separates application-layer concerns from deployment and organizational governance. Prefect Horizon is described as a separate gateway for deploying, discovering, securing, and governing MCP servers and tools across teams; it is not required to build a FastMCP application.

The repository also provides documentation in llms.txt and llms-full.txt formats, which can help coding agents navigate the project documentation.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about FastMCP

FastMCP is an MCP server that connects Python functions and application logic to MCP-compatible AI clients through servers, clients, and interactive apps. Its main tools are exposed Python functions, resources, and prompts, while its client APIs connect to local or remote MCP servers and manage MCP protocol details.

Install FastMCP in a Python project with `uv add fastmcp`. Then create a `FastMCP` instance, decorate Python functions with `@mcp.tool`, and call `mcp.run()` when the module is executed.

Decorate the function with `@mcp.tool` inside a FastMCP application. FastMCP uses the function signature and docstring to generate the tool schema, validation, and documentation.

Yes. FastMCP clients connect to local or remote MCP servers using a server URL, while FastMCP handles transport negotiation, authentication, and the protocol lifecycle.

Yes. FastMCP apps provide interactive UIs for tools that render directly inside a conversation.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewFastMCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/fastmcp?style=directory)](https://allmcps.com/mcp/fastmcp)
HTML Embed
<a href="https://allmcps.com/mcp/fastmcp"><img src="https://allmcps.com/api/badge/fastmcp?style=directory" alt="FastMCP on AllMCPs" /></a>