OpenAPI MCP

v1.14.0APIsstable

A generic MCP server that dynamically exposes any OpenAPI-documented REST API to LLMs by auto-discovering endpoints. It provides tools for exploring API capabilities and making authenticated requests directly through natural language interfaces.

openapi-mcp-servermcpai-integration
Share:
262
Stars
0
Downloads
0
Weekly
0/5

What is OpenAPI MCP?

OpenAPI MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to generic mcp server that dynamically exposes any openapi-documented rest api to llms by auto-discovering endpoints. it provides tools for exploring api capabilities and making authenticated requests di...

A generic MCP server that dynamically exposes any OpenAPI-documented REST API to LLMs by auto-discovering endpoints. It provides tools for exploring API capabilities and making authenticated requests directly through natural language interfaces.

This server falls under the APIs and Developer Tools categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A generic MCP server that dynamically exposes any OpenAPI-do

Use Cases

Auto-discover OpenAPI endpoints
Make authenticated API requests via natural language
ivo-toby

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.14.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y @ivotoby/openapi-mcp-server

Manual Installation

npx -y @ivotoby/openapi-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use OpenAPI MCP

The OpenAPI MCP Server is a generic bridge that dynamically converts any OpenAPI-documented REST API into MCP tools accessible to LLMs, without writing custom integration code. It reads an OpenAPI specification (local file or remote URL), auto-generates callable tools from each endpoint, and handles authentication headers and TLS configuration transparently. Teams use it to give AI assistants direct, authenticated access to internal or third-party APIs described by an OpenAPI spec — turning natural language requests into real API calls instantly.

Prerequisites

  • Node.js 18 or later installed
  • An OpenAPI 3.x or Swagger 2.x specification file (URL or local path) for the API you want to expose
  • API authentication credentials (e.g., Bearer token, API key) if the target API requires auth
  • An MCP-compatible client such as Claude Desktop or Claude Code
1

Run the server via npx (no install required)

The simplest way to start the OpenAPI MCP server is with npx, pointing it at your API's base URL and OpenAPI spec. No global install is needed.

npx @ivotoby/openapi-mcp-server \
  --api-base-url https://api.example.com \
  --openapi-spec https://api.example.com/openapi.json \
  --headers "Authorization:Bearer YOUR_TOKEN"
2

Choose a tools mode

Set `--tools` to control how endpoints become tools. Use `all` (default) to expose every endpoint as a separate tool, `dynamic` to expose three meta-tools for exploring and invoking endpoints on demand, or `explicit` to whitelist specific tools.

# Dynamic mode — exposes list-api-endpoints, get-api-endpoint-schema, invoke-api-endpoint
npx @ivotoby/openapi-mcp-server \
  --api-base-url https://api.example.com \
  --openapi-spec https://api.example.com/openapi.json \
  --tools dynamic
3

Configure authentication headers

Pass authentication headers as comma-separated `key:value` pairs using `--headers`. Multiple headers can be included in a single flag.

npx @ivotoby/openapi-mcp-server \
  --api-base-url https://api.example.com \
  --openapi-spec ./openapi.json \
  --headers "Authorization:Bearer token123,X-Api-Version:2024-01"
4

Add the server to your MCP client config

Register the OpenAPI MCP server in your `claude_desktop_config.json`. Pass the API base URL, spec path, and any auth headers as environment variables or arguments.

5

Test with HTTP transport (optional)

For remote or shared deployments, switch to HTTP transport. The server will listen on the specified port and accept MCP connections over HTTP instead of stdio.

npx @ivotoby/openapi-mcp-server \
  --api-base-url https://api.example.com \
  --openapi-spec https://api.example.com/openapi.json \
  --transport http \
  --port 3000

OpenAPI MCP Examples

Client configuration

Add the OpenAPI MCP server to claude_desktop_config.json. Set API_BASE_URL, OPENAPI_SPEC_PATH, and API_HEADERS as environment variables for a clean config.

{
  "mcpServers": {
    "openapi": {
      "command": "npx",
      "args": ["-y", "@ivotoby/openapi-mcp-server"],
      "env": {
        "API_BASE_URL": "https://api.example.com",
        "OPENAPI_SPEC_PATH": "https://api.example.com/openapi.json",
        "API_HEADERS": "Authorization:Bearer YOUR_TOKEN",
        "TOOLS_MODE": "all"
      }
    }
  }
}

Prompts to try

Once configured, use these prompts to interact with your API through natural language.

- "List all available endpoints in this API"
- "Get the schema for the POST /users endpoint"
- "Create a new user with name 'Alice' and email '[email protected]'"
- "Fetch the details for order ID 12345"
- "What authentication methods does this API support?"

Troubleshooting OpenAPI MCP

The server fails to start with 'Cannot read OpenAPI spec'

Verify that OPENAPI_SPEC_PATH points to a valid, accessible OpenAPI 3.x or Swagger 2.x JSON/YAML file. If using a remote URL, ensure it is publicly accessible or that any required auth headers are passed with --headers. Try downloading the spec locally first.

API calls return 401 Unauthorized

Check that the API_HEADERS environment variable (or --headers flag) includes the correct authentication header in `key:value` format, e.g. `Authorization:Bearer YOUR_TOKEN`. For mTLS-protected APIs, also set CLIENT_CERT_PATH and CLIENT_KEY_PATH.

Too many tools are generated and the LLM context is overloaded

Switch to dynamic mode by setting TOOLS_MODE=dynamic (or --tools dynamic). This exposes only three meta-tools — list-api-endpoints, get-api-endpoint-schema, invoke-api-endpoint — letting the LLM discover and call endpoints on demand without loading all tool definitions at once.

Frequently Asked Questions about OpenAPI MCP

What is OpenAPI MCP?

OpenAPI MCP is a Model Context Protocol (MCP) server that generic mcp server that dynamically exposes any openapi-documented rest api to llms by auto-discovering endpoints. it provides tools for exploring api capabilities and making authenticated requests directly through natural language interfaces. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install OpenAPI MCP?

Install via npm with the command: npx -y @ivotoby/openapi-mcp-server. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with OpenAPI MCP?

OpenAPI MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is OpenAPI MCP free to use?

Yes, OpenAPI MCP is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More APIs MCP Servers

Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "openapi-mcp-server": { "command": "npx", "args": ["-y", "@ivotoby/openapi-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use OpenAPI MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides