FastMCP CLI

A Python framework and CLI for MCP: write servers as plain functions, test tools and install servers into Claude Code, Cursor and other clients

  • 28,234 ★ on the repository
  • Last commit
  • Apache-2.0
CLIEditors’ pick

Extended access

Why this level

  • Runs servers and code from Python files
  • Edits client MCP configs on install
All reasons and checks

prefecthq/fastmcp

Install

Manual install

uv add fastmcp

The fastmcp package is also on PyPI for pip.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Runs servers and code from Python files
  • Edits client MCP configs on install

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 Code

Limitations

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.

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.

Discussion

No questions or reviews yet.

CLI tools

A universal MCP CLI client from Apify: persistent sessions, OAuth, JSON output for scripts and shell access to any MCP server for agents

CLIBroad access1.1KRepository stars

An MCP bridge: a single run_python tool runs code in a container and calls your MCP servers

MCP serverBroad access340Repository stars

A terminal agent and Python framework with MCP, SKILL.md and ACP support for coding, building and evaluating your own agents

CLIBroad access4KRepository stars

A CLI for any MCP server: list and call tools, resources and prompts, run mock and proxy modes, guard access and manage agent configs

CLIExtended access1.6KRepository stars

A CLI that turns any MCP server, OpenAPI spec or GraphQL endpoint into commands at runtime, with no codegen

CLIBroad access2.4KRepository stars

A Python framework and CLI for building MCP servers and tools with built-in OAuth authorization

CLIExtended access1.1KRepository stars

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.

README badge

Report a problem

Foxx AIFastMCP
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.