cli-tool/components/skills/development/fastmcp-server/SKILL.md
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.
npx skillsauth add davila7/claude-code-templates fastmcp-serverInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Use FastMCP Server when:
Key areas covered:
Create a server with tools:
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:
@mcp.resource("data://config")
def get_config() -> dict:
"""Return server configuration"""
return {"version": "1.0", "debug": False}
Create a resource template:
@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:
@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:
if __name__ == "__main__":
mcp.run()
# Or with transport options:
# mcp.run(transport="sse", host="0.0.0.0", port=8000)
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}"
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)
Functions exposed as executable capabilities for LLMs. Decorated with @mcp.tool. Support Pydantic validation, async, custom return types, and annotations (readOnlyHint, destructiveHint).
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.
The Context object provides access to MCP features within tools/resources: logging, progress reporting, resource access, LLM sampling, user elicitation, and session state.
Inject values into tool/resource functions using Depends(). Supports HTTP requests, access tokens, custom dependencies, and generator-based cleanup patterns.
Control where components come from. LocalProvider (default, decorator-based), FileSystemProvider (load from Python files on disk), SkillsProvider (packaged bundles), or custom providers.
Multiple auth patterns: token verification (JWT, JWKS), OAuth proxy, OIDC proxy, remote OAuth, and full OAuth server. Authorization via scopes on components and middleware.
Intercept and modify requests/responses. Built-in middleware for rate limiting, error handling, logging, and response size limits. Custom middleware via @mcp.middleware.
Detailed documentation is organized in the references/ folder:
v1.0.0 (February 2026)
tools
No-code automation democratizes workflow building. Zapier and Make (formerly Integromat) let non-developers automate business processes without writing code. But no-code doesn't mean no-complexity - these platforms have their own patterns, pitfalls, and breaking points. This skill covers when to use which platform, how to build reliable automations, and when to graduate to code-based solutions. Key insight: Zapier optimizes for simplicity and integrations (7000+ apps), Make optimizes for power
tools
Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).
tools
Workflow automation is the infrastructure that makes AI agents reliable. Without durable execution, a network hiccup during a 10-step payment flow means lost money and angry customers. With it, workflows resume exactly where they left off. This skill covers the platforms (n8n, Temporal, Inngest) and patterns (sequential, parallel, orchestrator-worker) that turn brittle scripts into production-grade automation. Key insight: The platforms make different tradeoffs. n8n optimizes for accessibility
development
Trigger.dev expert for background jobs, AI workflows, and reliable async execution with excellent developer experience and TypeScript-first design. Use when: trigger.dev, trigger dev, background task, ai background job, long running task.