A high-level orientation to the api-grade project and its three components.
api-grade grades the quality of your API specifications — OpenAPI (2/3) and AsyncAPI (2/3) — and tells you where to focus your improvement effort. It produces a letter grade, a quality assessment, prioritised recommendations, and a full diagnostic list.
The grading algorithm is error-first: one error outweighs many warnings. It doesn't just count problems — it explains which category of issues causes the most damage and tells you exactly which rule to fix first.
api-grade is built from four components that share the same grading engine:
The fastest way to grade a spec. Run one command and get an immediate report. Use the --min-grade flag to fail CI/CD pipelines automatically when quality drops below your threshold.
Install globally or use without installing:
npm install -g @dawmatt/api-grade
api-grade openapi.yamlThe grading engine as a standalone npm package. Import it into your own tools, scripts, build pipelines, or integrations — without installing the CLI.
npm install @dawmatt/api-grade-coreTwo Backstage plugin packages that display API grades directly on your Backstage API entity pages. The frontend card shows the grade summary; the backend plugin computes grades server-side.
→ Backstage plugins documentation
An MCP (Model Context Protocol) server that exposes api-grade as seven AI tools: grade-api, grade-api-detailed, assert-api-grade, grade-api-remediation-safety, analyse-ruleset-safety, set-ruleset-config, and get-ruleset-config. Register it in Claude Code, GitHub Copilot (VS Code Agent mode), or any MCP-compatible AI host and let the AI grade specs directly.
claude mcp add api-grade -- npx -y @dawmatt/api-grade-mcpConfigure a default Spectral ruleset so grading requests automatically use your organisation's standards — at session, workspace, or global scope.
→ MCP Server quick start | Configuration reference | Troubleshooting
| I want to… | Start here |
|---|---|
| Grade a spec from the terminal | CLI Tool |
| Set up a CI/CD grade gate | CLI Commands → CI/CD example |
| Integrate grading into my own code | Core Package (@dawmatt/api-grade-core) |
| Grade specs from an AI assistant | MCP Server quick start |
| Show grades in Backstage | Backstage Quick Start |
| Understand the full documentation | Documentation Index |
- Documentation Index — full navigation across all docs
- CLI Tool — installation and quick-start
- Core Package — package overview and installation
- Backstage Plugins — plugin architecture and setup
- MCP Server — grade specs from AI tools