What it does
A Python framework for building MCP servers, clients and interactive apps. You write ordinary Python functions and FastMCP generates the tool schemas, validation and docs. FastMCP 1.0 was folded into the official MCP Python SDK in 2024; this is the actively maintained standalone project. Apache-2.0.
Who it's for
Python developers who want to turn their own functions or APIs into an MCP server quickly.
How to set it up
Add it to your project with uv:
bashuv add fastmcpCreate server.py:
textfrom 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()Run it with python server.py, then add it to your MCP client. A TypeScript counterpart is available as @prefecthq/fastmcp-ts.
Check the official FastMCP docs for the latest steps.
Example prompts
prompt
Turn the functions in utils/weather.py into a FastMCP server with one tool each.prompt
Add a FastMCP resource that exposes our README as context.prompt
Write a FastMCP client script that connects to my server and lists its tools.Demo
Demo coming soon
A short walkthrough of FastMCP in action.