Openapi Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Openapi Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
The OpenAPI-MCP proxy translates OpenAPI specs into MCP tools, enabling AI agents to access external APIs without custom wrappers!

The OpenAPI to Model Context Protocol (MCP) proxy server bridges the gap between AI agents and external APIs by dynamically translating OpenAPI specifications into standardized MCP tools, resources, and prompts. This simplifies integration by eliminating the need for custom API wrappers.
Built with FastMCP following official MCP patterns and best practices, the server provides:
If you find it useful, please give it a ⭐ on GitHub!
stdio, working out-of-the-box with popular LLM orchestrators.Option 1: Using uvx (Recommended)
# Run directly without installation
uvx openapi-mcp-proxy
# Or with environment variables
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
uvx openapi-mcp-proxyOption 2: Using pip
pip install openapi-mcp-proxy
# Then run
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
openapi-mcpOption 3: From source
git clone https://github.com/gujord/OpenAPI-MCP.git
cd OpenAPI-MCP
python3.12 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e .Quick Test (Norwegian Weather API)
# Using uvx
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
uvx openapi-mcp
# Or using installed package
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
openapi-mcpHTTP Transport (Recommended for Claude Desktop)
# Start weather API with HTTP transport
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8001" \
openapi-mcp1. Copy the provided configuration:
cp claude_desktop_config.json ~/Library/Application\ Support/Claude/claude_desktop_config.json2. Start the weather server:
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8001" \
openapi-mcp3. Test in Claude Desktop:
weather_get__compact tool automatically!Run multiple OpenAPI services simultaneously:
# Terminal 1: Weather API
source venv/bin/activate && \
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8001" \
python src/openapi_mcp/fastmcp_server.py
# Terminal 2: Petstore API
source venv/bin/activate && \
OPENAPI_URL="https://petstore3.swagger.io/api/v3/openapi.json" \
SERVER_NAME="petstore" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8002" \
python src/openapi_mcp/fastmcp_server.pyQuick start with Docker:
# Start all services (weather + petstore)
./docker-start.sh
# Or manually
docker-compose up --build -dThis automatically runs:
HTTP Transport (Recommended):
Use the provided configuration file:
cp claude_desktop_config.json ~/Library/Application\ Support/Claude/claude_desktop_config.jsonOr create manually:
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["mcp-remote", "http://127.0.0.1:8001/sse"]
},
"petstore": {
"command": "npx",
"args": ["mcp-remote", "http://127.0.0.1:8002/sse"]
}
}
}Stdio Transport (Alternative):
{
"mcpServers": {
"weather": {
"command": "/full/path/to/OpenAPI-MCP/venv/bin/python",
"args": ["/full/path/to/OpenAPI-MCP/src/openapi_mcp/fastmcp_server.py"],
"env": {
"SERVER_NAME": "weather",
"OPENAPI_URL": "https://api.met.no/weatherapi/locationforecast/2.0/swagger"
},
"transport": "stdio"
}
}
}Note: Replace /full/path/to/OpenAPI-MCP with your actual installation path.#### With Local Spec and Custom Headers
{
"mcpServers": {
"local_api": {
"command": "/full/path/to/OpenAPI-MCP/venv/bin/python",
"args": ["/full/path/to/OpenAPI-MCP/src/openapi_mcp/fastmcp_server.py"],
"env": {
"SERVER_NAME": "local_api",
"OPENAPI_URL": "./specs/my-api.yaml",
"MCP_AUTH_HEADERS": "{\"X-API-Key\": \"your-key-here\"}"
},
"transport": "stdio"
}
}
}#### With Username/Password Authentication
{
"mcpServers": {
"secure_api": {
"command": "full_path_to_openapi_mcp/venv/bin/python",
"args": ["full_path_to_openapi_mcp/src/openapi_mcp/fastmcp_server.py"],
"env": {
"SERVER_NAME": "secure_api",
"OPENAPI_URL": "https://api.example.com/openapi.json",
"API_USERNAME": "your_username",
"API_PASSWORD": "your_password"
},
"transport": "stdio"
}
}
}#### With OAuth2 Authentication
{
"mcpServers": {
"oauth_api": {
"command": "full_path_to_openapi_mcp/venv/bin/python",
"args": ["full_path_to_openapi_mcp/src/openapi_mcp/fastmcp_server.py"],
"env": {
"SERVER_NAME": "oauth_api",
"OPENAPI_URL": "https://api.example.com/openapi.json",
"OAUTH_CLIENT_ID": "your_client_id",
"OAUTH_CLIENT_SECRET": "your_client_secret",
"OAUTH_TOKEN_URL": "https://api.example.com/oauth/token"
},
"transport": "stdio"
}
}
}#### Multiple API Servers with MCP HTTP Transport
Configure multiple OpenAPI services to run simultaneously:
{
"mcpServers": {
"weather": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8001/sse"
]
},
"petstore": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8002/sse"
]
}
}
}This configuration gives Claude access to both weather data AND petstore API tools simultaneously, with clear tool naming like weather_get__compact and petstore_addPet.
#### Single API Server with MCP HTTP Transport
For a single API service:
Standard SSE Configuration:
{
"mcpServers": {
"openapi_service": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8001/sse"
]
}
}
}Streamable HTTP Configuration:
{
"mcpServers": {
"openapi_service": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8001/mcp"
]
}
}
}With Debugging (for development):
{
"mcpServers": {
"openapi_service": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8001/sse",
"--debug"
]
}
}
}With Custom Transport Strategy:
{
"mcpServers": {
"openapi_service": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8001/mcp",
"--transport",
"streamable-http"
]
}
}
}#### With Legacy SSE Streaming (Deprecated)
{
"mcpServers": {
"streaming_api": {
"command": "full_path_to_openapi_mcp/venv/bin/python",
"args": ["full_path_to_openapi_mcp/src/openapi_mcp/fastmcp_server.py"],
"env": {
"SERVER_NAME": "streaming_api",
"OPENAPI_URL": "https://api.example.com/openapi.json",
"SSE_ENABLED": "true",
"SSE_HOST": "127.0.0.1",
"SSE_PORT": "8001"
},
"transport": "stdio"
}
}
}Apply this configuration to the following files:
~/.cursor/mcp.json~/.codeium/windsurf/mcp_config.json~/Library/Application Support/Claude/claude_desktop_config.jsonReplace full_path_to_openapi_mcp with your actual installation path.Copy the provided example configuration:
cp claude_desktop_config.json ~/Library/Application\ Support/Claude/claude_desktop_config.jsonStart both services:
# Terminal 1
source venv/bin/activate && \
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8001" \
python src/openapi_mcp/fastmcp_server.py
# Terminal 2
source venv/bin/activate && \
OPENAPI_URL="https://petstore3.swagger.io/api/v3/openapi.json" \
SERVER_NAME="petstore" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8002" \
python src/openapi_mcp/fastmcp_server.pyResult: Claude gets access to both weather and petstore APIs with prefixed tool names.
#### Core Configuration
| Variable | Description | Required | Default |
|---|---|---|---|
OPENAPI_URL | URL or local file path to OpenAPI specification | Yes | - |
SERVER_NAME | MCP server name | No | openapi_proxy_server |
#### OAuth2 Authentication
| Variable | Description | Required | Default |
|---|---|---|---|
OAUTH_CLIENT_ID | OAuth client ID | No | - |
OAUTH_CLIENT_SECRET | OAuth client secret | No | - |
OAUTH_TOKEN_URL | OAuth token endpoint URL | No | - |
OAUTH_SCOPE | OAuth scope | No | api |
#### Username/Password Authentication
| Variable | Description | Required | Default |
|---|---|---|---|
API_USERNAME | API username for authentication | No | - |
API_PASSWORD | API password for authentication | No | - |
API_LOGIN_ENDPOINT | Login endpoint URL | No | Auto-detected |
#### Custom Authentication Headers
| Variable | Description | Required | Default |
|---|---|---|---|
MCP_AUTH_HEADERS | Custom authentication headers (JSON or key=value format) | No | - |
#### MCP HTTP Transport (Recommended)
| Variable | Description | Required | Default |
|---|---|---|---|
MCP_HTTP_ENABLED | Enable MCP HTTP transport | No | false |
MCP_HTTP_HOST | MCP HTTP server host | No | 127.0.0.1 |
MCP_HTTP_PORT | MCP HTTP server port | No | 8000 |
MCP_CORS_ORIGINS | CORS origins (comma-separated) | No | * |
MCP_MESSAGE_SIZE_LIMIT | Message size limit | No | 4mb |
MCP_BATCH_TIMEOUT | Batch timeout in seconds | No | 30 |
MCP_SESSION_TIMEOUT | Session timeout in seconds | No | 3600 |
#### Legacy SSE Support (Deprecated)
| Variable | Description | Required | Default |
|---|---|---|---|
SSE_ENABLED | Enable SSE streaming support | No | false |
SSE_HOST | SSE server host | No | 127.0.0.1 |
SSE_PORT | SSE server port | No | 8000 |
You can now load OpenAPI specs from your local filesystem instead of requiring remote URLs:
source venv/bin/activate
OPENAPI_URL="./specs/my-api.json" \
SERVER_NAME="local_api" \
python src/openapi_mcp/fastmcp_server.pysource venv/bin/activate
OPENAPI_URL="../shared/api.yaml" \
SERVER_NAME="local_api" \
python src/openapi_mcp/fastmcp_server.pysource venv/bin/activate
OPENAPI_URL="/Users/myuser/projects/api-spec.json" \
SERVER_NAME="local_api" \
python src/openapi_mcp/fastmcp_server.py.json extension.yaml or .yml extension./path/to/spec.yaml, ../spec.json/full/path/to/spec.yamlSupport for APIs requiring custom headers (API keys, tokens, etc.):
source venv/bin/activate
MCP_AUTH_HEADERS='{"X-API-Key": "your-api-key", "X-Client-ID": "client123"}' \
OPENAPI_URL="https://api.example.com/openapi.json" \
SERVER_NAME="custom_api" \
python src/openapi_mcp/fastmcp_server.pysource venv/bin/activate
MCP_AUTH_HEADERS='X-API-Key=your-api-key,X-Client-ID=client123' \
OPENAPI_URL="https://api.example.com/openapi.json" \
SERVER_NAME="custom_api" \
python src/openapi_mcp/fastmcp_server.pyMCP_AUTH_HEADERS='{"X-RapidAPI-Key": "your-key"}'MCP_AUTH_HEADERS='{"Authorization": "Bearer custom-token"}'MCP_AUTH_HEADERS='{"X-API-Key": "key", "X-API-Secret": "secret"}'Combine both features for development:
source venv/bin/activate
OPENAPI_URL="./test/fixtures/api.json" \
MCP_AUTH_HEADERS='{"X-API-Key": "dev-key"}' \
SERVER_NAME="dev_api" \
python src/openapi_mcp/fastmcp_server.pyTest with real weather data (no authentication required):
# Start weather server
source venv/bin/activate && \
OPENAPI_URL="https://api.met.no/weatherapi/locationforecast/2.0/swagger" \
SERVER_NAME="weather" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8001" \
python src/openapi_mcp/fastmcp_server.pyAvailable tools:
weather_get__compact - Weather forecast for coordinatesweather_get__complete - Detailed weather forecastweather_get__status - Server statusExample usage in Claude:
Test with Swagger's demo API:
# Start petstore server
source venv/bin/activate && \
OPENAPI_URL="https://petstore3.swagger.io/api/v3/openapi.json" \
SERVER_NAME="petstore" \
MCP_HTTP_ENABLED="true" \
MCP_HTTP_PORT="8002" \
python src/openapi_mcp/fastmcp_server.pyAvailable tools:
petstore_addPet - Add a new pet to the storepetstore_findPetsByStatus - Find pets by statuspetstore_getPetById - Find pet by IDsrc/
├── fastmcp_server.py # FastMCP-based main server (recommended)
├── server.py # Legacy MCP server (fallback)
├── config.py # Configuration management
├── auth.py # OAuth authentication handling
├── openapi_loader.py # OpenAPI spec loading and parsing
├── request_handler.py # Request preparation and validation
├── schema_converter.py # Schema conversion utilities
├── exceptions.py # Custom exception hierarchy
└── __init__.py # Package initialization✅ FastMCP Integration - Uses latest FastMCP framework ✅ Automatic Tool Registration - Converts OpenAPI operations to MCP tools ✅ Multi-Transport Support - stdio, HTTP, SSE ✅ Parameter Validation - Type conversion and validation ✅ Error Handling - Comprehensive JSON-RPC error responses ✅ Authentication - OAuth2 and username/password support
sequenceDiagram
participant LLM as LLM (Claude/GPT)
participant MCP as OpenAPI-MCP Proxy
participant API as External API
Note over LLM, API: Communication Process
LLM->>MCP: 1. Initialize (initialize)
MCP-->>LLM: Metadata, tools, resources, and prompts
LLM->>MCP: 2. Request tools (tools_list)
MCP-->>LLM: Detailed list of tools, resources, and prompts
LLM->>MCP: 3. Call tool (tools_call)
alt With OAuth2
MCP->>API: Request OAuth2 token
API-->>MCP: Access Token
end
MCP->>API: 4. Execute API call with proper formatting
API-->>MCP: 5. API response (JSON)
alt Type Conversion
MCP->>MCP: 6. Convert parameters to correct data types
end
MCP-->>LLM: 7. Formatted response from API
alt Dry Run Mode
LLM->>MCP: Call with dry_run=true
MCP-->>LLM: Display request information without executing call
endThe server automatically generates comprehensive metadata to enhance AI integration:
/resource/{server_name}_{schema_name})
# Docker production deployment
docker-compose up -d
# Or with custom configuration
docker run -d \
-e OPENAPI_URL="https://your-api.com/openapi.json" \
-e SERVER_NAME="your_api" \
-e MCP_HTTP_ENABLED="true" \
-e MCP_HTTP_PORT="8001" \
-p 8001:8001 \
openapi-mcp:latestGET /health❌ `RequestHandler.prepare_request() missing arguments`
# Solution: Use fastmcp_server.py instead of server.py
python src/openapi_mcp/fastmcp_server.py # ✅ Correct❌ Claude Desktop doesn't see the tools
# Check configuration location
ls ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Restart Claude Desktop after config changes❌ Connection refused on port 8001
# Check if server is running
lsof -i :8001
# Check server logs for errors❌ SSL/TLS errors with OpenAPI URLs
# Update certificates
pip install --upgrade certifi httpxTest server initialization:
python test_weather_oslo.pyTest with mcp-remote:
npx mcp-remote http://127.0.0.1:8001/sseCheck available tools:
curl http://127.0.0.1:8001/healthPython version mismatch:
# Ensure Python 3.12+
python --version
# Recreate virtual environment if needed
rm -rf venv && python3.12 -m venv venvMissing dependencies:
# Reinstall requirements
pip install --upgrade -r requirements.txtgit checkout -b feature/amazing-featuregit commit -m 'Add amazing feature'git push origin feature/amazing-featureIf you find it useful, please give it a ⭐ on GitHub!
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.