MCP Generator 3.x¶
Transform any OpenAPI specification into a production-ready FastMCP 3.x server.
What is MCP Generator?¶
MCP Generator automatically creates modular, composable MCP servers from OpenAPI 3.0.x, 3.1.x, and Swagger 2.0 specifications. It bridges REST APIs and AI agents by generating fully-functional MCP tools that AI assistants like Claude, ChatGPT, and others can use to interact with your APIs.
Key Features¶
-
Modular Architecture
One sub-server per API tag — composable, scalable, and organized.
-
Enterprise Auth
JWT/JWKS validation, OAuth2 flows, MultiAuth composition, scope enforcement.
-
Middleware Stack
Error handling, timing, logging, response limiting, ping keepalive — full FastMCP 3.x pipeline.
-
SearchTools & CodeMode
FastMCP 3.1 transforms: BM25 tool discovery and experimental meta-tool execution.
-
OpenTelemetry
Built-in tracing with MCP semantic conventions — Console or OTLP export.
-
Auto-Generated Tests
Test suites generated alongside your server — ready to run out of the box.
-
Docker Ready
Dockerfile and docker-compose generated for instant containerized deployment.
-
Tool Tags & Timeouts
Automatic per-module tags, configurable timeouts, deprecated endpoint detection.
Quick Example¶
# Install
git clone https://github.com/quotentiroler/mcp-generator-3.x.git
cd mcp-generator-3.x && uv sync
# Generate from any OpenAPI spec
uv run generate-mcp --url https://petstore3.swagger.io/api/v3/openapi.json
# Run it
cd generated_mcp
python swagger_petstore_openapi_mcp_generated.py --transport http --port 8000
That's it — a fully functional MCP server with 19 tools, modular sub-servers, authentication middleware, and auto-generated tests.
Supported Specs¶
| Format | Status |
|---|---|
| OpenAPI 3.0.x | |
| OpenAPI 3.1.x | |
| Swagger 2.0 | |
| JSON | |
| YAML |
Next Steps¶
- Installation — set up the generator in 2 minutes
- Quick Start — generate your first MCP server
- Architecture — understand the generated code structure
- Comparison — see how we compare to alternatives