FastAPI already auto-generates an OpenAPI 3 schema from your Python type hints — wmcp.sh consumes OpenAPI as input. There's literally no glue code. Of every framework on this site, FastAPI is the easiest.
wmcp.sh is not affiliated with the FastAPI project or Anthropic. FastAPI is open-source software maintained by Sebastián Ramírez and contributors.
FastAPI routes with Pydantic v2 input/output models. /openapi.json already serves a fully-typed OpenAPI 3 schema. Auth via HTTPBearer, APIKeyHeader, or OAuth2PasswordBearer.
A Model Context Protocol server with typed tool schemas. wmcp.sh consumes /openapi.json directly and emits MCP at https://wmcp.sh/mcp/<your-id>. One ingest call. Done.
Standard FastAPI 0.110+ with Pydantic v2 — no extra libraries, no schema duplication.
# main.py — FastAPI on Python 3.12+
from fastapi import FastAPI, Depends, HTTPException
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
from pydantic import BaseModel, Field
app = FastAPI(title='Acme Inventory', version='1.0.0')
bearer = HTTPBearer()
class QuoteIn(BaseModel):
symbol: str = Field(min_length=1, max_length=12)
size: float = Field(gt=0)
class QuoteOut(BaseModel):
symbol: str
bid: float
ask: float
size: float
@app.post('/quotes', response_model=QuoteOut, tags=['agent'])
async def get_quote(body: QuoteIn, creds: HTTPAuthorizationCredentials = Depends(bearer)) -> QuoteOut:
if not creds.credentials:
raise HTTPException(401)
mid = await fetch_mid(body.symbol)
return QuoteOut(symbol=body.symbol, bid=mid * 0.999, ask=mid * 1.001, size=body.size)
# OpenAPI is served at /openapi.json automatically. That's it.
# curl 'https://wmcp.sh/api/v1/tools?url=https://acme.example.com/openapi.json&tag=agent'
| Capability | Hand-rolled | wmcp.sh + FastAPI |
|---|---|---|
| Schema-from-type-hints | ⚠️ Re-derive schemas in a tools.py | ✅ FastAPI already emits it; one source of truth |
| Pydantic v2 JSON Schema | ⚠️ Hand-translate to MCP shape | ✅ Pydantic v2 → OpenAPI 3.1 JSON Schema → MCP tool input schema, 1:1 |
| Security schemes | ⚠️ Re-implement at MCP layer | ✅ FastAPI's Depends(...) security flows through to wmcp.sh |
| MCP transport (Streamable HTTP, SSE) | ⚠️ You build it | ✅ Served at https://wmcp.sh/mcp/<your-id> |
| Per-route gating | ⚠️ Manual | ✅ FastAPI tags=[...] + &tag=agent ingest filter |
| Async + streaming | ✅ Yes | ✅ wmcp.sh handles both |
/openapi.json is already there. FastAPI generates it from your type hints with no extra library or config. wmcp.sh consumes OpenAPI as its primary input, so the integration is one curl call — no converter, no schema duplication.securitySchemes in the OpenAPI output. wmcp.sh reads them and forwards credentials. For OAuth 2.1 DCR, the /mcp/<provider> proxy handles the full flow for clients that can't drive OAuth themselves.tags=['agent'] and pass &tag=agent at ingest, or set include_in_schema=False to keep routes out of the schema entirely.apispec or a similar generator. Point wmcp.sh at the spec URL; the rest is identical.Audit your routes, tune tags + securitySchemes, deploy MCP at mcp.yourbrand.com. Starter $499 one-time setup; Managed Retainer $999/mo for ongoing maintenance; Enterprise $4,999+/mo for SLA + private deploy.