Prerequisites
- A FastAPI app with at least one route decorator (
@app.get,@router.post, etc.) - Claude Desktop installed (claude.ai/download)
- A free MCP Forge account — sign up here
Copy your route definitions
Open the file where you define your FastAPI routes. MCP Forge reads the decorator, the path, and the function name to build each tool:
from fastapi import FastAPI, Path, Query app = FastAPI() # Get a product by ID @app.get("/products/{product_id}") def get_product(product_id: str): ... # List products with optional filter @app.get("/products") def list_products(category: str = None): ... # Create a product @app.post("/products") def create_product(product: ProductCreate): ... # Delete a product @app.delete("/products/{product_id}") def delete_product(product_id: str): ...
{curly_braces} are automatically extracted as required tool inputs. Query params (optional function args with defaults) are extracted too.Paste into the dashboard
Sign in to your dashboard and go to the Deploy tab. Paste your route file into the editor. FastAPI is auto-detected from the from fastapi import import or from the decorator patterns — no manual selection needed.
Click Generate + Deploy MCP Server →.
Review the generated tools
The function names from your decorators become the MCP tool names:
Your MCP endpoint URL is shown in the dashboard under Your MCP Endpoint.
Add to Claude Desktop
Open Claude Desktop → Settings → Developer → Edit Config and add your server to claude_desktop_config.json:
{
"mcpServers": {
"my-products-api": {
"url": "https://api.main-duck.com/mcp/YOUR_TENANT_ID/sse"
}
}
}
Replace YOUR_TENANT_ID with the value shown in your dashboard. Save and restart Claude Desktop.
Optional: Auto-sync on push
When you add or rename routes, connect GitHub auto-sync so tools re-deploy automatically:
- Go to Dashboard → GitHub Sync
- Paste your repo URL and a GitHub Personal Access Token (read scope)
- Set the branch to watch (default:
main) - Copy the webhook URL into GitHub → Settings → Webhooks
Every push to the configured branch triggers a re-deploy with no manual steps.