# FastMCP [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/jlowin/fastmcp  
**GitHub Stars:** 28217  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/fastmcp

## Description
A high-level framework for building MCP servers in Python

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

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

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

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.

_Full upstream README: https://allmcps.com/mcp/fastmcp/readme_

