Agent skill

Fastmcp Server

by davila7 in davila7/claude-code-templates

Complete guide for building MCP servers with FastMCP 3.0 - tools, resources, authentication, providers, middleware, and deployment.

MITAuto-check passedAgent Workflows

Install Fastmcp Server

skills CLI
$ npx skills add davila7/claude-code-templates --skill fastmcp-server -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davila7/claude-code-templates fastmcp-server --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davila7/claude-code-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-tool/components/skills/development/fastmcp-server .claude/skills/fastmcp-server && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fastmcp-server
GitHub stars
32k
Token cost
~1.9k tokens
SKILL.md length
595 words
Files
34 (incl. references)
Skills in repo
478
Repo updated
First seen
Licence
MIT

At a glance

Complete guide for building MCP servers with FastMCP 3.0 - tools, resources, authentication, providers, middleware, and deployment.

  • Creating Python MCP servers
  • SKILL.md covers When to use this skill, Quick reference, Key concepts and Using the references, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Integrating AI models with external tools and data

What it does

Fastmcp Server is an agent skill from davila7/claude-code-templates. Complete guide for building MCP servers with FastMCP 3.0 - tools, resources, authentication, providers, middleware, and deployment. Use when creating Python MCP servers or integrating AI models with external tools and data.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 37 other files, including reference files (for example `references/authentication/full-oauth-server.md`, `references/authentication/oauth-proxy.md` and `references/authentication/oidc-proxy.md`).

It sits in Agent Workflows, covering MCP servers, Authentication and Authorization and RBAC. It works with Model Context Protocol and Python. The repository describes itself as: CLI tool for configuring and monitoring Claude Code. The licence is MIT.

When your agent uses it

  • Creating Python MCP servers
  • Integrating AI models with external tools and data

Example prompts

  • “/fastmcp-server”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 46b4d8b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fastmcp Server loads about 1.9k tokens when it runs, and up to ~112k if it reads all its reference files. Until then it costs about 60 tokens; SKILL.md has 595 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~112k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davila7/claude-code-templates at commit 46b4d8b, republished under its MIT licence (© davila7). 595 words, ~1,907 tokens.

Download SKILL.mdSave it as .claude/skills/fastmcp-server/SKILL.md (or your agent's skills folder). This skill also uses 33 other files; get the full folder from GitHub.
name
fastmcp-server
description
Complete guide for building MCP servers with FastMCP 3.0 - tools, resources, authentication, providers, middleware, and deployment. Use when creating Python MCP servers or integrating AI models with external tools and data.
version
1.0.0
author
FastMCP Community
license
MIT
tags
FastMCP, MCP, Python, AI, Tools, Server, Authentication, Providers

FastMCP 3.0 Server Development

Complete reference for building production-ready MCP (Model Context Protocol) servers with FastMCP 3.0 - the fast, Pythonic framework for connecting LLMs to tools and data.

When to use this skill

Use FastMCP Server when:

  • Creating a new MCP server in Python
  • Adding tools, resources, or prompts to an MCP server
  • Implementing authentication (OAuth, OIDC, token verification)
  • Setting up middleware for logging, rate limiting, or authorization
  • Configuring providers (local, filesystem, skills, custom)
  • Building production MCP servers with telemetry and storage
  • Upgrading from FastMCP 2.x to 3.0

Key areas covered:

  • Tools & Resources (CORE): Decorators, validation, return types, templates
  • Context & DI (CORE): MCP context, dependency injection, background tasks
  • Authentication (SECURITY): OAuth, OIDC, token verification, proxy patterns
  • Authorization (SECURITY): Scope-based and role-based access control
  • Middleware (ADVANCED): Request/response pipeline, built-in middleware
  • Providers (ADVANCED): Local, filesystem, skills, and custom providers
  • Features (ADVANCED): Pagination, sampling, storage, OpenTelemetry, versioning

Quick reference

Core patterns

Create a server with tools:

python
from fastmcp import FastMCP

mcp = FastMCP("MyServer")

@mcp.tool
def add(a: int, b: int) -> int:
    """Add two numbers"""
    return a + b

Create a resource:

python
@mcp.resource("data://config")
def get_config() -> dict:
    """Return server configuration"""
    return {"version": "1.0", "debug": False}

Create a resource template:

python
@mcp.resource("users://{user_id}/profile")
def get_user_profile(user_id: str) -> dict:
    """Get a user's profile by ID"""
    return fetch_user(user_id)

Create a prompt:

python
@mcp.prompt
def review_code(code: str, language: str = "python") -> str:
    """Review code for best practices"""
    return f"Review this {language} code:\n\n{code}"

Run the server:

python
if __name__ == "__main__":
    mcp.run()

# Or with transport options:
# mcp.run(transport="sse", host="0.0.0.0", port=8000)
Using context in tools
python
from fastmcp import FastMCP, Context

mcp = FastMCP("MyServer")

@mcp.tool
def process_data(uri: str, ctx: Context) -> str:
    """Process data with logging and progress"""
    ctx.info(f"Processing {uri}")
    ctx.report_progress(0, 100)
    data = ctx.read_resource(uri)
    ctx.report_progress(100, 100)
    return f"Processed: {data}"
Authentication setup
python
from fastmcp import FastMCP
from fastmcp.server.auth import BearerAuthProvider

auth = BearerAuthProvider(
    jwks_uri="https://your-provider/.well-known/jwks.json",
    audience="your-api",
    issuer="https://your-provider/"
)

mcp = FastMCP("SecureServer", auth=auth)

Key concepts

Tools

Functions exposed as executable capabilities for LLMs. Decorated with @mcp.tool. Support Pydantic validation, async, custom return types, and annotations (readOnlyHint, destructiveHint).

Resources & Templates

Static or dynamic data sources identified by URIs. Resources use fixed URIs (data://config), templates use parameterized URIs (users://{id}/profile). Support MIME types, annotations, and wildcard parameters.

Context

The Context object provides access to MCP features within tools/resources: logging, progress reporting, resource access, LLM sampling, user elicitation, and session state.

Dependency Injection

Inject values into tool/resource functions using Depends(). Supports HTTP requests, access tokens, custom dependencies, and generator-based cleanup patterns.

Providers

Control where components come from. LocalProvider (default, decorator-based), FileSystemProvider (load from Python files on disk), SkillsProvider (packaged bundles), or custom providers.

Authentication & Authorization

Multiple auth patterns: token verification (JWT, JWKS), OAuth proxy, OIDC proxy, remote OAuth, and full OAuth server. Authorization via scopes on components and middleware.

Middleware

Intercept and modify requests/responses. Built-in middleware for rate limiting, error handling, logging, and response size limits. Custom middleware via @mcp.middleware.

Using the references

Detailed documentation is organized in the references/ folder:

Show full SKILL.md (249 more words)Show less
Getting Started
  • getting-started/installation.md - Install FastMCP, optional dependencies, verify setup
  • getting-started/upgrade-guide.md - Migrate from FastMCP 2.x to 3.0
  • getting-started/quickstart.md - First server, tools, resources, prompts, running
Server
  • server/server-class.md - FastMCP server configuration, transport options, tag filtering
  • server/tools.md - Tool decorator, parameters, validation, return types, annotations
  • server/resources-and-templates.md - Resources, templates, URIs, wildcards, MIME types
Context
  • context/mcp-context.md - Context object, logging, progress, resource access, sampling
  • context/background-tasks.md - Long-running operations with task support
  • context/dependency-injection.md - Depends(), custom deps, HTTP request, access tokens
  • context/user-elicitation.md - Request structured input from users during execution
Features
  • features/icons.md - Custom icons for tools, resources, prompts, and servers
  • features/lifespans.md - Server lifecycle management and startup/shutdown hooks
  • features/client-logging.md - Send log messages to MCP clients
  • features/middleware.md - Request/response pipeline, built-in and custom middleware
  • features/pagination.md - Paginate large component lists
  • features/progress-reporting.md - Report progress for long-running operations
  • features/sampling.md - Request LLM completions from the client
  • features/storage-backends.md - Memory, file, and Redis storage for caching and tokens
  • features/opentelemetry.md - Distributed tracing and observability
  • features/versioning.md - Version components and filter by version ranges
Authentication
  • authentication/token-verification.md - JWT, JWKS, introspection, static keys, custom
  • authentication/remote-oauth.md - Delegate auth to upstream OAuth provider
  • authentication/oauth-proxy.md - Full OAuth proxy with PKCE, client management
  • authentication/oidc-proxy.md - OpenID Connect proxy with auto-discovery
  • authentication/full-oauth-server.md - Complete built-in OAuth server
Authorization
  • authorization.md - Scope-based access control, middleware authorization, patterns
Providers
  • providers/local.md - Default provider, decorator-based component registration
  • providers/filesystem.md - Load components from Python files on disk
  • providers/skills.md - Package and distribute component bundles
  • providers/custom.md - Build custom providers for any component source

Version history

v1.0.0 (February 2026)

  • Initial release covering FastMCP 3.0 (release candidate)
  • 30 reference files across 7 categories
  • Complete coverage of tools, resources, context, auth, providers, and features

© davila7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 33 other files (references) in cli-tool/components/skills/development/fastmcp-server of davila7/claude-code-templates.

  • SKILL.md
  • references/authentication/full-oauth-server.md
  • references/authentication/oauth-proxy.md
  • references/authentication/oidc-proxy.md
  • references/authentication/remote-oauth.md
  • references/authentication/token-verification.md
  • references/authorization.md
  • references/context/background-tasks.md
  • references/context/dependency-injection.md
  • references/context/mcp-context.md
  • references/context/user-elicitation.md
  • references/features/client-logging.md
  • references/features/icons.md
  • references/features/lifespans.md
  • references/features/middleware.md
  • references/features/opentelemetry.md
  • references/features/pagination.md
  • … and 17 more

Open the folder on GitHubat commit 46b4d8b

Compare with similar skills

Fastmcp Server next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fastmcp Server compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fastmcp Server this skilldavila7/claude-code-templates32k—~1.9kAutomated safety check: PassMIT
Copilot SDKintellectronica/agent-skills295—~3.2kAutomated safety check: PassCC0-1.0
Copilot SDKaiskillstore/marketplace4304 repos~3.8kAutomated safety check: PassNone
Copilot SDKmicrosoft/skills3.1k—~7.1kAutomated safety check: PassMIT
MCP Server Builderanthropics/skills180k63 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT

Similar skills

  • Copilot SDK

    intellectronica/agent-skills

    This skill helps with GitHub Copilot SDK work across Node.js/TypeScript, Python, Go, .NET, and Java.

    295 GitHub stars~3.2k tokensUpdated 5 mo ago
    Agent WorkflowsAuto-check passed
  • Copilot SDK

    aiskillstore/marketplace

    Build applications that programmatically interact with GitHub Copilot.

    430 GitHub starsUsed in 4 repos~3.8k tokens
    Agent WorkflowsAuto-check passed
  • Copilot SDK

    microsoft/skills

    Official

    Build applications powered by GitHub Copilot using the Copilot SDK.

    3.1k GitHub stars~7.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 63 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • Builds, modifies, debugs, migrates and verifies TypeScript MCP servers and MCP Apps with the mcp-use framework, treating the installed package's types as the source of truth.

    11k GitHub stars~923 tokensUpdated today
    Agent WorkflowsAuto-check passed

More from davila7/claude-code-templates

All 478 skills in this repo
  • Perplexity Web Search

    davila7/claude-code-templates

    Runs web-grounded searches through Perplexity's Sonar models over OpenRouter for current events, recent literature and cited facts beyond the model's training cutoff.

    32k GitHub starsUsed in 11 repos~3.5k tokens
    Auto-check: notes
  • Neuropixels Data Analysis

    davila7/claude-code-templates

    Analyzes Neuropixels recordings from SpikeGLX or Open Ephys through preprocessing, drift correction, Kilosort4 spike sorting, quality metrics and curation.

    32k GitHub starsUsed in 9 repos~2.8k tokens
    Auto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    32k GitHub starsUsed in 9 repos~5.1k tokens
    Auto-check: notes
  • Brand Voice Content Creator

    davila7/claude-code-templates

    Analyzes a brand's existing writing to lock in a consistent voice, then builds SEO blog posts and platform-specific social content around it.

    32k GitHub starsUsed in 3 repos~1.9k tokens
    Auto-check passed
  • CAPA Officer

    davila7/claude-code-templates

    Guides corrective and preventive action (CAPA) work in a quality management system, from initiation and root cause analysis through effectiveness verification.

    32k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Fda Consultant Specialist

    davila7/claude-code-templates

    Senior FDA consultant and specialist for medical device companies including HIPAA compliance and requirement management.

    32k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Questions about Fastmcp Server

What does Fastmcp Server do?

Complete guide for building MCP servers with FastMCP 3.0 - tools, resources, authentication, providers, middleware, and deployment. Fastmcp Server is an agent skill from davila7/claude-code-templates.0 - tools, resources, authentication, providers, middleware, and deployment.

When should I use Fastmcp Server?

Fastmcp Server fits situations like: creating Python MCP servers; integrating AI models with external tools and data.

How do I install Fastmcp Server in Claude Code?

Run `npx skills add davila7/claude-code-templates --skill fastmcp-server -a claude-code`. Or copy the skill folder (cli-tool/components/skills/development/fastmcp-server in davila7/claude-code-templates) into .claude/skills/fastmcp-server in your project. Claude Code loads it when a task matches its description.

How do I install Fastmcp Server in Codex?

Run `npx skills add davila7/claude-code-templates --skill fastmcp-server -a codex`. Or copy the skill folder (cli-tool/components/skills/development/fastmcp-server in davila7/claude-code-templates) into .agents/skills/fastmcp-server in your project. Codex loads it when a task matches its description.

Can I use Fastmcp Server in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davila7/claude-code-templates --skill fastmcp-server -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fastmcp-server, .gemini/skills/fastmcp-server, .github/skills/fastmcp-server and .opencode/skills/fastmcp-server in your project.

What does Fastmcp Server need to run?

SKILL.md names no scripts, command-line tools or credentials: Fastmcp Server is instructions for the agent only. Our summary lists: Python 3.

Does Fastmcp Server access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Fastmcp Server safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Fastmcp Server use?

Fastmcp Server is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fastmcp Server use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 110k tokens, read only when the agent opens those files.

What are the alternatives to Fastmcp Server?

Skills that share tags, products or a category with Fastmcp Server: Copilot SDK (intellectronica/agent-skills, 295 stars), Copilot SDK (aiskillstore/marketplace, 430 stars), Copilot SDK (microsoft/skills, 3.1k stars) and MCP Server Builder (anthropics/skills, 180k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fastmcp Server?

davila7 (a GitHub user) maintains it in davila7/claude-code-templates, which has 32,483 GitHub stars. The repository holds 478 skills in this directory. The repository was last updated on October 9, 2026.

Source: davila7/claude-code-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.