---
name: docs
description: Write or revise a page under docs/ for gofastmcp.com. Use when adding a feature's documentation, fixing a docs issue, reworking a page, or auditing pages for accessibility and consistency. Covers the page shape, the voice, the checks that run in CI, and how a merged page reaches the live site.
title: docs
canonical_url: https://skilld.dev/gh/prefecthq/fastmcp/docs
last_updated: 2026-11-12T07:03:08.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install prefecthq/fastmcp/docs`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/docs`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/prefecthq/fastmcp/docs) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/docs`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/docs --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/docs --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# FastMCP docs

The docs are a Mintlify site built from `docs/` on `published-docs`, served at `https://gofastmcp.com/docs`. The separate `PrefectHQ/gofastmcp-website` repository deploys its `main` branch to Vercel, serves the root landing page, and proxies these docs under `/docs`. Author docs here on `main`; website changes belong in that repository. A page exists only when `docs/docs.json` lists it, and a feature exists only when a page documents it. `docs/python-sdk/**` is generated from docstrings by a bot; edit the docstring, not the page.

## Procedure

1. Find the owning page before creating one. `rg -l "<feature>" docs --glob '!docs/python-sdk/**' --glob '!docs/v2/**' --glob '!docs/v3/**'`. Extend it when the feature belongs to that page's subject; add a page when it has its own.
2. Read two neighboring pages in the same `docs.json` group and match their section order and heading depth.
3. Write the page with the template below. Explain why the feature exists before showing how, and keep the first code block small enough to read without scrolling.
4. Make every code block runnable: imports present, names defined, one idea per block. Pull intermediate values into named variables instead of nesting calls.
5. Run the checks in **Verify** and fix what they report.
6. When the change is ready to ship, open a PR against `main`. Merged is not live: the site serves `published-docs`. A stable release from `main` opens a `Publish FastMCP v<version> docs` PR against `published-docs` that a maintainer merges; for a docs-only change between releases, follow "Publishing docs by hand" in `.agents/skills/release/SKILL.md`. Either way, the `Deploy docs` run's verdict is what says the site changed.

## Template

````mdx
---
title: Feature Name
sidebarTitle: Feature
description: One sentence a search result can show.
icon: some-fontawesome-icon
---

import { VersionBadge } from '/snippets/version-badge.mdx'

<VersionBadge version="<version that introduces the feature>" />

One paragraph on the problem this solves and when to reach for it.

## Basic usage

Explain what the example does, then show it.

```python
from fastmcp import FastMCP

mcp = FastMCP("Demo")


@mcp.tool
def greet(name: str) -> str:
    return f"Hello, {name}!"
```

## Configuration

One subsection per option that changes behavior, each with a sentence on the default and an example of the override.

## How it works

Only when the mechanism affects what the reader should do. Put a one-sentence text description before any diagram.
````

## Voice

Second person, present tense, plain assertions. Say what the feature does and what the reader should do; leave out marketing adjectives and reassurance. The first sentence of each section carries its point. Prose holds the important information; code comments hold none of it. Wrap bare `{}` in backticks, since Mintlify reads them as JSX.

## Accessibility

Every `<img>` and `![]()` gets alt text that says what the picture shows. Decorative media gets `aria-hidden="true"`. Headings step one level at a time. Link text names the destination. Tables have a header row. Code fences carry a language. Diagrams get a text description. Custom CSS keeps text at 4.5:1 contrast and animations behind `prefers-reduced-motion`.

## Verify

```bash
(cd docs && npx --yes mint@latest broken-links)
uv run pytest tests/docs -n 0
```

The first catches dead links and MDX parse errors and names the file and line. The second parses every Python block in `docs/` and resolves every `fastmcp` import. A block that must not run takes `test="skip"` on its fence.

For a visual change, run `npx --yes mint@latest dev` in `docs/` and look at the page at 1280px and 390px, light and dark.

## Gotchas

- `VersionBadge` marks when a feature arrived. Leave old badges alone; they are history, not staleness.
- `docs/v2/` and `docs/v3/` are frozen snapshots of earlier majors. Maintenance releases add changelog entries there and nothing else.
- The version picker label lives in `docs/docs.json` under `navigation.versions[0].version`. It names the major (`v4`), so releases within a major leave it alone; change it when a new major ships.
- `mcp_types` is the real name of the protocol types package in 4.x.
