Quick Start¶
Generate a fully-functional MCP server from an OpenAPI spec in under a minute.
0. Install¶
1. Generate¶
What gets generated:
Python API client from the OpenAPI spec
Modular MCP server modules (one per API tag)
Authentication middleware
OAuth2 provider (if spec contains OAuth2 security schemes)
Package files, tests, and Docker configuration
Everything outputs to
generated_mcp/
Optional Features¶
By default, the generator creates a minimal, production-ready server. Enable additional features as needed:
# Enable persistent storage (for OAuth tokens, session state)
generate-mcp --enable-storage
# Enable response caching (reduces backend API calls)
generate-mcp --enable-storage --enable-caching
# Enable MCP resources (expose GET endpoints as MCP resources)
generate-mcp --enable-resources
# Enable all features
generate-mcp --enable-storage --enable-caching --enable-resources
| Flag | Description | When to Use |
|---|---|---|
--enable-storage |
Persistent storage backend | OAuth refresh tokens, session data |
--enable-caching |
Response caching with TTL | Rate-limited APIs, slow endpoints |
--enable-resources |
MCP resource templates | Expose API data for context/retrieval |
Note
--enable-caching requires --enable-storage as it uses the storage backend for cache persistence.
2. Register¶
This adds your server to the local registry at ~/.mcp-generator/servers.json.
3. Run¶
4. Connect to AI Clients¶
Claude Desktop¶
Add to ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"my-api": {
"command": "python",
"args": ["/path/to/generated_mcp/swagger_petstore_openapi_mcp_generated.py"],
"env": {
"API_TOKEN": "your-api-token-here"
}
}
}
}
HTTP Mode¶
Any MCP-compatible client can connect to:
Next Steps¶
- Architecture — understand the generated code structure
- CLI Reference — full command documentation
- Authentication — JWT, OAuth2, and token validation