doctor¶
Use doctor when you want to assess whether an OpenAPI spec is likely to generate a clean MCP server before running generate.
Command¶
openapi-to-mcp doctor [OPTIONS]
Options¶
| Option | Required | Default | Meaning |
|---|---|---|---|
--openapi-json, -o |
Yes | None | Local path or URL to a JSON or YAML OpenAPI spec |
--format |
No | text |
Output format: text or json |
Exit codes¶
| Exit code | Meaning |
|---|---|
0 |
No issues found |
2 |
Warnings only |
3 |
One or more blocking errors |
Current checks¶
doctor currently reports:
- missing default base URL information
- missing
operationId - generated tool-name collisions
- undefined referenced security schemes
- unsupported auth schemes such as HTTP Basic
- risky
oneOforanyOfusage in request or response schemas - missing HTTP operations under
paths
Examples¶
Human-readable report¶
openapi-to-mcp doctor --openapi-json ./openapi.yaml
JSON report for automation¶
openapi-to-mcp doctor \
--openapi-json ./openapi.yaml \
--format json
How to use the result¶
- Fix
errorissues before treating the spec as generation-ready. - Review
warningissues before relying on the generated tool surface in production. - Use
--format jsonwhen you want to feed diagnostics into CI or another script.