# Fastmcp Server

Build, extend, or review MCP servers with Python FastMCP, using documentation matched...

- Repository: https://github.com/PrefectHQ/fastmcp (28267 stars)
- Category: AI and agents
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add PrefectHQ/fastmcp --skill fastmcp-server -g -a claude-code -y`
Codex: `npx skills add PrefectHQ/fastmcp --skill fastmcp-server -g -a codex -y`
Cursor: `npx skills add PrefectHQ/fastmcp --skill fastmcp-server -g -a cursor -y`
Gemini CLI: `npx skills add PrefectHQ/fastmcp --skill fastmcp-server -g -a gemini-cli -y`

## Description

Build, extend, or review MCP servers with Python FastMCP, using documentation matched to the project's version.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Authoring MCP servers with FastMCP

## Find the current API

Check the project's installed FastMCP version and dependency constraints.
Fetch [the documentation index](https://gofastmcp.com/llms.txt) and read the
relevant pages for that version. The index includes versioned documentation;
select `/v3/` pages for FastMCP 3 and unversioned pages for FastMCP 4. Read
individual pages through their `.md` URLs instead of loading `llms-full.txt`.
For APIs newer than the installed release, check that release's source or
signatures. Preserve the project's dependency constraints unless an upgrade is
part of the request. For a new project, check the current stable release before
choosing a dependency.

Use the standalone `fastmcp` package. Its API differs from
`mcp.server.fastmcp` in the Python MCP SDK.

## Author the server

Choose the MCP interface to suit what the server exposes: tools for callable
operations, resources for addressable content, and prompts for reusable message
templates. FastMCP derives tool schemas from Python annotations and descriptions;
use `Literal` or enums for finite choices and `Field` descriptions for parameter
semantics. SDK wrappers need to preserve signatures and docstrings, for example
with `functools.wraps`, or discovery loses that information. Inspect the schema
the client receives, especially after transforms or custom discovery rendering:
requiredness, enum values, and nested fields can disappear from a summary.

Let the intended client tasks guide tool boundaries, descriptions, and result
shape. Give clients enough context to use results and recover from errors.
The right granularity depends on the service; generated API tools, custom tools,
and compositions can all be appropriate.

The rest: https://github.com/PrefectHQ/fastmcp/blob/HEAD/docs/.mintlify/skills/fastmcp-server/SKILL.md
