A Model Context Protocol (MCP) server that enables LLMs to explore and understand OpenAPI specifications through structured tools.
- π Smart API Exploration - Navigate APIs by categories, endpoints, and schemas
- π Multiple Modes - Run as stdio (for Claude Desktop), HTTP server, or interactive CLI
- πΎ Intelligent Caching - Caches remote OpenAPI specs for faster access
- ποΈ Multi-Architecture - Supports Linux AMD64 and ARM64
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"openapi": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "OPENAPI_SPEC_URL=https://api.example.com/openapi.json", "ghcr.io/sagenkoder/go-openapi-exploration-mcp-server:latest"]
}
}
}Or use a local binary:
{
"mcpServers": {
"openapi": {
"command": "/path/to/openapi-mcp-stdio",
"env": {
"OPENAPI_SPEC_URL": "https://api.example.com/openapi.json"
}
}
}
}# Latest (stdio mode)
docker pull ghcr.io/sagenkoder/go-openapi-exploration-mcp-server:latest
# Specific modes
docker pull ghcr.io/sagenkoder/go-openapi-exploration-mcp-server:http
docker pull ghcr.io/sagenkoder/go-openapi-exploration-mcp-server:interactiveDownload from releases:
openapi-mcp-stdio-linux-amd64- MCP stdio modeopenapi-mcp-http-linux-amd64- HTTP server modeopenapi-mcp-interactive-linux-amd64- Interactive CLI mode
# Clone
git clone https://github.com/SagenKoder/go-openapi-exploration-mcp-server.git
cd go-openapi-exploration-mcp-server
# Build all modes
./build.sh
# Or build specific mode
go build -o openapi-mcp-stdio ./cmd/openapi-mcp-stdioOPENAPI_SPEC_URL(required) - URL or file path to OpenAPI specOPENAPI_CACHE_DIR(optional) - Cache directory (default:~/.openapi-mcp-cache)
# Docker
docker run -i --rm \
-e OPENAPI_SPEC_URL=https://petstore3.swagger.io/api/v3/openapi.json \
ghcr.io/sagenkoder/go-openapi-exploration-mcp-server:latest
# Binary
OPENAPI_SPEC_URL=https://petstore3.swagger.io/api/v3/openapi.json ./openapi-mcp-stdio# Docker
docker run -p 8080:8080 \
-e OPENAPI_SPEC_URL=https://petstore3.swagger.io/api/v3/openapi.json \
ghcr.io/sagenkoder/go-openapi-exploration-mcp-server:http
# Binary
OPENAPI_SPEC_URL=https://petstore3.swagger.io/api/v3/openapi.json ./openapi-mcp-http -addr :8080# Docker
docker run -it --rm \
-e OPENAPI_SPEC_URL=https://petstore3.swagger.io/api/v3/openapi.json \
ghcr.io/sagenkoder/go-openapi-exploration-mcp-server:interactive
# Binary
OPENAPI_SPEC_URL=https://petstore3.swagger.io/api/v3/openapi.json ./openapi-mcp-interactiveThe server provides these tools to LLMs:
- list_categories - List API categories based on path segments
- list_endpoints - List endpoints, optionally filtered by category
- show_endpoint - Show detailed endpoint information including parameters and schemas
- get_spec_info - Get general information about the API
- show_schema - Inspect specific schema components
OPENAPI_SPEC_URL=/path/to/openapi.yaml ./openapi-mcp-stdioOPENAPI_CACHE_DIR=/tmp/api-cache \
OPENAPI_SPEC_URL=https://api.example.com/openapi.json \
./openapi-mcp-stdiodocker run -i --rm \
-v $(pwd)/openapi.yaml:/openapi.yaml:ro \
-e OPENAPI_SPEC_URL=/openapi.yaml \
ghcr.io/sagenkoder/go-openapi-exploration-mcp-server:latestcmd/
βββ openapi-mcp-stdio/ # MCP stdio mode
βββ openapi-mcp-http/ # HTTP server mode
βββ openapi-mcp-interactive/ # Interactive CLI mode
internal/
βββ cache.go # Caching logic
βββ handlers.go # MCP tool handlers
βββ server.go # Core server logic
βββ utils.go # Utilities
# Build specific mode
docker build --build-arg MODE=stdio -t my-openapi-mcp:stdio .
# Build all modes
./build.sh dockerMIT License - see LICENSE file for details.