@dimassetoid/openapi-mcp · v0.1.0

Query, validate, and diff OpenAPI specs locally.

OpenAPI MCP is a local MCP server, CLI, and TypeScript engine for OpenAPI 3.0, 3.1, and Swagger 2.0. It lets AI coding agents and CI pipelines search endpoints, inspect schemas, generate sample payloads, and catch breaking changes without loading full spec files into context.

Supported Specifications

Resolves local multi-file `$ref` links safely inside your workspace boundary (remote URLs and path traversal are rejected).

OpenAPI 3.1

Full local $ref resolution, sibling keywords alongside $ref via allOf, deterministic JSON examples.

OpenAPI 3.0

YAML and JSON parsing with 1-based file/line source locations, path + operation parameter merging.

Swagger 2.0

Definitions schema index, reverse schema usage tracking, diagnostics, and semantic diffing.

Monorepos

Automatic workspace spec catalog (openapi://specs/catalog) with per-request spec_path selection.

Installation

Install via npm, Bun, or standalone binary (requires Node.js >= 18.20 or Bun >= 1.4.3 for package installs).

npm
npm install -g @dimassetoid/openapi-mcp
Bun
bun add -g @dimassetoid/openapi-mcp
Standalone Binary (Linux / macOS)
curl -fsSL https://raw.githubusercontent.com/Shironim/openapi-mcp/master/scripts/install.sh | sh
MCP Client Configuration
{
  "mcpServers": {
    "openapi-mcp": {
      "command": "openapi-mcp",
      "args": ["serve", "--root", "/path/to/repo"]
    }
  }
}