openapi-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@openapi-mcp Which endpoint creates an order, and what does its 422 response schema look like?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
openapi-mcp
Local OpenAPI contract inspection for AI coding agents.
openapi-mcp is a local MCP server that helps coding agents work with the APIs documented in your repository. It reads OpenAPI files in YAML or JSON, follows local references across files, and builds an index of operations. An agent can find an endpoint and inspect the part of its contract needed for a change.
What It Does
Service discovery. The workspace catalog lists OpenAPI files across a monorepo. If Billing and Sales both define
GET /invoices, the agent can select Billing’s specification for its request.Endpoint search. The endpoint index shows methods, paths, summaries, and declared response statuses. Agents can search by text, tag, or operation ID and page through matching operations.
Request and response inspection (
openapi_query). This read-only tool lets an agent inspect parameters, request bodies, and response schemas. For example, before changing a checkout form, it can look up which fields the orders API declares in its422response.Integration review. The
sync-frontend-apiprompt guides an agent through comparing a frontend caller with the documented contract. Theaudit-error-contractsprompt guides it through checking which error responses declare a status and which also describe the response body.
Related MCP server: swagger-openapi-mcp
Installation
Install the package with npm:
npm install -g @dimassetoid/openapi-mcpA standalone executable is also available for Linux, macOS, and Windows. Standalone and Bun installation instructions
Quick Start
Configure your MCP client to run openapi-mcp serve --root /path/to/repo. Replace the path with the repository containing your OpenAPI files. Once connected, try asking your agent:
Which endpoint creates an order, and what does its specification say happens when validation fails?
For a monorepo, include the service name in your question so the agent can select its spec. MCP client configuration · Monorepo setup
CLI Reference
Command | Purpose |
| Start the MCP server in the current workspace. |
| Set the workspace and default specification. |
| Show usage and options. |
| Print the installed version. |
Documentation
Development
# Clone the repository and install dependencies
git clone https://github.com/Shironim/openapi-mcp.git
cd openapi-mcp
bun install
# Run tests, check types, and build the package
bun test
bun run typecheck
bun run buildStandalone builds and package verification
License
Available Tools
1 toolopenapi_queryARead-onlyIdempotent
Query the resolved, read-only OpenAPI spec using synchronous JavaScript. Inspect the default endpoint index or query a specific path, request schema, or response schema.
Inputs: code (required), root, max_bytes, spec_path.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool there is no possibility of misselection between competing tools. The single tool cleanly covers the whole surface (index, path, request schema, response schema) through one entry point rather than fragmenting into overlapping tools.
The lone name 'openapi_query' is clear, snake_case, and domain-prefixed. It uses a noun_verb order rather than the more common verb_noun, and a single name gives no pattern to verify consistency against, so it falls just short of a 5.
A single general-purpose JavaScript query tool is a defensible minimal design that subsumes many specific operations. However, it is thin for an API-inspection server — no dedicated helpers for listing endpoints or fetching schemas — pushing it to the borderline range.
The server explicitly scopes itself to read-only querying of a resolved OpenAPI spec, and arbitrary JS over the spec can reach endpoints, paths, and request/response schemas. Minor gaps exist (e.g., no explicit security-scheme or validation/operationId lookup helpers), but nothing blocks core inspection workflows.
Maintenance
Related MCP Connectors
Paid OpenAPI audit and API change detection for agents. $0.10 USDC per analysis via x402 on Base.
Discover, compare, and monitor 1,400+ APIs directly from your AI coding agent.
Discover, compare, route, and execute machine-accessible capabilities for AI agents.
Detect breaking changes, generate changelogs, diff, and validate OpenAPI specs.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to discover, search, and interact with REST APIs by parsing OpenAPI/Swagger specifications with intelligent fuzzy search across endpoints, supporting both local and remote API sources.5 npm2MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI to scan and query local OpenAPI/Swagger documentation, listing API groups and endpoints, and generating TypeScript type definitions for specific endpoints.-
- AlicenseNot gradedqualityCmaintenanceProvides AI coding agents with accurate OpenAPI contract details to prevent hallucinated API calls, supporting multi-version pinning, endpoint discovery, and request validation.42 npmApache 2.0
- FlicenseAqualityDmaintenanceEnables LLMs to dereference and query OpenAPI/Swagger specifications, search endpoints and schemas, validate payloads, extract security schemes, and generate production-ready integration code in multiple languages.8-