openapi-to-mcp
by EvilFreelancer·★ 16·Score 42
OpenAPI-to-MCP converts any OpenAPI/Swagger API into MCP tools with HTTP execution.
Overview
This is a standalone proxy that transforms OpenAPI/Swagger-defined HTTP APIs into MCP servers, creating one MCP tool per API endpoint. It loads the OpenAPI specification at startup, allows filtering operations via include/exclude parameters, and registers each operation as an MCP tool. Tool calls are executed as HTTP requests to the backend API. The project supports both file-based and URL-based OpenAPI specifications, with comprehensive logging and correlation ID support.
Try asking AI
After installing, here are 3 things you can ask your AI assistant:
When to choose this
Choose this when you have an existing REST API with OpenAPI documentation and want to quickly enable AI clients to interact with it without backend modifications.
When NOT to choose this
Don't choose this if you need complex authentication flows beyond Basic Auth/Bearer tokens, or if your API requires significant customization for AI clients.
Comparable tools
Installation
Installation
With npm (local)
- Copy
.env.exampleto.envand set required variables:
``bash cp .env.example .env # Edit .env: MCP_OPENAPI_SPEC, MCP_API_BASE_URL ``
- Install and run:
``bash npm ci npm run build npm run start ``
With Docker
docker run --rm -p 3100:3100 \
-e MCP_OPENAPI_SPEC=http://your-api/openapi.json \
-e MCP_API_BASE_URL=http://your-api \
evilfreelancer/openapi-to-mcp:latestClaude Desktop Configuration
Add to claude_desktop_config.json:
{
"mcpServers": {
"openapi-mcp": {
"command": "npx",
"args": ["openapi-to-mcp"],
"env": {
"MCP_OPENAPI_SPEC": "http://your-api/openapi.json",
"MCP_API_BASE_URL": "http://your-api"
}
}
}
}Compare openapi-to-mcp with
Last updated · Auto-generated from public README + GitHub signals.