openapi-mcp-swagger
by salacoste·★ 16·Score 39
Converts Swagger/OpenAPI specs into searchable MCP servers for AI assistants, enabling intelligent API documentation queries and code generation.
Overview
This MCP server transforms complex API documentation into an intelligent, searchable knowledge base that AI assistants can query directly. Instead of struggling with large API docs that exceed context windows, developers can now have natural conversations about their APIs. The server indexes Swagger/OpenAPI specs and provides fast, relevant responses to queries about endpoints, parameters, and schemas. It supports large API files (10MB+) and includes production features like authentication and monitoring.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this when working with complex APIs that exceed AI context windows and need intelligent endpoint discovery with generated code examples.
When NOT to choose this
Avoid if you need real-time API interaction capabilities (this is read-only) or require authentication beyond basic API key support.
Tools this server exposes
5 tools extracted from the READMEsearchEndpointsSearch for API endpoints using natural language keywords
getEndpointDetailsGet detailed information about a specific API endpoint
generateCodeExampleGenerate code examples for using API endpoints
listSchemasList all data schemas defined in the API specification
getSchemaDetailsGet detailed information about a specific data schema
Comparable tools
Installation
# Install from source
git clone https://github.com/salacoste/openapi-mcp-swagger.git
cd openapi-mcp-swagger
pip install -r requirements.txt
# Convert Swagger file to MCP server
swagger-mcp-server convert swagger-openapi-data/your-api.json --name your-api
cd mcp-server-your-api
swagger-mcp-server serve
# For Claude Desktop, add to Claude's config.json:
{
"mcpServers": {
"your-api": {
"command": "swagger-mcp-server",
"args": ["serve", "--port", "8080"]
}
}
}```FAQ
- What size of API docs can this handle?
- The server can process OpenAPI files up to 10MB+ using stream-based parsing to handle large specifications efficiently.
- Which AI assistants are compatible?
- Works with any MCP-compatible tool including Claude, Cursor, VS Code, and custom implementations through the standard MCP protocol.
Compare openapi-mcp-swagger with
Last updated · Auto-generated from public README + GitHub signals.