FastMCP
by prefecthq
The fast, Pythonic framework for building production-ready MCP servers and clients with automatic schema generation.
What it does
FastMCP is a high-level framework designed to simplify the creation of Model Context Protocol (MCP) servers and clients. It abstracts the complexities of the protocol, allowing developers to turn standard Python functions into MCP tools, resources, and prompts with minimal boilerplate.
Tools
@mcp.tool: Decorator that automatically converts a Python function into an MCP tool with generated schemas and validation.- Client Connection: Built-in utilities to connect to remote or local MCP servers with automated transport negotiation.
- App Rendering: Support for creating interactive UIs that render directly within the LLM conversation.
Installation
Install using uv:
uv pip install fastmcp
To run a basic server:
from fastmcp import FastMCP
mcp = FastMCP("Demo")
@mcp.tool
def add(a: int, b: int) -> int:
return a + b
if __name__ == "__main__":
mcp.run()
Supported hosts
- Claude Desktop
- VS Code Copilot
- Cursor
- Gemini-CLI
Quick install
uv pip install fastmcpInformation
- Pricing
- free
- Published
- 4/14/2026
- stars






