openapi-swagger-mcp
Lets an AI agent read Swagger 2.0, OpenAPI 3.0 and OpenAPI 3.1 specs: list configured services and spec revisions, search operations by service, method, tag or query, inspect an operation's contract (path/query/header parameters and JSON, form, multipart or binary request bodies), and send real authenticated requests to the dev/UAT APIs described by the spec. Authentication can be configured per service (e.g. bearer tokens from environment variables), with support for named auth profiles, interactive sessions, anonymous calls and negative testing via header overrides.
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-swagger-mcpFind the get-order-by-id operation in orders and show its contract"
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-swagger-mcp
A local MCP server that lets an AI agent read Swagger 2.0, OpenAPI 3.0 and OpenAPI 3.1 specs, find operations, inspect their contracts and send real requests to the dev/UAT services you configure.
You describe your APIs and how to authenticate in one YAML or JSON file. The agent works through ten fixed tools, so the tool count does not grow with the number of endpoints.
Before you start
You need:
Node.js 22.19 or newer and npm.
An API you can reach, and its Swagger/OpenAPI spec (a URL or a file).
An MCP client that can launch a local stdio server.
Use this only against dev/UAT services. The tools send real POST, PUT, PATCH and DELETE requests. There is no rollback and no server-side write gate. A confirmation prompt in your MCP client is the client's feature, not something this server enforces.
Think about where your data goes. Tool arguments and results can be stored in your AI provider's conversation history. Responses are not scrubbed of tokens or personal data. Read secrets from environment variables or files instead of pasting them into the conversation.
Related MCP server: mcp-swagger
Quick start
1. Create a config file
Save this as config.dev.yaml:
services:
orders:
baseUrl: http://localhost:8080/api/v1
spec: http://localhost:8080/v3/api-docsordersis the service name the agent uses in tool calls.baseUrlis where requests are really sent, including any prefix such as/api/v1.specis the Swagger/OpenAPI URL, or a file path such as./openapi.json.With no
authblock, requests are anonymous.
The URLs above are examples. They only work if your own API is running there, so replace them with your dev/UAT addresses.
2. Check the config
npx -y @nhan7777/openapi-swagger-mcp@0.1.0 --config /absolute/path/config.dev.yaml --checkok: true means the static checks passed. It does not mean the remote spec was fetched or any endpoint was verified: --check makes no network calls, does not log in, and does not create the artifact directory. See Troubleshooting for the report format and exit codes.
3. Add the server to your MCP client
For clients that use an mcpServers configuration, add this to the client's MCP config file (not to the YAML file above):
{
"mcpServers": {
"api-dev": {
"command": "npx",
"args": [
"-y",
"@nhan7777/openapi-swagger-mcp@0.1.0",
"--config",
"/absolute/path/config.dev.yaml"
]
}
}
}The file name and location depend on your client. If your client has a form for command, arguments and environment variables, enter the same values there. Not every client uses the mcpServers format, so adapt the snippet if yours differs. Use absolute paths so the server does not depend on the directory the client starts in.
This server uses stdio: the client starts the process and talks to it over stdin/stdout. There is no web UI and no HTTP port. stdout is reserved for MCP traffic and logs go to stderr. Do not add --check to the client entry, because that mode exits after checking.
4. Try it
Once the client is connected, ask:
List the configured APIs. Find the operation that returns order details in the orders service, read its contract, and propose a request. Do not send anything until I give you an order ID.
Configure your APIs
A fuller example with two services:
# yaml-language-server: $schema=/absolute/path/to/config.schema.json
version: 1 # optional
services:
orders:
baseUrl: https://orders.dev.example.test/api/v1
spec: https://orders.dev.example.test/v3/api-docs
auth:
bearer: { token: { fromEnv: ORDERS_TOKEN } }
catalog:
baseUrl: http://localhost:8081
spec: ./specs/catalog.yamlYAML (.yaml, .yml) and JSON are both supported. For JSON, add "$schema": "/absolute/path/to/config.schema.json" so your editor can suggest keys. See the complete example config and the JSON Schema.
Key rules:
Relative paths in the config resolve from the directory that contains the config file, not from where you run the command.
The URL comes from
baseUrl. The operationGET /orders/{id}withbaseUrl: https://host/api/v1callshttps://host/api/v1/orders/{id}. The server ignoresservers,hostandbasePathin the spec.baseUrlmust not contain a username, password, query or fragment.One environment per process. For dev and UAT, create two config files and two MCP entries (for example
api-devandapi-uat). Each process has its own credentials, cookies and artifacts. There is no--envflag and no tool for switching environments.A config change needs a restart of the MCP process.
refresh_specsonly reloads specs.
Pass a token from the environment
services:
orders:
baseUrl: https://orders.dev.example.test/api/v1
spec: https://orders.dev.example.test/v3/api-docs
auth:
bearer: { token: { fromEnv: ORDERS_TOKEN } }The server reads ORDERS_TOKEN from its own process environment. That is not the same as the environment of the shell where you tested the command: set it in the env field of the client entry, or wherever your client launches the process.
{
"mcpServers": {
"api-dev": {
"command": "npx",
"args": ["-y", "@nhan7777/openapi-swagger-mcp@0.1.0", "--config", "/absolute/path/config.dev.yaml"],
"env": { "ORDERS_TOKEN": "replace-with-your-dev-token" }
}
}
}The server does not load .env files. Changing the environment of another process does not change the environment of a running MCP server; restart it with the new values.
Other ways to install
The npx commands above download the pinned version on first use. Alternatives:
# Global install; the command is then `openapi-swagger-mcp`
npm install -g @nhan7777/openapi-swagger-mcp@0.1.0
# From a source checkout (see Development)
npm ci && npm run build
node /absolute/path/to/openapi-swagger-mcp/dist/cli.js --config /absolute/path/config.dev.yamlDo not install the unscoped npm package openapi-swagger-mcp. It belongs to someone else and is a different project. This package is @nhan7777/openapi-swagger-mcp.
Discover and call an operation
The normal flow
Step | Tool | Example arguments |
See services and revisions |
|
|
Find an operation |
|
|
Read its contract |
|
|
Send the request |
| See below |
A complete invoke_operation call:
{
"service": "orders",
"operation": "GET /orders/{id}",
"revision": "<revision-you-just-received>",
"input": {
"path": { "id": "demo-123" },
"query": { "includeItems": true },
"headers": { "X-Request-ID": "demo-request" }
}
}operation is the key returned by search, usually METHOD /path. It is not the operationId. revision is the spec revision, which stops you calling an operation based on an outdated contract. When the spec changes, call refresh_specs with {"service":"orders"}, then search or read the contract again to get the new revision. A failed refresh keeps the last valid snapshot.
search_operations accepts service, method, tag, includeDeprecated, limit and cursor. Pass nextCursor with the same query to get the next page. Changing the query or the revision invalidates an old cursor.
Request bodies
The snippets below are fragments that go inside input. They are not complete tool calls. A request has at most one body type.
Note the difference from auth recipes: invoke_operation.input.body uses the json.value and form.fields wrappers, while a recipe body uses plain json and form (see Login and refresh).
JSON:
{ "body": { "json": { "value": { "name": "demo", "quantity": 2 } } } }Form (application/x-www-form-urlencoded):
{ "body": { "form": { "fields": { "name": "demo", "tags": ["a", "b"] } } } }You can set contentType inside json or form to pick one of the media types the operation declares.
For multipart and binary uploads, first allow directories in the config and create them:
files:
uploadRoots: [./fixtures]
exportRoots: [./exports]Then pass absolute paths in the tool call.
Multipart:
{
"body": {
"multipart": {
"fields": { "description": "demo" },
"files": [
{ "field": "document", "path": "/absolute/path/fixtures/demo.pdf", "filename": "demo.pdf", "contentType": "application/pdf" }
]
}
}
}Binary:
{ "body": { "binary": { "file": "/absolute/path/fixtures/demo.bin", "contentType": "application/octet-stream" } } }The multipart files array may repeat the same field. Files outside uploadRoots, symlinks that escape a root, and protected files are refused. The media type must match what the operation declares, so read the contract before sending.
Choosing auth, and negative testing
invoke_operation.auth has four modes:
Mode | Behavior |
| Use the service's default auth, or anonymous if it has none |
| Use a named profile the service allows |
| Use an interactive session bound to the same service |
| Inherit no credentials or cookies. Data you pass explicitly in |
To test a wrong token, pass your own input.headers.Authorization. It overrides the matching credential for that request only, leaves managed credentials untouched, and does not trigger an automatic refresh.
The server serializes what you give it and does not fix your data. It adds no defaults, does no type coercion, and does not strip unknown fields or null. Omitting the body is different from sending {"json":{"value":null}}, which sends the bytes null. HTTP 4xx/5xx responses are real results and are not turned into "tool failed validation" errors.
Requests that cannot be sent safely are blocked locally: a missing path parameter, a path escape, CR/LF in a header, a media type the operation does not declare, or an attempt to override headers the transport manages.
Reading the result
sent: false: the request was not sent. Look aterror.codeanderror.message.http.statusandhttp.headers: the actual HTTP outcome.bodyView: the part of the response meant for the agent to read.diagnostics.requestanddiagnostics.response: spec-based checks, for diagnosis only. They do not replace the HTTP outcome. States arevalid,invalid,not_availableanderror.bodyComplete: false: the body is partial because of a limit or a stream error. Do not conclude the whole response was valid.authRecovery: the state of a background refresh after a 401. It does not mean the request was replayed.Network, TLS and timeout failures do not produce a fake HTTP status.
error.mayHaveBeenSentsays whether the request may already have left the machine. Be careful about retrying write operations.
Redirects are not followed by default. With followRedirects: true, only same-origin redirects are followed, within a limit: 303, and POST after 301/302, become GET; 307/308 keep the method and body. Credentials are never forwarded to another origin.
Authentication
Pick the approach that matches your API:
You have... | Use |
A ready bearer token, basic credentials, API key or cookies | |
A login or refresh endpoint to call | |
Several accounts, or credentials shared by several services | |
OTP, SSO, or a token you receive interactively |
Static credentials
Bearer token
auth:
bearer:
token: { fromEnv: ORDERS_TOKEN }The server adds Authorization: Bearer <token>. The source value holds only the token, without the Bearer prefix.
Basic authentication
auth:
basic:
username: tester
password: { fromEnv: API_PASSWORD }Username and password are read independently and Basic-encoded. Both can also come from a file or fromCredential. Only a Basic literal may be an empty string.
API key in a header, query string or cookie
auth:
apiKey:
header: X-API-Key
value: { fromEnv: API_KEY }Replace header with query or cookie if your API needs that. Each entry picks one destination. You can also use a list and combine methods:
auth:
bearer: { token: { fromEnv: ACCESS_TOKEN } }
apiKey:
- { header: X-CSRF-Token, value: { fromEnv: CSRF_TOKEN } }
- { query: tenant, value: demo }
cookies: trueBearer, API key and the cookie jar can be combined. Bearer and basic cannot, because both use Authorization. Header names that collide case-insensitively are rejected. Query and cookie names are case-sensitive.
Cookie jar
auth: { cookies: true } enables the auth's own cookie jar. It is not a raw Cookie string. It is normally paired with a login recipe that has capture.cookies: true (see below). A cookie-only auth is not considered logged in while the jar is empty. To import cookies you already have, use a session.
Secret sources
The same syntax works for token, value, username, password and the initial values in credentials:
Syntax | Meaning |
| Read an environment variable of the MCP process |
| Read a field from a JSON file |
| Read the JSON root. The file must contain a JSON value such as |
| A literal. Produces a warning based on the field name; the value is never logged |
| Use a named value from the current auth, usually captured by a recipe |
fromCredential cannot be used in initial credentials, in catalog credentialSources, or in spec-fetch auth. Env and file values for a binding must be strings; objects and numbers are not silently converted. A missing source never silently falls back to anonymous. Secret files are protected from upload and export, but you are responsible for their permissions, and you should not commit them.
Login and refresh
Use a recipe when you must call an API to obtain credentials. A username and password are not required: the body can be a grant code, client credentials, or whatever your API's contract needs.
Three parts have different roles:
auth: what to send on business requests.credentials: initial named values. They are not sent unless referenced.authentication/refresh: call one operation, then capture the result.
Example: grant code plus refresh token
services:
accounts:
baseUrl: https://accounts.dev.example.test
spec: https://accounts.dev.example.test/v3/api-docs
auth:
bearer: { token: { fromCredential: accessToken } }
apiKey: { header: X-CSRF-Token, value: { fromCredential: csrf } }
cookies: true
credentials:
grantCode: { fromEnv: GRANT_CODE }
authentication:
request:
operation: POST /session/exchange
body:
json:
grantCode: { fromCredential: grantCode }
capture:
credentials:
accessToken: { bodyPointer: /session/accessToken }
refreshToken: { bodyPointer: /session/refreshToken }
csrf: { header: X-CSRF-Token }
cookies: true
refresh:
request:
operation: POST /session/refresh
body:
form:
refresh_token: { fromCredential: refreshToken }
capture:
credentials:
accessToken: { bodyPointer: /access_token }
refreshToken: { bodyPointer: /refresh_token }Both operations must exist in the spec. A JSON Pointer such as /session/accessToken reads response.session.accessToken. The refresh token stays in the credential store. In this example it is sent only by the refresh recipe, never on business requests.
How to use it. The tool name comes first, followed by its JSON arguments. These are not shell commands.
authenticatewith{"service":"accounts"}.get_auth_statuswith{"service":"accounts"}until it stops reportingrecovering.When the state is
ready, call the API normally.To refresh manually:
authenticatewith{"service":"accounts","action":"refresh"}.
You can also ask the agent: "Authenticate the accounts service with the configured recipe, wait until it finishes, then report the status. Do not show any credentials."
Rules to remember
authenticateruns onlyauthentication. Without a recipe it reloads static sources. It never logs in automatically when a business call lacks credentials.action: refreshruns onlyrefresh. Without a refresh recipe it fails locally withAUTH_REFRESH_UNAVAILABLE.A 401 can start a background refresh, but the original request is never replayed automatically. The caller still receives the 401 plus
authRecovery. After the refresh finishes, you or the agent decide whether to call again.A 403, an anonymous request, a session, or a request with an
Authorizationoverride does not trigger a refresh.While a recipe runs, new business requests fail with
AUTH_RECOVERING. Calling the same action again joins the running one; a different action fails withAUTH_BUSY.A failed refresh does not retry in a loop. Request a retry explicitly with
authenticateand the right action.Captured credentials, cookies and binding updates are applied together. If a required capture is missing, nothing is applied partially. A credential not named in the capture keeps its old value, so to rotate a refresh token you must capture it again.
Header captures in managed recipes keep the header content as-is, including
Bearer. A scalar capture accepts a non-empty string or a finite number; numbers become strings.A recipe accepts HTTP 200-299 by default. Set
successStatuses: [200, 201]to change that. Recipes do not follow redirects, do not replay, and do not run prerequisite recipes.
Recipe requests. request supports service, operation, path, query, headers, cookies, body and auth.
servicedefaults to the service that owns the recipe. A recipe in a named profile must set it explicitly.request.authdefaults to anonymous and does not inherit the owner's bearer or cookies. To send them, declare the auth methods explicitly.cookies: trueuses the current jar.Templates are substituted in payloads:
{fromEnv},{fromFile,pointer?},{fromCredential}. Wrap a value as{literal: {fromEnv: "text"}}to send that object unchanged.A
fromCredentialname must be declared in initial credentials or in a capture. Authentication can only use credentials with an initial definition, not its own future captures. Refresh can use what authentication captured.A capture needs non-empty credentials or
cookies: true. Capturing cookies requires the owner to haveauth.cookies: true.An authentication capture starts a fresh cookie jar. A refresh keeps and updates the existing jar.
A recipe body takes one of these forms. They are alternatives, so do not paste all four into one recipe:
# JSON; you can add contentType next to json
body: { json: { name: demo } }
# application/x-www-form-urlencoded, for example client credentials
body:
form:
grant_type: client_credentials
client_id: { fromEnv: CLIENT_ID }
client_secret: { fromEnv: CLIENT_SECRET }
# Multipart; files must be under uploadRoots
body:
multipart:
fields: { note: demo }
files: [{ field: document, path: ./fixtures/demo.pdf }]
# Binary
body: { binary: { file: ./fixtures/demo.bin, contentType: application/octet-stream } }File paths in recipes are fixed configuration. They cannot come from credential substitution.
Multiple accounts and shared profiles
profiles:
qa:
auth: { bearer: { token: { fromEnv: QA_TOKEN } } }
admin:
auth: { bearer: { token: { fromEnv: ADMIN_TOKEN } } }
services:
orders:
baseUrl: https://orders.dev.example.test
spec: ./orders.json
auth:
profiles: [qa, admin]
defaultProfile: qa
reports:
baseUrl: https://reports.dev.example.test
spec: ./reports.json
auth: { profile: qa }A call to
orderswith no auth choice usesqa. To useadmin, pass"auth":{"mode":"profile","profileId":"admin"}toinvoke_operation.If a service lists
profilesbut has nodefaultProfile, requests are anonymous by default. The first profile is never picked for you. Auth tools aimed at that service ask you to name a profile.To control a profile directly, call
authenticateorget_auth_statuswith{"profile":"qa"}. Do not pass bothserviceandprofile.A profile is usable only on services that reference it. Two services using
qashare the same credentials, cookie jar and refresh task. Cookies are still scoped by domain and path.A named profile can have its own
credentials,authenticationandrefresh. For recipes, setrequest.serviceexplicitly; it may point to a separate identity service. That only lets the recipe call that operation. It does not give the identity service your business credentials.A service that references a profile must not also have its own
credentials,authenticationorrefresh. Put them in the profile.
OTP, SSO and interactive sessions
Use a session when an agent and a person must work through several steps: request an OTP, enter it, receive a token or cookie, then call the API. The server never requests an OTP, polls, opens a browser or solves a CAPTCHA by itself. A session is bound to one service.
Capture from a response
Call the operation that requests the OTP once, on explicit request, with
auth: {mode: anonymous}.The person provides the OTP. Call the verify operation with
invoke_operation:
{
"service": "accounts",
"operation": "POST /otp/verify",
"revision": "<revision>",
"auth": { "mode": "anonymous" },
"input": { "body": { "json": { "value": { "code": "<OTP-provided-by-the-user>" } } } },
"capture": {
"tokens": [
{ "id": "access", "type": "bearer", "from": "body", "pointer": "/token" }
],
"cookies": true
}
}Read
capture.sessionIdwhencapture.stateiscaptured.Call business operations with
auth: {mode: session, sessionId: ...}.
Enable capture.cookies only if the response really sets cookies. To capture a token from a header, use {"id":"access","type":"bearer","from":"header","header":"Authorization"}. Unlike managed recipes, a session's bearer-header capture strips the Bearer prefix. For an API key, use type: apiKey with in: header|query|cookie and name.
A capture applies only to 200-299 responses by default; set successStatuses to change that. A failed capture never updates a session partially. To update an existing session, add capture.sessionId.
Import credentials you already have
Prefer declaring a catalog in the config:
credentialSources:
qaToken: { fromEnv: QA_SESSION_TOKEN }Then call manage_session:
{
"action": "create",
"service": "accounts",
"credentialSourceIds": [{ "sourceId": "qaToken", "type": "bearer" }]
}Only ids declared in top-level credentialSources can be imported. Inline secrets in a service or profile, and captured refresh tokens, do not appear in the catalog automatically.
If you must import values directly (they may end up in AI conversation history):
{
"action": "create",
"service": "accounts",
"credentials": {
"components": [{ "id": "access", "type": "bearer", "value": "<token>" }],
"cookies": [{ "name": "sid", "value": "<cookie-value>" }]
}
}Inspect with {"action":"inspect","sessionId":"<id>"}, or omit sessionId to list sessions. Delete with {"action":"delete","sessionId":"<id>"}. Inspect returns metadata only, never secrets.
Sessions are bound to one service, do not refresh themselves, do not change managed profiles, and are never promoted to profiles. They live in memory and disappear when the process ends.
Large responses and files
The server stores responses as artifacts and returns a bounded view, so long files and base64 strings do not flood the conversation.
bodyTransformed: true: the view was shortened and is not the full response.omissions: which fields were shortened, why, their JSON Pointer and the artifact id.rawBodyArtifact: the response entity bytes after HTTP content decoding, with metadata and a SHA-256.
Read part of an artifact
Call read_artifact with a pointer:
{ "artifactId": "<id>", "pointer": "/data/status" }Or page through it:
{ "artifactId": "<id>", "offset": 0, "limit": 4096 }Use nextOffset from the result to continue. A pointer to a string returns text, and a pointer to an object or array returns JSON. Reading a binary artifact returns metadata only; use export to get the file. Pointers work on the parsed JSON value (number precision is limited); exporting original keeps the exact bytes.
Export a file
The destination must be under files.exportRoots. Call export_artifact:
{
"artifactId": "<id>",
"pointer": "/data/imageBase64",
"destination": "/absolute/path/exports/image.png",
"representation": "decoded"
}Representation | Result |
| The artifact's original bytes |
| The text of the artifact, or of the field at the pointer |
| Strict base64 decoding of the string |
Export never overwrites an existing file and never follows a symlink out of a root. File names from Content-Disposition are not trusted. Artifacts exist only for the lifetime of the process and are removed on normal shutdown; exported files stay.
To mark a base64 field explicitly in the config:
encodedFields:
- service: orders
pointer: /data/*/thumbnail
encoding: base64
mediaType: image/png* matches one path segment. Add operation to limit a rule to one operation. Schema hints such as format: byte, contentEncoding and data URIs also help confirm an encoding. A string that merely looks like base64 is not asserted to be base64.
If a response exceeds responseBytes, you still get the status and headers, but the body may be incomplete (bodyComplete: false). Total artifact storage is capped by sessionArtifactBytes.
Troubleshooting
Start with the config check:
npx -y @nhan7777/openapi-swagger-mcp@0.1.0 --config /absolute/path/config.yaml --checkThe report contains ok, services, checks, remoteSpecsChecked: false and operationsChecked: false. Each check has a field, a state (ok, pending or error) and possibly a code.
pendingmeans a credential will be captured at runtime. It is not a static error.It checks env and file sources (even when a recipe exists), local spec and CA files, and upload/export roots.
It does not fetch remote specs, parse spec content, check operations remotely, run recipes or create the artifact directory.
If the config cannot be parsed or fails the schema, stderr has a sanitized error and stdout is empty. If it parses, stdout has one JSON report with no secret values.
Exit code | Meaning |
| Static checks passed |
| A config, source, file or root problem |
| CLI usage error, such as a missing |
Common problems
Symptom / code | What to do |
The MCP client cannot connect | Check Node is 22.19 or newer, that the CLI and config paths are absolute, and that the entry does not contain |
| Run |
| Check the MCP process's environment, the JSON file, the pointer, and that the value is a string. Do not paste secrets into logs |
A service shows | Read the error in |
| Check the static sources or call |
| Wait until |
| Wait for the running action to finish before requesting a different one |
| No refresh recipe is configured. Authenticate again explicitly or import a session |
| A credential or template the recipe needs has no value. Recipes do not run prerequisite steps |
| Check the recipe's operation, request body, status and service |
| Check the JSON Pointer, header or Set-Cookie. Capture results are never published partially |
| A service with several profiles has no default. Pass |
| Use a profile the service lists, or a session created for that service |
| Get a fresh revision from list, search or schema, and re-read the contract before calling |
| Check the roots, the real path, protected files, and that the destination does not exist |
HTTP 401 after a refresh started | That is still the original request's response. Wait for the refresh, then decide whether to send a new request |
Restart or refresh? Config changes need a restart of the MCP process. refresh_specs only reloads specs. authenticate without a recipe reloads static auth sources, not the whole config.
Advanced configuration and limitations
Authentication for spec downloads and $refs
Spec-fetch auth is separate from business auth. It only uses static secrets and never runs a recipe:
services:
privateApi:
baseUrl: https://api.dev.example.test
spec:
source: { url: https://docs.dev.example.test/openapi.json }
auth:
bearer: { token: { fromEnv: DOCS_TOKEN } }
allowedOrigins: [https://schemas.dev.example.test]
roots: [./specs]
auth:
bearer: { token: { fromEnv: API_TOKEN } }Spec-fetch credentials are sent only to the origin of the spec source, never to a different origin reached through a $ref. A remote spec cannot reference local files. A local $ref must stay inside the allowed roots; the directory of a local spec is used as that spec's root. Spec fetches do not follow redirects. A missing or broken ref causes that service's snapshot to be rejected, and other services keep working.
Imperfect specs: warnings instead of errors
Framework-generated specs (NestJS, for example) often have small mistakes. These three do not block a service. They appear in warnings from list_apis. The list is capped at 20 entries, 4096 bytes in total, and 512 bytes and one line per entry. Priority order is excluded operations, then security schemes, then duplicate operationId. Exact counts are in warningSummary (total, shown, omitted, excludedOperations), not in an extra line at the end of the list. If list_apis exceeds its output budget, warning text is shortened (counts stay accurate). If even the metadata is too large, the result has servicesInline: false and a servicesArtifact you read in full with read_artifact.
Spec problem | Handling | Effect |
Duplicate | Warning only | No effect on calls, because operations are called by |
Extra | The extra fields are ignored during validation; the original spec is kept | No effect |
An operation declares a path parameter that is not in the path (for example | That operation alone is excluded from the service | It cannot be found. Calling it directly returns |
Other problems still block the whole service with SPEC_INVALID: for example a path template {id} with no matching parameter, a missing $ref target, or a malformed OpenAPI structure.
Warnings only report problems. They do not repair the spec, so fix it at the backend where possible.
$ref combined with a method or parameters is rejected. Any object in a spec that has a string $ref together with get, put, post, delete, options, head, patch, trace or parameters is refused (<document>: an object combines $ref with execution siblings (a method or parameters)). Tools disagree about what to do here (ignore, override or merge), and bundlers merge silently, so the server does not pick one; the spec author must choose. summary, description and x-* siblings are still allowed.
The scan runs on every original document (the root and every allowed file or URL a $ref points to) as it is read, before the bundler merges them, and again on the bundled document. This is because an extended $ref on a container (for example paths: { $ref: 'p.json', '/a': { $ref: '#/x' } }) can make the bundler produce a $ref with a method from two objects that were each valid on their own. The server checks object shape before and after bundling and does not re-resolve $ref paths itself. The cost: every object with this shape is rejected, including not only sample data (example, enum, default, x-*) but also schemas, Links and Responses, including shapes that only appear after a merge. This is a compatibility limit. When you hit it, change the spec (rename the key, or remove the $ref from that object) if doing so does not change what the spec means.
Extended $ref is accepted. When a $ref is extended on a container and the merged result no longer contains a forbidden combination, the server accepts the bundler library's merge: the extender wins for scalar values, objects are merged, and arrays are replaced entirely. For example, if an external file declares parameters with a required query parameter external, and the extender declares parameters with root, the published contract has only root. The external parameter disappears because arrays are replaced, not combined. The contract published over MCP, and used to serialize requests, is the one after bundling and validation. There is no evidence that the real server accepts this contract, so read it with get_operation_schema and try it in a suitable environment before sending requests with side effects.
Read limits. The number of distinct $ref strings the bundler asks to read is capped by refGraphDocuments. The total bytes read, including the same file read several times under different spellings such as .//a.json, is capped by refGraphBytes. Exceeding a configured read budget stops with SPEC_LIMIT_EXCEEDED. These input byte budgets are not hard limits on heap or RSS. Spec load and parse errors are capped at 2048 bytes.
TLS per service
tls:
caFile: ./certs/dev-ca.pem
verify: trueThis block goes under a service. verify: false turns off TLS verification for that service only and produces a warning. Use it only when you really need it in a test environment; it is not the way to fix a default certificate problem. No tool changes TLS settings at call time.
Files and limits
files:
uploadRoots: [./fixtures]
exportRoots: [./exports]
artifactRoot: ./runtime-artifacts
limits:
requestTimeoutMs: 30000
responseBytes: 52428800
uploadBytes: 52428800
toolOutputBytes: 32768Declare only the values you want to change. Every limit is a positive integer with a maximum; check the JSON Schema for the ranges.
Key | Default | Scope |
| 30000 ms | A request, including redirect hops. Recipes also have a timeout |
| 8 | Normal requests |
| 2 | A separate lane for auth recipes |
| 10 MiB | One spec document |
| 100 | Documents in the ref graph |
| 50 MiB | Total bytes in the ref graph |
| 64 | Ref and template depth |
| 50 MiB | One response |
| 50 MiB | One upload |
| 250 MiB | Total artifact quota |
| 4096 bytes | Threshold for showing a string inline |
| 32768 bytes | Budget for one tool result |
| 16384 bytes | One artifact read page |
| 5 | Redirects followed when enabled |
uploadRoots and exportRoots default to empty, so upload and export are disabled until you declare them. artifactRoot may not exist yet; the server creates it at runtime.
Limitations
A local MCP server over stdio. It is not a hosted gateway or an HTTP MCP server.
Not a workflow engine: one recipe is one operation. The agent or a person orchestrates multi-step flows.
No automation of OAuth/PKCE callbacks, OTP polling, CAPTCHA or browser login. No scripting, HMAC signing or mTLS client authentication.
No telemetry. Specs and responses are untrusted data, not instructions for the agent, and descriptions and extensions are never executed.
Validation depends on spec quality. An unknown format is recorded as unverified, not as passed. Search is deterministic token scoring; the project makes no claims about token savings or semantic search accuracy.
Compatibility note: older config and tool forms were removed with no aliases.
bearer.login, profilecomponents/recovery, service-levelallowedProfiles/defaultProfile,$source/$component,authenticate_profileandget_profile_statusno longer work. Use the forms in this guide.
Tool reference
Tool | Use it to |
| See services, spec readiness and revision, operation counts, spec |
| Search by path, operationId, tag, summary or description, with paging |
| See an operation's parameters, body, response schemas, security and refs. Large contracts go to an artifact |
| Send a real request and get the HTTP outcome, diagnostics and an optional capture into a session |
| Reload and validate specs. On failure the previous valid snapshot is kept |
| Run authentication, run an explicit refresh, or reload static auth sources |
| See state, revision, capability, credential and binding presence, cookie names and failures. Never returns credential values |
| Create, inspect or delete a session, importing credentials directly or from the catalog |
| Read a stored response or contract by page or JSON Pointer |
| Write bytes, text or base64-decoded data to a new file under |
The tool count does not grow with the number of endpoints. No tool accepts an arbitrary URL to call outside the configured services, an arbitrary env or file secret name, a script, or a parameter that switches environments.
Development
Work from a source checkout:
npm ci
npm run build
npm run typecheck
npm run gen:schema
npm test
npm run test:integration
npm run smoke
npm run verify:package
npm audit --omit=dev --audit-level=highBuild before the integration tests and the smoke test, because some of them run the compiled CLI over stdio. Tests use a loopback backend, synthetic data and self-signed certificates meant only for tests. No real credentials are needed. Run npm run gen:notices to update the third-party notices when dependencies change.
npm run verify:package needs npm run build first. It packs the package for real, installs the tarball into a separate consumer directory, runs --check, the bin shim and the smoke test against the installed copy, then audits that installed copy. Only if all of that passes does the tarball land in .release/<name>.tgz with a .sha256 file. If the audit fails, the tarball is kept as evidence in .release/diagnostic/NOT-RELEASABLE-.... npm pack --dry-run is not a substitute. Verifying a local candidate this way is separate from publishing it. Publishing is a separate, deliberate registry action. The CI matrix (Ubuntu, macOS and Windows with Node 22.19.0, 22 and 24) is its own release condition.
Released under the MIT license. Dependency licenses are listed in THIRD_PARTY_NOTICES.md.
This server cannot be deployed
Maintenance
Related MCP Connectors
Discover, compare, route, and execute machine-accessible capabilities for AI agents.
AI-callable tools for API mocking, testing, monitoring, security, and automation.
Point Gecko at an OpenAPI spec; get first-call-correct, auth-hidden agent tools.
Discover, inspect and run 63,000+ agent tools from one balance. Pay per call, no subscriptions.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to dynamically discover and interact with APIs through Swagger/OpenAPI specifications and Postman collections using a strategic four-tool approach. It streamlines API integration by providing universal tools for endpoint discovery, detailed request information, and authenticated execution.1-
- AlicenseAqualityDmaintenanceExposes Swagger/OpenAPI API documentation to AI models, enabling exploration, search, and interaction with endpoints, schemas, and execution of API calls.144 npm2MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to discover, search, and call any REST API described by an OpenAPI or Swagger document. Supports multiple API endpoints with authentication and parameter handling.5 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to discover and use Swagger/OpenAPI operations, schemas, and endpoints from configured sources, with optional API request execution and environment-based authentication.8 npm1MIT