FastMCP
A Python framework and CLI for MCP: write servers as plain functions, test tools and install servers into Claude Code, Cursor and other clients
Install
uv add fastmcpThe fastmcp package is also on PyPI for pip.
This is third-party code. Review the repository files before installing.
What it does
FastMCP turns Python functions into MCP tools, resources and prompts, generating schema, validation and docs from the signature and docstring. The client side connects to any MCP server by URL or command and handles transport and auth. The fastmcp CLI runs a server from a file or config, lists its tools and calls them from the terminal. fastmcp install registers a server with Claude Desktop, Claude Code, Cursor, Gemini CLI and Goose along with its dependencies.
Who it is for. For Python developers building their own MCP servers or clients for agents.
Good fit when
- You need to expose an internal API or database to agents through your own MCP server
- You want to test an MCP server from the terminal without a client
- You need to install your server into Claude Code or Cursor with dependencies
Not a fit when
- You need a ready MCP server rather than a tool to build one
- Your project is TypeScript, for which the authors ship a separate package
Example request
Build a FastMCP server with an order lookup tool for our database and install it into Claude CodeLimitations
This is a developer tool and needs Python code to be useful. Python is required and uv is recommended. fastmcp login and deployment tie into the paid Prefect Horizon cloud, while core features do not depend on it. Major versions come with separate migration guides.
How to disable. Remove the dependency with uv remove fastmcp and delete registered servers from the clients' MCP configs.
Security check
- Runs servers and code from Python files
- Edits client MCP configs on install
README in short
The README shows a minimal server in a few lines and describes three parts: servers, clients and apps with interactive UIs. uv is the recommended install, with migration guides from older versions and the official SDK. Docs live at gofastmcp.com, including llms.txt format. The paid Prefect Horizon gateway is also mentioned. Apache-2.0 licensed.
FAQ
How is FastMCP different from the official Python SDK?
FastMCP 1.0 was merged into the official SDK, while the standalone project keeps evolving with clients, UI apps and a CLI.
Can I call tools on someone else's server?
Yes, fastmcp list and fastmcp call work with a URL, a Python file, a config or a stdio command.
Related
Open-source personal AI assistant on your own machine: answers in Telegram, Slack, Discord and WhatsApp, extended with skills and plugins
A self-improving agent from Nous Research with a TUI, messaging gateway, cron jobs and skills it writes itself
An open source coding agent for the terminal and desktop with build and plan modes
Anthropic's coding agent for the terminal, IDE and GitHub: understands your codebase, runs tasks and handles git