Openapi MCP Server

Generates MCP server code from OpenAPI specifications

Local serverstdioTypeScript

What is the Openapi MCP server?

Generates MCP server code from OpenAPI specifications. Exposed over MCP by the openapi mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

Generate Model Context Protocol (MCP) servers from OpenAPI specifications.

Its toolset

Everything the assistant can do here goes through one of these:

  • Extension — x-mcp: true | false
  • Default — true (include by default)
  • Precedence — operation > path > root (first non-undefined wins)
  • StreamableHTTP — The StreamableHTTP tool exposed by this server

Configuration

You will need one environment variable: API_BASE_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Adding it to your client

Installation goes through your MCP client rather than a global install: point it at openapi-mcp-generator on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

When to reach for it

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Openapi's toolset — Extension, Default, Precedence and 1 more — is a fair guide to whether it matches your workflow. It is maintained by harshasurisetty; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Openapi's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the openapi mcp server does with a few real requests.

Available tools

ToolWhat it does
Extensionx-mcp: true | false
Defaulttrue (include by default)
Precedenceoperation > path > root (first non-undefined wins)
StreamableHTTPThe StreamableHTTP tool exposed by this server.

How to install the Openapi MCP server

{
  "mcpServers": {
    "openapi-mcp-generator": {
      "command": "npx",
      "args": ["-y", "openapi-mcp-generator"],
      "env": {
        "API_BASE_URL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
API_BASE_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Openapi to Extension.
  • Use Openapi to Default.
  • Use Openapi to Precedence.

Frequently asked questions

It connects Openapi to MCP-compatible AI assistants such as Claude and Cursor, exposing 4 tools (Extension, Default, Precedence, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Openapi directly.