OpenAPI Lint

v0.3.0
io.github.basitalisandhu/mcp-openapi-lint Checked 1 day ago Published 1 month ago

Lint OpenAPI 3.x documents for missing security, responses, descriptions and versioning.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

lint_openapi Lint an OpenAPI document

Check an OpenAPI 3.x document and return findings sorted by severity (error, warning, info), each with a rule id, a JSON Pointer path into the document and a message. Rules cover: openapi version, http server URLs, missing or unused security schemes, operations with no security requirement (and explicitly public ones), undefined schemes, operations without responses or without a success response, responses and parameters without descriptions, path parameters not declared or not required, missing operationId and duplicates, unversioned paths, request bodies without content, deprecated operation…

ParameterTypeDescription
documentThe document itself, as JSON or YAML text or as an object. Alternative to path.
ignorearrayRule ids to skip.
pathstringPath to a local OpenAPI JSON or YAML file (up to 5242880 bytes).

list_operations List the operations of an OpenAPI document

Return every operation (method and path) with operationId, summary, tags, deprecated flag, effective security (the operation's own requirement, the global one, 'public' for security: [], or 'inherited-none' when nothing applies), parameters with location and required flag, request body media types and response codes. Optional filters: tag, method, path_prefix.

ParameterTypeDescription
documentThe document itself, as JSON or YAML text or as an object. Alternative to path.
methodstring
pathstringPath to a local OpenAPI JSON or YAML file (up to 5242880 bytes).
path_prefixstring
tagstring

get_operation Get one operation

Return the full definition of one operation, selected by operation_id or by method and path, with path-level parameters merged in and local $ref values resolved one level. Useful for reading a single endpoint out of a large document.

ParameterTypeDescription
documentThe document itself, as JSON or YAML text or as an object. Alternative to path.
methodstring
operation_idstring
operation_pathstringPath template as written in the document, for example /users/{id}.
pathstringPath to a local OpenAPI JSON or YAML file (up to 5242880 bytes).

explain_rule Explain a lint rule

Describe one lint rule: its default severity, what it detects and how to fix it. Rules: security-scheme-apikey-query, security-scheme-http-basic, operation-no-error-response, openapi-version, info-description, server-http, no-security-schemes, operation-no-security, operation-public, security-scheme-undefined, unused-security-scheme, operation-no-responses, operation-no-success-response, response-no-description, operation-no-description, operation-no-operation-id, duplicate-operation-id, path-unversioned, path-parameter-undefined, path-parameter-not-required, parameter-no-description, paramete…

ParameterTypeDescription
rule *string