mcpField
O
OpenAPI Lint

OpenAPI Lint

Local
basitalisandhu.github.ioDeveloper Tools1Updated 2d ago

About OpenAPI Lint

OpenAPI Lint is an MCP server for linting OpenAPI 3.0 and 3.1 documents and inspecting their operations. It helps API developers find security and completeness issues while resolving only local references.

Key features

  1. 01Lint OpenAPI 3.0 and 3.1 documents
  2. 02Report security and completeness findings
  3. 03List operations with effective security
  4. 04Inspect operations and explain lint rules

Use cases

  1. 01Find missing security or response definitions
  2. 02Review operation parameters and responses
  3. 03Understand a lint finding and its remedy

MCP support

The MCP server exposes OpenAPI linting, operation inspection, and rule explanation tools to MCP clients. It accepts local files or inline documents and does not fetch references.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"basitalisandhu-mcp-openapi-lint": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/basitalisandhu/mcp-openapi-lint:0.3.0"
]
}
}
}
Run commanddocker run -i --rm ghcr.io/basitalisandhu/mcp-openapi-lint:0.3.0

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
ocighcr.io/basitalisandhu/mcp-openapi-lint:0.3.0

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

openapi-lint MCP server

Loads an OpenAPI 3.0 or 3.1 document (JSON or YAML, from a local path or inline) and lints it for security and completeness problems; lists and fetches operations with their effective security. Only local #/ references are resolved; nothing is fetched.

Part of dev-mcp-servers. Stdio transport only; the server never opens a port.

Tools

ToolInputWhat it returns
lint_openapipath or document, ignore?Findings sorted by severity with rule id, JSON Pointer path and message: openapi version, http servers, missing, unused or undefined security schemes, operations without security (and explicitly public ones), operations without responses or success responses, undescribed responses and parameters, path parameters not declared or not required, missing or duplicate operationIds, unversioned paths, empty request bodies, deprecated operations, undeclared tags.
list_operationspath or document, tag?, method?, path_prefix?Every operation with operationId, summary, tags, deprecated flag, effective security (public for security: [], inherited-none when nothing applies), parameters, request media types and response codes.
get_operationpath or document, operation_id or method + operation_pathOne operation in full with path-level parameters merged and local references resolved.
explain_ruleruleSeverity, what the rule detects and how to fix it.

Install

Claude Code:

claude mcp add openapi-lint -- docker run --rm -i -v "$PWD:/work:ro" ghcr.io/basitalisandhu/mcp-openapi-lint:0.2.2

Add -s user to make it available in every project. Any client that reads .mcp.json (Claude Code, Claude Desktop, Cursor):

{
  "mcpServers": {
    "openapi-lint": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "-v", "/path/to/your/project:/work:ro", "ghcr.io/basitalisandhu/mcp-openapi-lint:0.2.2"]
    }
  }
}

Pin the version as shown so that an update cannot change what runs in your editor without you noticing. The container sees only the mounted directory, so pass paths under /work. The package is not on npmjs.com yet, so npx does not work; see the repository README for GitHub Packages npm. From a checkout, use "command": "node", "args": ["<path>/packages/openapi-lint/dist/index.js"] after npm install && npm run build at the repository root.

What it touches

  • Network: None.
  • Local files: Reads the one file you name, up to 5 MB. YAML is parsed with an alias limit.
  • Telemetry: none.

Notes

  • Swagger 2.0 documents are reported by the openapi-version rule rather than linted.
  • Findings describe the document, not the running API.

Build and test

npm install        # at the repository root
npm run build -w @basitalisandhu/mcp-openapi-lint
npm test -w @basitalisandhu/mcp-openapi-lint

Tests use node:test and the SDK's in-memory transport; they do not reach the network.

Licence

MIT. See LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.