openapi-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Workspace root directory containing the OpenAPI files (CLI flag: --root <dir>). Defaults to the current workspace. | |
| spec | No | Path to the default OpenAPI specification (CLI flag: --spec <path>). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Use openapi-mcp in local Code Mode (index-first, query-on-demand): For monorepos read openapi://specs/catalog, then use the selected spec_path for index, search and query. Discover endpoints in the default spec with openapi://endpoints/search?q=orders&limit=20 and follow nextUri. Error status counts indicate declarations only. Check errorBodies and query the response for field details.
Read the
openapi://endpoints/indexresource for the default specification. In a monorepo, pass the same spec_path to index, search, and openapi_query.Use
openapi_querywith targeted JavaScript queries againstspecto fetch request parameters/body,2xxsuccess schemas, AND all4xx/5xxerror schemas (for examplespec.paths["/orders"]?.post?.responses).Keep queries scoped to specific paths or component schemas. The default
max_bytesis 16384 UTF-8 bytes of result text.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| prompts | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| openapi_queryA | 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. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| sync-frontend-api | Guide frontend-backend contract sync: read endpoint index, query request + 2xx + 4xx/5xx error schemas with openapi_query, and update frontend callers. |
| audit-error-contracts | Audit completeness and schema consistency of 4xx/5xx error responses across openapi.yml endpoints. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| OpenAPI Endpoints Index | Compact index of all OpenAPI endpoints in `METHOD /path — summary — [200, 400, 404, 422, 500]` format, including all 4xx/5xx error status codes. |
| Workspace OpenAPI files | List conventional entry filenames relative to the workspace root. |
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.