Kill the Junior AI Era. π€ Level up AI code to automatically Principal standards. π‘οΈ Quality Gate β¨
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
MCP Server for AI code quality automation.
AI writes code β calls quality_fix β Server fixes what it can β Reports remaining issues to AI.
Hybrid Approach:
Important: ESLint vs Prettier
| Tool | Source | Config |
|---|---|---|
| ESLint | Project's config (if exists) or MCP's embedded | .eslintrc.* / eslint.config.* / MCP embedded |
| Prettier | Project's own | Project's prettier.config.mjs |
ESLint rules are controlled by MCP for consistent quality gates. Prettier uses project's config so formatting matches project preferences.
Phase 1 Rule Coverage:
| Plugin | Rules | Description |
|---|---|---|
| SonarJS | 201 | Security, bugs, code smells |
| Unicorn | 127 | Modern JS best practices |
| ESLint Core | 108 | JavaScript fundamentals |
| TypeScript-ESLint | 99 | TypeScript-specific rules |
| RegExp | 60 | Regex best practices |
| Import | 11 | Import/export rules |
| Promise | 10 | Async/await best practices |
| Node.js (n) | 9 | Node.js specific rules |
| Unused Imports | 2 | Auto-remove unused imports |
| Total | 627 |
node -v).Project root is auto-detected when PROJECT_ROOT is omitted: the server walks up from the MCP process working directory until it finds package.json or tsconfig.json. Set PROJECT_ROOT in env only to analyze a different tree than the inferred root.
Open Settings β Tools & MCP β Edit (user mcp.json). Add one server block; the examples below match .cursor/mcp.json.example (JSONC with comments β if your editor rejects comments, copy the JSON blocks below only).
Server name vs tool name: The key under mcpServers (e.g. "ai-quality-gate") is only the label for that connection in Cursor. The MCP tool your agent calls is always quality_fix β that name is fixed by this package and is separate from the server key and from ai-quality-gate.
npx (no global install)Always runs the published package; good for teams and CI-like setups.
npm installAfter npm i -g ai-quality-gate, the ai-quality-gate binary is on your PATH:
Requires a running SonarQube instance, sonar-scanner available (see SonarQube Setup), and all three variables below. Phase 1 still runs first.
Add an "env" object when you need overrides. Merge order for config is defaults β .quality-gate.yaml / .quality-gate.json β environment variables.
| Variable | When to set |
|---|---|
QUALITY_GATE_CONFIG | Absolute path to a specific .quality-gate.yaml or .quality-gate.json (skips walking directories). |
PROJECT_ROOT | Force project root if auto-detection is wrong for your layout. |
SONAR_HOST_URL | SonarQube server URL (with Phase 2). |
SONAR_TOKEN | SonarQube token (with Phase 2). |
SONAR_PROJECT_KEY | SonarQube project key (with Phase 2). |
SONAR_SCANNER_PATH | Full path to sonar-scanner if not on PATH. |
PHASE1_TIMEOUT | Phase 1 timeout (ms), default 30000. |
PHASE2_TIMEOUT | Phase 2 timeout (ms), default 300000. |
ENABLE_I18N_RULES | true / false β stricter JSX literal checks for i18n projects. |
Create or edit OpenCode config (typically ~/.config/opencode/opencode.json or project-level config):
Environment variables can be added under the server config if needed (see C) SonarQube (Phase 2) above).
To dogfood or contribute:
yarn build β generates dist/server.js.env.PROJECT_ROOT only if the repo you analyze differs from the inferred root.Settings β Rules and Commands β Add Rule:
--setup)The interactive wizard creates or updates .quality-gate.yaml without hand-editing: it walks you through project root, optional SonarQube (host URL + project key; token is not saved to disk β use SONAR_TOKEN in your environment), which Phase 1 tools to enable (ESLint, curly-brace / arrow AST fixers, Prettier, JSON validator), timeouts, and i18n rules. The generated file includes a fixers: block you can adjust later.
After yarn build (or install from npm), run from the target project (or any path under it):
PROJECT_ROOT is inferred when unset (see MCP configuration). Use the same entrypoint as the MCP server (node dist/server.js or npx ai-quality-gate); only the --setup flag switches to wizard mode. Answer prompts in the terminal; on success you get a ready-to-use config next to your project root.
Other CLI modes: --check (read-only Phase 1), --fix (default behavior when using CLI quality run), --phase1-only, --phase2-only β see docs/DEVELOPMENT.md.
Configure Sonar env in MCP as in C) SonarQube (Phase 2) above, or copy from .cursor/mcp.json.example. You need sonar-scanner on your machine for analysis (see below).
SONAR_TOKEN| Platform | Method | Command |
|---|---|---|
| Windows | npm (global) | npm install -g sonarqube-scanner |
| Windows | Chocolatey | choco install sonar-scanner |
| macOS | npm (global) | npm install -g sonarqube-scanner |
| macOS | Homebrew | brew install sonar-scanner |
| Linux | npm (global) | npm install -g sonarqube-scanner |
| Docker | Container | docker run sonarsource/sonar-scanner-cli |
For custom path: SONAR_SCANNER_PATH env var
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/ai-quality-gate)<a href="https://allmcps.com/mcp/ai-quality-gate"><img src="https://allmcps.com/api/badge/ai-quality-gate?style=directory" alt="AI Quality Gate on AllMCPs" /></a>