Enables interaction with any REST API documented via Swagger or OpenAPI specifications, allowing for automatic endpoint discovery and execution of API requests with support for various authentication methods.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenAPI MCP Serverlist all available API endpoints and their parameters"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenAPI MCP Server
A generic Model Context Protocol (MCP) server that exposes any OpenAPI-documented REST API to LLMs like Claude.
Features
Auto-discovers endpoints from any OpenAPI 3.x specification (YAML or JSON)
Two simple tools:
api_discoverandapi_requestFlexible authentication: None, API Key, or Bearer token
Caching: Caches OpenAPI spec locally with configurable TTL
Retry logic: Automatic retry on rate limits (429) with exponential backoff
Installation
Or run directly with npx:
Configuration
The server is configured via environment variables:
Required
Variable | Description | Example |
| Base URL of the API |
|
Optional
Variable | Description | Default |
| Path to OpenAPI spec |
|
| Authentication type: |
|
| API key (when | - |
| Header name for API key |
|
| Bearer token (when | - |
| Request timeout in milliseconds |
|
| OpenAPI spec cache TTL |
|
Usage with Claude Code
Add to your .mcp.json or Claude Code settings:
Example: Connecting to Hermes
Example: Connecting to a Protected API
Tools
api_discover
Lists all available API endpoints grouped by domain/tag.
Parameters:
domain(optional): Filter endpoints by domain/tagincludeParameters(optional): Include parameter details (default: false)
Example:
api_request
Makes an HTTP request to any API endpoint.
Parameters:
method(required): HTTP method (GET,POST,PUT,DELETE,PATCH)path(required): API path (e.g.,/api/users/{id})body(optional): Request body for POST/PUT/PATCHquery(optional): Query parameters as key-value pairspathParams(optional): Path parameter substitutions
Example:
Finding Your API's OpenAPI Spec
Common locations for OpenAPI specifications:
/openapi.yamlor/openapi.json/api/docs/openapi.yaml/swagger.json/v1/openapi.json/api-docs
Check your API's documentation or try accessing these paths directly.
Development
License
MIT
Author
CloudWarriors