Add missing 3.0.0 version badges and document tasks extra (#2866)

This commit is contained in:
Jeremiah Lowin 2026-01-13 12:04:52 -05:00 committed by GitHub
commit 7ee3bec727
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 27 additions and 0 deletions

View file

@ -5,6 +5,8 @@ description: Learn how to run your FastMCP server locally for development and te
icon: circle-play
---
import { VersionBadge } from '/snippets/version-badge.mdx'
FastMCP servers can be run in different ways depending on your needs. This guide focuses on running servers locally for development and testing. For production deployment to a URL, see the [HTTP Deployment](/deployment/http) guide.
## The `run()` Method
@ -159,6 +161,8 @@ For more CLI features including development mode with the MCP Inspector, see the
### Auto-Reload for Development
<VersionBadge version="3.0.0" />
During development, you can use the `--reload` flag to automatically restart your server when source files change:
```bash

View file

@ -23,6 +23,17 @@ Alternatively, you can install it directly with `pip` or `uv pip`:
```
</CodeGroup>
### Optional Dependencies
FastMCP provides optional extras for specific features:
```bash
# Background tasks (Docket-based distributed task scheduling)
pip install "fastmcp[tasks]"
```
See [Background Tasks](/servers/tasks) for details on the task system.
### Verify Installation
To verify that FastMCP is installed correctly, you can run the following command:

View file

@ -5,6 +5,10 @@ icon: heart-pulse
tag: NEW
---
import { VersionBadge } from '/snippets/version-badge.mdx'
<VersionBadge version="3.0.0" />
Lifespans let you run code once when the server starts and clean up when it stops. Unlike per-session handlers, lifespans run exactly once regardless of how many clients connect.
## Basic Usage

View file

@ -36,6 +36,14 @@ MCP background tasks are different: they're **protocol-native**. This means MCP
## Enabling Background Tasks
<VersionBadge version="3.0.0" /> Background tasks require the `tasks` extra:
```bash
pip install "fastmcp[tasks]"
# or with uv
uv add "fastmcp[tasks]"
```
Add `task=True` to any tool, resource, resource template, or prompt decorator. This marks the component as capable of background execution.
```python {6}