mustafacagri avatar

Ai Quality Gate

mustafacagri/ai-quality-gate

Wraps ESLint (627 rules across SonarJS, Unicorn, TypeScript-ESLint and others), Prettier, and optionally SonarQube into a single quality_fix tool that AI can call after writing code. Phase 1 runs linting and formatting in 2-8 seconds, auto-fixing what it can and reporting the rest. Phase 2 triggers SonarQube scans for deeper analysis if you've configured a server. Project root is auto-detected by walking up to package.json or tsconfig.json. Install via npx or globally, drop the config block into your MCP settings, then add a rule telling your AI to call quality_fix before marking work complete. The interactive setup wizard creates .quality-gate.yaml without hand-editing JSON.

GitHub stars
31
tool
1
auth
Secret needed
transport
STDIO
env vars
5
last updated
Oct 7, 2026

Tools

1 tools

Public tool metadata for what this MCP can expose to an agent.

quality_fixInput: files (string[]), file paths to check. Applies ESLint, AST, and Prettier fixes, then validates and reports remaining issues.

Input: files (string[]), file paths to check. Applies ESLint, AST, and Prettier fixes, then validates and reports remaining issues.

No parameter schema in public metadata yet.

Sponsors

Configuration

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)

SONAR_TOKENsecret

SonarQube authentication token

SONAR_PROJECT_KEY

SonarQube project key

ENABLE_I18N_RULES

Enable stricter JSX literal checks for i18n projects (true/false)

Readme

AI Quality Gate

MCP Server for AI code quality automation.

npm version License: MIT


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.


View the full README on GitHub

Details

Repository
github.com/mustafacagri/ai-quality-gate
Package
ai-quality-gate
Transport
STDIO
Auth
Required
Registry
MCP registry, active