fastmcp-server

fastmcp-server is a skill for Claude Code, Codex from PrefectHQ/fastmcp. It costs 27 tokens per session (1,099 once invoked), scanned A, original, Apache-2.0.

A guide for building, extending, or reviewing MCP servers with Python FastMCP. MCP is a standard way for an AI agent to call tools and access structured resources.

In plain words
What is it for?
Use it to create MCP tools, resources, and reusable prompts, while checking dependency constraints and version-matched documentation.
Why use it?
It helps developers use the API version their project actually has and avoid confusing FastMCP with a similarly named package in the Python MCP SDK.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create MCP tools, resources, and reusable prompts, while checking dependency constraints and version-matched documentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/prefecthq/fastmcp/fastmcp-server
About the project

FastMCP is a Python framework for building Model Context Protocol applications, which connect language models with tools and data through servers and clients. Developers use it to expose Python functions as tools, connect to local or remote MCP servers, and build interactive tool interfaces. The catalogue includes eight skills, three instructions, two rules, one setting, and one hook for FastMCP.

PrefectHQ/fastmcp · 28,184 stars · on GitHub · gofastmcp.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PrefectHQ/fastmcp --skill fastmcp-server
Clone the repo
git clone --depth 1 https://github.com/PrefectHQ/fastmcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fastmcp-server

README.md
[![agentmods](https://agentmods.dev/badge/skills/prefecthq/fastmcp/fastmcp-server/github.svg)](https://agentmods.dev/skills/prefecthq/fastmcp/fastmcp-server)
Your own site
<a href="https://agentmods.dev/skills/prefecthq/fastmcp/fastmcp-server"><img src="https://agentmods.dev/badge/skills/prefecthq/fastmcp/fastmcp-server/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fastmcp-server

Your own site · 80×15
<a href="https://agentmods.dev/skills/prefecthq/fastmcp/fastmcp-server"><img src="https://agentmods.dev/badge/skills/prefecthq/fastmcp/fastmcp-server.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,099 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.01099
Opus 5.5 $0.00011 $0.00440
Sonnet 5.5 $0.00005 $0.00220
Haiku 4.5 $0.00003 $0.00110

Measured 2d ago against content hash 00d619fded80, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fastmcp-server scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/.mintlify/skills/fastmcp-server/SKILL.md · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Authoring MCP servers with FastMCP

Find the current API

Check the project's installed FastMCP version and dependency constraints. Fetch the documentation index 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.

For paginated or bounded results, expose whether the answer is complete and how to continue. An upstream failure is not an empty result. Return useful recovery information through tool errors rather than a successful-looking payload. Use ToolError, ResourceError, or PromptError from fastmcp.exceptions for intentional client-facing messages. With mask_error_details=True, ordinary exceptions such as ValueError lose their messages; do not put sensitive backend details in the explicit error types, whose messages remain visible.

Read the full file on GitHub · 97 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 97 lines · 27 tokens per session scan A 00d619fded80

Subscribe to this mod's changes

fastmcp-server is a skill published in the GitHub repository PrefectHQ/fastmcp (28,184 stars, last pushed today), licensed Apache-2.0. It adds 27 tokens to every session and 1,099 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-22.

Related

Other skills, from other repositories

scope-creep-detector

Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad pull requests, changes that grew beyond a fix, dependency additions, public API renames, config or CI edits, oversized hunks, and formatting-only files. Use when the user asks whether a change grew beyond the fix, a PR is too…

Shubhamsaboo/awesome-llm-apps · 98 tokens

guardrails-developer-create-guardrails

Helps developers create a NeMo Guardrails configuration for an LLM application. Use when users want to build, scaffold, configure, test, or iterate on input, output, retrieval, dialog, execution, Colang, or catalog-based guardrails. Trigger keywords - create guardrails, build guardrails, scaffold config, write rails…

NVIDIA-NeMo/Guardrails · 101 tokens

guardrails-developer-guide

Routes NVIDIA NeMo Guardrails library product-usage questions to the canonical documentation. Use when users ask how to install, configure, integrate, evaluate, observe, deploy, troubleshoot, or use the NVIDIA NeMo Guardrails library. Trigger keywords - install guardrails, configure rails, guardrail catalog, Colang…

NVIDIA-NeMo/Guardrails · 92 tokens

MCP Integration Assistant

Helps design and implement Model Context Protocol (MCP) server integrations for AI agents.

Notysoty/openagentskills · 23 tokens

MCP Server Builder

Step-by-step guidance for creating a new MCP server with FastMCP or the TypeScript SDK — tool definitions, resource handlers, error responses, and usage examples.

Notysoty/openagentskills · 38 tokens

cor-auth

Authentication cheat sheet for the COR MCP Server — covers both auth modes (email/password and client credentials) step by step, token refresh mechanism, and common auth errors.

fxckcode/mcp-cor · 36 tokens