Skip to content

FastMCP: install, tools and limits

Better Design

Direct answer

FastMCP is a Python framework for building MCP servers, clients and interactive apps. It runs over stdio by default, or Streamable HTTP when you call run with transport="http", needs no sign-in unless you add server auth, and installs your server into Claude Code or Cursor with one command.

A hand-drawn terminal that connects a coding agent to FastMCP, with the server's name and tool count written beside it.

What FastMCP does

FastMCP is a Python framework for building MCP servers, clients and interactive apps. You declare a tool as an ordinary Python function, and FastMCP generates the schema, validation and documentation.

Prefect maintains it. The latest release on PyPI is fastmcp 4.1.8, published November 10, 2026. It is licensed under Apache-2.0.

How a coding agent uses FastMCP

The agent asks, FastMCP acts, and the result comes back into the session.

A hand-drawn three-step flow from the coding agent to FastMCP and back: Expose our pricing function as a tool, Wraps the Python function and generates its schema, A server that Claude Code or Cursor can call.
  1. The agent asks: Expose our pricing function as a tool
  2. FastMCP acts: Wraps the Python function and generates its schema
  3. The result comes back: A server that Claude Code or Cursor can call

Install FastMCP in the framework

the framework
uv add fastmcp   (or: pip install fastmcp)
fastmcp version

Install FastMCP in a minimal server (server.py)

a minimal server (server.py)
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()

Install FastMCP in Claude Code

terminal
fastmcp install claude-code server.py

Install FastMCP in Cursor

terminal
fastmcp install cursor server.py

What FastMCP covers

FastMCP's own documentation lists these, read on November 12, 2026.

  • Servers: tools, resources and prompts
  • Apps: interactive UIs rendered in the conversation (FastMCPApp, Prefab interactive tools, generative UI, custom HTML apps)
  • Clients: connect to any MCP server, local or remote
  • Transports: STDIO, Streamable HTTP, SSE (legacy)
  • Authentication and authorization
  • Background tasks (fastmcp[tasks] extra)
  • OpenAPI and FastAPI integration
  • fastmcp.json project configuration
  • fastmcp CLI (run, install, version)

Settings worth knowing in FastMCP

mcp.run(transport="http", host="127.0.0.1", port=8000)
What it changes

Serves the MCP server over Streamable HTTP instead of stdio.

Server

FastMCP

fastmcp install claude-code server.py --with pandas --with requests
What it changes

Installs the server in Claude Code with extra Python packages.

Server

FastMCP

--with-requirements requirements.txt
What it changes

Installs the server's dependencies from a requirements file.

Server

FastMCP

--with-editable ./my-local-package
What it changes

Installs a local package in editable mode next to the server.

Server

FastMCP

fastmcp install cursor server.py --workspace .
What it changes

Installs the server for one Cursor workspace instead of globally.

Server

FastMCP

Sign-in, limits and caveats for FastMCP

Sign-in: None by default. Optional server auth from API keys and bearer token verification up to full OAuth 2.1, with remote OAuth, OAuth proxy, OIDC proxy and provider integrations (Auth0, WorkOS AuthKit, Google, GitHub, Azure and others).

Limits and price: FastMCP is open source under Apache-2.0 and free to use. Its documentation states no usage limit. Prefect also sells a separate hosted product, and the README gives no price for it.

  • The fastmcp install integrations target local STDIO servers; for remote HTTP or SSE servers the docs say to use the client's native configuration.
  • FastMCP depends on Cyclopts; Cyclopts v4 pulls in docutils, whose licensing may trigger compliance reviews. The docs suggest cyclopts>=5.0.0a1 as a workaround.
  • Most FastMCP 3 servers run on 4 without changes, but there are breaking changes; see the Upgrading from FastMCP 3 guide.
  • For TypeScript, Prefect's official counterpart is @prefecthq/fastmcp-ts. The npm package named fastmcp is a separate community project.

Use FastMCP for interface work

A coding agent can wrap a product's own functions as MCP tools in a few lines, and FastMCP Apps let those tools return interactive UIs (forms, tables, charts, approvals) rendered inside the chat.

Steal this workflow

Run this guide in your own assistant. The prompt carries the guide link and the workflow summary, so the assistant can adapt it to your project.

Read the guide "FastMCP: install, tools and limits" at https://better-design.com/blog/fastmcp and help me apply it to my project.

FastMCP is a Python framework for building MCP servers, clients and interactive apps. It runs over stdio by default, or Streamable HTTP when you call run with transport="http", needs no sign-in unless you add server auth, and installs your server into Claude Code or Cursor with one command.

Start by asking what I am building and which tools I use. Then walk me through the workflow step by step, adapted to my answers.

Claude and ChatGPT open with the prompt filled in. Gemini copies the prompt to your clipboard first, so paste it when the app opens.

Questions

What does FastMCP do?

FastMCP is a Python framework for building MCP servers, clients and interactive apps. You declare a tool as an ordinary Python function, and FastMCP generates the schema, validation and documentation.

Does FastMCP need an API key or sign-in?

None by default. Optional server auth from API keys and bearer token verification up to full OAuth 2.1, with remote OAuth, OAuth proxy, OIDC proxy and provider integrations (Auth0, WorkOS AuthKit, Google, GitHub, Azure and others).

Is FastMCP free?

FastMCP is open source under Apache-2.0 and free to use. Its documentation states no usage limit. Prefect also sells a separate hosted product, and the README gives no price for it.

Which coding agents can use FastMCP?

Its documentation shows a setup for Claude Code, Cursor. Any client that speaks MCP over stdio by default, or Streamable HTTP when you call run with transport="http" can connect.

Where these FastMCP facts come from

Each fact on this page comes from FastMCP's own repository, documentation or package registry, read on November 12, 2026.

Add design rules next to it

FastMCP gives the agent its capabilities. It does not tell the agent what a good screen looks like. Better Design adds that part: a design system, interface principles and review rules that the agent calls while it builds.