OpenAPI MCP Gateway
Mount any OpenAPI (Swagger) spec as a Model Context Protocol (MCP) server, or expose an existing FastAPI app the same way. Multiple APIs in one process, each with its own mount path and auth.
uvx openapi-mcp-gateway --spec https://petstore3.swagger.io/api/v3/openapi.json
# Server live at http://127.0.0.1:8000/api/mcp- Multi-Spec, Multi-Auth. Mount GitHub, an OAuth2 SaaS, and your internal API side by side, each with its own bearer / API key / OAuth2 auth and token namespace.
- FastAPI-Native. Decorate routes with
@mcp_toolto expose them in-process over ASGI, no extra hop and no second spec to maintain. - Dynamic Exposure. Front a huge spec with three
list → get → callmeta-tools instead of hundreds of schemas, so it never blows the LLM's context window. - Resource Auto-Promotion. Set
mode: autoand eligible GETs register as MCP resources instead of tools, keeping the tool list small while reads stay addressable by URI. - Spec-Compliant Authorization. Audience-bound tokens with no silent passthrough to upstreams, plus protocol-native
annotationsandstructuredContenton every tool. - Tool Name and Description Overrides. Rewrite ugly
operationIds and empty descriptions in YAML, no fork required. - Pluggable Token Store. Memory by default, switch to Redis to share state across replicas.
- Every Transport. Streamable HTTP, SSE, and stdio on the same binary, from Claude Desktop and Cursor to any other MCP client.






