Openapi MCP logo

Openapi MCP

by @kaisers-io

Converts trusted OpenAPI 3.x descriptions into locally running MCP tools for controlled HTTP API access.

Install Openapi MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "kaisers-io-openapi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@kaisers-io/openapi-mcp@0.12.1"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

The install command installed and started the server, which then stopped for configuration (such as an API key) that our sandbox does not have — expected for servers that connect to your account.

npx -y @kaisers-io/openapi-mcp@0.12.1

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked Today.

Overview

@kaisers-io/openapi-mcp turns an OpenAPI 3.0, 3.1, or 3.2 description from a URL or local file into a local MCP server. It exposes permitted API operations as agent-callable tools, validates request arguments against the operation schema, and can validate responses when a schema is available. Read operations are enabled by default, while method, path, tag, operation ID, and tool-name filters control broader access. Reach for it when an agent needs structured access to an existing HTTP API without generating or deploying adapter code.

Use cases

  • Connect an agent to an existing OpenAPI-described HTTP API
  • Restrict an agent to selected API operations
  • Preview exposed tools before starting a server
  • Validate API requests and responses against schemas
  • Reduce tool count for large APIs

Key features

  • OpenAPI 3.0, 3.1, and 3.2 support
  • Read-only exposure by default
  • Allow and deny operation filters
  • Schema validation for requests and responses
  • Environment- and file-based credential handling
  • Discovery and execute_code tool modes

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9h ago via OSV.dev · @kaisers-io/openapi-mcp@0.12.1 (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3Stargazers on the source repository.
npm downloads3.5kPackage downloads in the last 30 days.
Last commit1d agoMost recent push to the default branch.
Install checkRunsOur sandbox started it; it then asked for an API key or config.

How Openapi MCP works

What @kaisers-io/openapi-mcp does

@kaisers-io/openapi-mcp lets an MCP-compatible agent call an HTTP API through its OpenAPI description. Each permitted operation can become an MCP tool, so an API can be connected without writing a custom integration or generating source code. The description may come from a remote URL or a local file, and the server runs on the agent host.

The default exposure is read-only: GET, HEAD, and QUERY operations are available until additional methods are explicitly allowed. Access can be narrowed or expanded with selectors based on HTTP method, path, operation ID, tag, or generated tool name. Deny rules take precedence over allow rules.

How it works

The host starts the server from its MCP configuration. The server reads the selected OpenAPI description, turns permitted operations into tools, and sends requests to the API when the agent calls them. Before sending a request, it checks arguments against the operation schema and rejects fields the operation does not define. Responses are also checked when the description provides a usable response schema.

Credentials can be supplied through named environment variables or protected files. Secret values are kept out of tool definitions and redacted from results, errors, and logs. For a remote description, specifying a base URL is required when passing an API token so the description cannot redirect the credential to another destination.

The server retains the accepted description when the API specification changes, allowing updates to be reviewed before they take effect. Large APIs can use discovery mode, which exposes a smaller fixed set of tools, while execute_code can combine multiple API calls and return only the resulting data.

Setup and configuration

Node.js 22.19 or later, or Node.js 24.11 or later, is required; Node.js 23 is unsupported. macOS, Linux, and Windows are supported. The package can be run with npx, so a separate installation is not required.

Preview the generated tools with:

Terminal
npx -y @kaisers-io/openapi-mcp@latest tools --spec https://api.example.com/openapi.json

Start it from an MCP host using the serve command and the same --spec option. If the description lacks an absolute server URL, add --base-url. Use check instead of serve to validate the configuration without starting the server.

For credentials, map a request header to an environment variable with --header-env, or use the supported file-based header option. The host must pass the environment variable through to the MCP process. Additional configuration covers specification headers, upstream OAuth client credentials, HTTP transport tokens, filters, timeouts, retries, and multiple APIs.

Tools and capabilities

  • Converts OpenAPI 3.0, 3.1, and 3.2 operations into MCP tools.
  • Reads specifications from URLs or local files.
  • Provides tools, check, and serve command-line workflows.
  • Defaults to GET, HEAD, and QUERY operations.
  • Filters exposure with allow and deny selectors.
  • Validates request arguments and applicable responses against schemas.
  • Redacts configured credentials from model-visible output, errors, and logs.
  • Supports discovery and execute_code modes for APIs with many operations.
  • Supports local stdio use and serving over HTTP.
  • Supports API keys, bearer tokens, and OAuth client credentials.

Limitations and notes

Swagger 2.0 descriptions are not supported. The OpenAPI description is partly treated as model-facing content: operation names, summaries, and parameter text are placed before the agent, so only descriptions from trusted sources should be used.

The server does not deploy an API or generate adapter code. Its behavior depends on the selected specification, filters, base URL, credential configuration, and MCP host settings. Other platforms may be refused because they are untested.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Openapi MCP

@kaisers-io/openapi-mcp is an MCP server that connects AI agents to HTTP APIs described by OpenAPI 3.0, 3.1, or 3.2 documents. It exposes permitted API operations as MCP tools, validates request arguments, can validate responses, and supports discovery and execute_code modes for larger APIs.

Run it with npx rather than installing a separate executable: `npx -y @kaisers-io/openapi-mcp@latest serve --spec <URL-or-file>`. Add that command to your MCP host configuration, or use the package's `tools` command to preview exposed operations first.

Use `--allow` and `--deny` selectors with the `tools` or `serve` command. Selectors can match methods, paths, operation IDs, tags, or tool names; deny rules take precedence, and any allow rule replaces the default read-only exposure.

Map a request header to an environment variable with `--header-env`, then pass that variable through the MCP host. For a remote specification, also provide `--base-url`; the server sends the variable's value as the configured header and keeps it out of tool definitions and logs.

Yes. The server is documented for Claude Desktop, Cursor, Codex, Claude Code, VS Code, and Gemini CLI. These clients start it through their MCP configuration, typically with `npx`, the `serve` command, and a specification URL or file.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOpenapi MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/kaisers-io-openapi-mcp?style=directory)](https://allmcps.com/mcp/kaisers-io-openapi-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/kaisers-io-openapi-mcp"><img src="https://allmcps.com/api/badge/kaisers-io-openapi-mcp?style=directory" alt="Openapi MCP on AllMCPs" /></a>