Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

AI Quality Gate

by mustafacagriversion 1.1.0i★ 31iRuns on your computerRepository ↗
Registry nameio.github.mustafacagri/ai-quality-gate

How to install

What it does

🚀 Kill the Junior AI Era. 🤖 Level up AI code to automatically Principal standards. 🛡️ Quality Gate ✨

  • Connects Runs on your computer
  • Account or key Needs SONAR_TOKEN, SONAR_PROJECT_KEY
  • Category Developer tools

Use together with

Skills that teach the AI this kind of work; they work alongside this one

rea

Reverse engineer anything with agents, from app behavior down to native binaries.

by morluto★ 467,2351 skills

Skill · How-to guide

andrej-karpathy-skills

A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.

by multica-ai★ 234,1251 skills

Skill · How-to guideNo license stated

graphify

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

by Graphify-Labs★ 149,8731 skills

Skill · How-to guide

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity18/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness7/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score25/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install AI Quality Gate. Follow https://mcp.popnx.com/i/mustafacagri-ai-quality-gate.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 14, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

You need a AI Quality Gate key (create it on the maker’s site) · Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server AI Quality Gate for Claude on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "ai-quality-gate": { "command": "npx", "args": [ "-y", "ai-quality-gate" ], "env": { "SONAR_TOKEN": "your-value", "SONAR_PROJECT_KEY": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For SONAR_TOKEN, SONAR_PROJECT_KEY, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the AI Quality Gate tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Sign up and create a AI Quality Gate key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  4. Paste these settings and save the file

    {
      "mcpServers": {
        "ai-quality-gate": {
          "command": "npx",
          "args": [
            "-y",
            "ai-quality-gate"
          ],
          "env": {
            "SONAR_TOKEN": "your-value",
            "SONAR_PROJECT_KEY": "your-value"
          }
        }
      }
    }

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Quit Claude and open it again

  6. Try it

    Use AI Quality Gate and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using AI Quality Gate or shows a AI Quality Gate tool in the answer, you are connected

3 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • PROJECT_ROOT Absolute path to the project root for analysis (auto-detected if omitted)
  • SONAR_HOST_URL SonarQube server base URL (e.g., http://localhost:9000)
  • ENABLE_I18N_RULES Enable stricter JSX literal checks for i18n projects (true/false)

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect AI Quality Gate yet

AI Quality Gate runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect AI Quality Gate

  • You need a AI Quality Gate key (create it on the maker’s site) · Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • You need a AI Quality Gate key (create it on the maker’s site) · Install Node.js on your computer first (one time)
  • You need a AI Quality Gate key (create it on the maker’s site) · Install Node.js on your computer first (one time)
  • You need a AI Quality Gate key (create it on the maker’s site) · Install Node.js on your computer first (one time)

B · Others in Developer tools that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

You need a AI Quality Gate key (create it on the maker’s site) · Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server AI Quality Gate for Claude Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user ai-quality-gate --env SONAR_TOKEN=your-value --env SONAR_PROJECT_KEY=your-value -- npx -y ai-quality-gate 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For SONAR_TOKEN, SONAR_PROJECT_KEY, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the AI Quality Gate tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Sign up and create a AI Quality Gate key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  4. Paste this command and press Enter

    claude mcp add --scope user ai-quality-gate --env SONAR_TOKEN=your-value --env SONAR_PROJECT_KEY=your-value -- npx -y ai-quality-gate

    Replace “your-value” with your key before pressing Enter

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Type /mcp in Claude Code

    You should see AI Quality Gate listed as connected

  6. Try it

    Use AI Quality Gate and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using AI Quality Gate or shows a AI Quality Gate tool in the answer, you are connected

3 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • PROJECT_ROOT Absolute path to the project root for analysis (auto-detected if omitted)
  • SONAR_HOST_URL SonarQube server base URL (e.g., http://localhost:9000)
  • ENABLE_I18N_RULES Enable stricter JSX literal checks for i18n projects (true/false)

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

You need a AI Quality Gate key (create it on the maker’s site) · Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server AI Quality Gate for Cursor on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "ai-quality-gate": { "command": "npx", "args": [ "-y", "ai-quality-gate" ], "env": { "SONAR_TOKEN": "your-value", "SONAR_PROJECT_KEY": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For SONAR_TOKEN, SONAR_PROJECT_KEY, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the AI Quality Gate tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Sign up and create a AI Quality Gate key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  4. Fill in your key

    In the AI Quality Gate settings, SONAR_TOKEN, SONAR_PROJECT_KEY is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in Cursor in Agent mode

  6. Try it

    Use AI Quality Gate and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using AI Quality Gate or shows a AI Quality Gate tool in the answer, you are connected

3 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • PROJECT_ROOT Absolute path to the project root for analysis (auto-detected if omitted)
  • SONAR_HOST_URL SonarQube server base URL (e.g., http://localhost:9000)
  • ENABLE_I18N_RULES Enable stricter JSX literal checks for i18n projects (true/false)

Descriptions are as written by the maker.

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

You need a AI Quality Gate key (create it on the maker’s site) · Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server AI Quality Gate for VS Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "ai-quality-gate": { "type": "stdio", "command": "npx", "args": [ "-y", "ai-quality-gate" ], "env": { "SONAR_TOKEN": "your-value", "SONAR_PROJECT_KEY": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For SONAR_TOKEN, SONAR_PROJECT_KEY, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the AI Quality Gate tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Sign up and create a AI Quality Gate key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  4. Fill in your key

    In the AI Quality Gate settings, SONAR_TOKEN, SONAR_PROJECT_KEY is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in VS Code in Agent mode

  6. Try it

    Use AI Quality Gate and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using AI Quality Gate or shows a AI Quality Gate tool in the answer, you are connected

3 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • PROJECT_ROOT Absolute path to the project root for analysis (auto-detected if omitted)
  • SONAR_HOST_URL SonarQube server base URL (e.g., http://localhost:9000)
  • ENABLE_I18N_RULES Enable stricter JSX literal checks for i18n projects (true/false)

Descriptions are as written by the maker.

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use AI Quality Gate💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user ai-quality-gate --env SONAR_TOKEN=your-value --env SONAR_PROJECT_KEY=your-value -- npx -y ai-quality-gate

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "ai-quality-gate": {
      "command": "npx",
      "args": [
        "-y",
        "ai-quality-gate"
      ],
      "env": {
        "SONAR_TOKEN": "your-value",
        "SONAR_PROJECT_KEY": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "ai-quality-gate": {
      "command": "npx",
      "args": [
        "-y",
        "ai-quality-gate"
      ],
      "env": {
        "SONAR_TOKEN": "your-value",
        "SONAR_PROJECT_KEY": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "ai-quality-gate": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "ai-quality-gate"
      ],
      "env": {
        "SONAR_TOKEN": "your-value",
        "SONAR_PROJECT_KEY": "your-value"
      }
    }
  }
}

Values you fill in

  • PROJECT_ROOT env
    Absolute path to the project root for analysis (auto-detected if omitted)
  • SONAR_HOST_URL env
    SonarQube server base URL (e.g., http://localhost:9000)
  • SONAR_TOKEN secret required env
    SonarQube authentication token
  • SONAR_PROJECT_KEY secret required env
    SonarQube project key
  • ENABLE_I18N_RULES env
    Enable stricter JSX literal checks for i18n projects (true/false)

Descriptions are as written by the maker.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
81/wk
Connection
Runs on your computer
Latest versioni
1.1.0
Published to registryi
Oct 8, 2026
Code last changedi
Oct 8, 2026
Maker
mustafacagri
Packages
npm: ai-quality-gate
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 19, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account mustafacagri, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 42 days ago

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

No entries on OSV.dev for ai-quality-gate@1.1.0

Checks only this package version, not every dependency · checked Nov 15, 2026

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/mustafacagri-ai-quality-gate.svg)](https://mcp.popnx.com/en/servers/mustafacagri-ai-quality-gate)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Developer toolsi

  • More stars than 94% of the other 6103 servers in this category
  • Published to the registry more recently than 44% of the other 6103 servers in this category
  • Basic checks equal to or better than 99% of the other 6103 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is AI Quality Gate safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

You need to fill in: SONAR_TOKEN, SONAR_PROJECT_KEY

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed 42 days ago, and the latest version (1.1.0) reached the registry 42 days ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js on your computer.

What can I use instead?

In the same category: GitDiagram, Appllama, Cloudflare MCP, Omnara, Repowise

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

GitDiagram

Architecture diagrams, explanations and Mermaid source for public GitHub repositories.

by ahmedkhaleel2004Widely used★ 19KUpdated 2 months ago

Runs in the cloud✓ service owner · gitdiagram.comTried by the PopNx team

Appllama

Study screens, flows and paywalls from top-earning iOS apps, then build from what wins.

by AppllamaWidely used★ 5.2KUpdated 3 months ago

Runs in the cloud✓ service owner · appllama.io

Repowise

Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.

by repowise-devWidely used↓ 6.5K/wk★ 8.2K Stars for the whole repoUpdated 6 days ago

Computer or cloud✓ service owner · repowise.dev
Compared with similar ones
This one
AI Quality Gate
GitDiagramAppllamaCloudflare MCPOmnaraRepowise
Runs whereInstalls on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installCloud or install on your computer
Needs a keyYesNoNoNoNoNo
Add with + in ClaudeNoNoNoYesNoNo
Basic checks3/34/44/44/44/45/5
LicenseMITMITMITApache-2.0Apache-2.0AGPL-3.0
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

AI Quality Gate

MCP Server for AI code quality automation.


What It Does

AI writes code → calls quality_fix → Server fixes what it can → Reports remaining issues to AI.

Hybrid Approach:

  • Phase 1: ESLint + 627 rules + Prettier (~2-8s, always runs)
  • Phase 2: SonarQube Server (~30-60s, optional)

Important: ESLint vs Prettier

ToolSourceConfig
ESLintProject's config (if exists) or MCP's embedded.eslintrc.* / eslint.config.* / MCP embedded
PrettierProject's ownProject'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:

PluginRulesDescription
SonarJS201Security, bugs, code smells
Unicorn127Modern JS best practices
ESLint Core108JavaScript fundamentals
TypeScript-ESLint99TypeScript-specific rules
RegExp60Regex best practices
Import11Import/export rules
Promise10Async/await best practices
Node.js (n)9Node.js specific rules
Unused Imports2Auto-remove unused imports
Total627

Installation

Prerequisites
  • Node.js 20.10+ or 21.1+ on your PATH (node -v).
  • Cursor, Antigravity, OpenCode (or another MCP-capable editor) with MCP enabled.

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.


MCP configuration (Cursor)

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.

A) Recommended: npx (no global install)

Always runs the published package; good for teams and CI-like setups.

{

"mcpServers": { "ai-quality-gate": { "command": "npx", "args": ["-y", "ai-quality-gate"] } } }

B) Optional: global npm install

After npm i -g ai-quality-gate, the ai-quality-gate binary is on your PATH:

{

"mcpServers": { "ai-quality-gate": { "command": "ai-quality-gate", "args": [] } } }

C) SonarQube (Phase 2)

Requires a running SonarQube instance, sonar-scanner available (see SonarQube Setup), and all three variables below. Phase 1 still runs first.

{

"mcpServers": { "ai-quality-gate": { "command": "npx", "args": ["-y", "ai-quality-gate"], "env": { "SONAR_HOST_URL": "http://localhost:9000", "SONAR_TOKEN": "your_sonar_token", "SONAR_PROJECT_KEY": "your_project_key" } } } }

D) Optional environment variables (any server)

Add an "env" object when you need overrides. Merge order for config is defaults → `.quality-gate.yaml` / `.quality-gate.json` → environment variables.

VariableWhen to set
QUALITY_GATE_CONFIGAbsolute path to a specific .quality-gate.yaml or .quality-gate.json (skips walking directories).
PROJECT_ROOTForce project root if auto-detection is wrong for your layout.
SONAR_HOST_URLSonarQube server URL (with Phase 2).
SONAR_TOKENSonarQube token (with Phase 2).
SONAR_PROJECT_KEYSonarQube project key (with Phase 2).
SONAR_SCANNER_PATHFull path to sonar-scanner if not on PATH.
PHASE1_TIMEOUTPhase 1 timeout (ms), default 30000.
PHASE2_TIMEOUTPhase 2 timeout (ms), default 300000.
ENABLE_I18N_RULEStrue / false — stricter JSX literal checks for i18n projects.

MCP configuration
Cursor, Antigravity, etc..
{

"mcpServers": { "ai-quality-gate": { "command": "npx", "args": ["-y", "ai-quality-gate"] } } }

(OpenCode)

Create or edit OpenCode config (typically ~/.config/opencode/opencode.json or project-level config):

{

"$schema": "https://opencode.ai/config.json", "mcp": { "ai-quality-gate": { "type": "local", "enabled": true, "command": ["npx", "-y", "ai-quality-gate"] } } }

Environment variables can be added under the server config if needed (see C) SonarQube (Phase 2) above).


Local development (this repository)

To dogfood or contribute:

  1. `yarn build` — generates dist/server.js.
  2. Point MCP at the built file (absolute paths):
{

"mcpServers": { "ai-quality-gate-dev": { "command": "node", "args": ["/ABSOLUTE/PATH/TO/ai-quality-gate/dist/server.js"] } } }

  1. Reload MCP. Use env.PROJECT_ROOT only if the repo you analyze differs from the inferred root.

2. Add AI Rule

Settings → Rules and Commands → Add Rule:

After every code change, before telling the user "done",

AI must call the quality_fix MCP tool. This is mandatory.

3. Use It
AI writes code → calls quality_fix → Fixes errors → "Done ✅"

CLI: interactive config (--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):

node dist/server.js --setup

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.


Optional: SonarQube Server (Phase 2)

Configure Sonar env in MCP as in [C) SonarQube (Phase 2)](#c-sonarqube-phase-2) above, or copy from .cursor/mcp.json.example. You need `sonar-scanner` on your machine for analysis (see below).

SonarQube Setup
Docker (Recommended)
# Start SonarQube

docker run -d --name sonarqube -p 9000:9000 sonarqube:community

First login: admin/admin → change password

http://localhost:9000

Docker Compose
# docker-compose.yml

version: '3' services: sonarqube: image: sonarqube:community ports:

  • '9000:9000' volumes:
  • sonarqube_data:/opt/sonarqube/data
  • sonarqube_logs:/opt/sonarqube/logs
  • sonarqube_extensions:/opt/sonarqube/extensions

volumes: sonarqube_data: sonarqube_logs: sonarqube_extensions:

docker-compose up -d
Creating SonarQube Token
  1. http://localhost:9000 → Login (admin)
  2. My Account → Security → Generate Tokens
  3. Select token type: Global Analysis Token
  4. Copy token → use as SONAR_TOKEN
Installing sonar-scanner
PlatformMethodCommand
Windowsnpm (global)npm install -g sonarqube-scanner
WindowsChocolateychoco install sonar-scanner
macOSnpm (global)npm install -g sonarqube-scanner
macOSHomebrewbrew install sonar-scanner
Linuxnpm (global)npm install -g sonarqube-scanner
DockerContainerdocker run sonarsource/sonar-scanner-cli

For custom path: SONAR_SCANNER_PATH env var


Configuration

Optional files (discovered by walking up from the inferred project root — same algorithm as package.json / tsconfig.json — or from PROJECT_ROOT when set): `.quality-gate.yaml` (preferred) or `.quality-gate.json`. Same fields as environment variables (camelCase); you may nest Sonar settings under sonar: { hostUrl, token, projectKey, scannerPath }.

Merge order: defaults → config file → environment variables (ENV wins on conflicts).

Set `QUALITY_GATE_CONFIG` to an explicit path to skip discovery.

Custom rules (customRules)

Optional line-based regex checks on lintable files (Phase 1). Each match is reported as an issue with rule set to custom: (and included in quality_fix remaining). Example:

customRules:
  • id: no-console message: 'Console.log is not allowed' pattern: 'console\\.log\\(' severity: error
  • id: no-debugger message: 'Debugger statement found' pattern: 'debugger' severity: warning

Patterns use JavaScript RegExp source (escape backslashes as in YAML strings). An invalid pattern is skipped, and says so in warnings.

JSON validator & i18n locale files

When `fixers.jsonValidator` is enabled and you pass JSON paths that match locale patterns (for example locales/en.json / locales/tr.json), the tool compares keys across those files.

  • Syntax errors, invalid UTF-8 BOM, etc. → reported as issues and fail Phase 1 / quality_fix until fixed.
  • Missing or extra keys between locale files → collected as `i18nIssues` in the validator result and printed as warnings on stderr during Phase 1. They do not set passed: false and do not block the gate.

Treat i18nIssues as advisory unless you add your own CI check on top.


Environment Variables

All variables are optional unless you use Phase 2, which requires `SONAR_HOST_URL`, `SONAR_TOKEN`, and `SONAR_PROJECT_KEY` together.

| Variable | Description

Only the beginning is shown; read the rest in the repo