Creates production-ready MCP servers using FastMCP v2...
Build production-ready MCP servers using FastMCP v2 with optimal context efficiency through progressive disclosure patterns.
1-3 simple tools?
ā Standard FastMCP with optimized tools
Load: references/MANDATORY_PATTERNS.md
5+ related capabilities?
ā Gateway pattern (progressive disclosure)
Load: references/PROGRESSIVE_DISCLOSURE.md
Load: references/GATEWAY_PATTERNS.md
Optimize existing server?
ā Apply mandatory patterns
Load: references/MANDATORY_PATTERNS.md
Package for distribution?
ā MCPB bundler
Load: references/MCPB_BUNDLING.md
Execute: scripts/create_mcpb.py
Need FastMCP documentation?
ā Search references/LLMS_TXT.md for relevant URLs
ā Use web_fetch on gofastmcp.com URLs
Every implementation should meet these four requirements:
uv pip install fastmcpDetails in references/MANDATORY_PATTERNS.md
To fetch FastMCP documentation:
1. Read references/LLMS_TXT.md - complete URL index
2. Search for relevant topic keywords
3. Use web_fetch on matched URLs (append .md for markdown)
4. Apply patterns from fetched documentation
Example: Authentication patterns ā Search LLMS_TXT.md for "authentication" ā web_fetch https://gofastmcp.com/servers/auth/authentication.md
For servers with 5+ capabilities:
Three-tier loading:
Achieves 85-93% baseline reduction. See references/PROGRESSIVE_DISCLOSURE.md
Read LLMS_TXT.md ā Find relevant URLs ā web_fetch documentation
Load appropriate reference based on architecture decision. Apply all four patterns.
cd /home/claude
zip -r server-name.mcpb manifest.json server.py README.md
cp server-name.mcpb /mnt/user-data/outputs/
See references/MCPB_BUNDLING.md for manifest format.
Documentation index (load first for FastMCP knowledge):
Core patterns:
Implementation:
Scripts:
scripts/create_mcpb.py - Bundle MCP servers into .mcpb filesBefore completing any FastMCP implementation:
ā Uses uv (not pip)
ā FastMCP docs fetched from LLMS_TXT.md URLs (not web_search)
ā Tool annotations (readOnlyHint, title, openWorldHint)
ā Annotated parameters with Field
ā Single-sentence docstrings
ā 65-70% token reduction vs verbose
ā Server instructions concise (<100 chars)
For gateway implementations, additionally verify:
ā 85%+ baseline context reduction
ā Discover returns metadata only
ā Load fetches content on demand
ā Execute runs without context cost
Before (180 tokens):
@mcp.tool()
async def search_items(query: str):
"""Search for items in the database.
This tool allows comprehensive searching..."""
After (55 tokens):
@mcp.tool(
annotations={"title": "Search", "readOnlyHint": True, "openWorldHint": False}
)
async def search_items(
query: Annotated[str, Field(description="Search text")],
ctx: Context = None
):
"""Search items. Fast full-text search across all fields."""
ā Using mcpb pack CLI (causes crashes, just use zip)
ā Using pip instead of uv
ā web_search for FastMCP docs (use web_fetch on LLMS_TXT.md URLs)
ā Verbose tool descriptions
ā Missing tool annotations
ā Gateway for 1-3 tools (overhead exceeds benefit)
ā Mixing unrelated capabilities in single gateway