@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.
What OpenAPI MCP Does
Two read-only MCP tools, indexed resources, four workflow prompts, and CLI commands (`serve`, `check`, `diff`) built on a reusable TypeScript engine.
Endpoint & Schema Indexes
Browse endpoints, status codes, auth schemes, and component schemas with paginated search—soft-capped at 64 KB so prompts never overflow.
openapi://endpoints/index · openapi://schemas/indexSandboxed Local Queries
Run read-only JavaScript queries in a QuickJS WASM sandbox with built-in helpers (helpers.op, helpers.example, helpers.schemaRefs).
openapi_queryBreaking-Change Diffs
Compare two local OpenAPI files and classify changes into breaking vs non-breaking—both inside AI agent chats and in CI pipelines.
openapi_diff · openapi-mcp diffSingle-Pass Spec Diagnostics
Catch broken $refs, duplicate operationIds, undeclared path params, unknown security schemes, and missing 4xx/5xx error contracts in one pass.
openapi://spec/diagnostics · openapi-mcp checkSupported Specifications
Resolves local multi-file `$ref` links safely inside your workspace boundary (remote URLs and path traversal are rejected).
Full local $ref resolution, sibling keywords alongside $ref via allOf, deterministic JSON examples.
YAML and JSON parsing with 1-based file/line source locations, path + operation parameter merging.
Definitions schema index, reverse schema usage tracking, diagnostics, and semantic diffing.
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 install -g @dimassetoid/openapi-mcpbun add -g @dimassetoid/openapi-mcpcurl -fsSL https://raw.githubusercontent.com/Shironim/openapi-mcp/master/scripts/install.sh | sh{
"mcpServers": {
"openapi-mcp": {
"command": "openapi-mcp",
"args": ["serve", "--root", "/path/to/repo"]
}
}
}