GitHub
server ทางการของ GitHub ให้ AI อ่านและจัดการโค้ด issue และ pull request ในบัญชีของคุณได้ ใช้ผ่านคลาวด์ของ GitHub หรือรันในเครื่องด้วย Docker ก็ได้
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
🚀 Kill the Junior AI Era. 🤖 Level up AI code to automatically Principal standards. 🛡️ Quality Gate ✨
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
PROJECT_ROOT, SONAR_HOST_URL, SONAR_TOKEN, SONAR_PROJECT_KEY, ENABLE_I18N_RULESค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"ai-quality-gate": {
"command": "npx",
"args": [
"-y",
"ai-quality-gate"
],
"env": {
"PROJECT_ROOT": "ใส่ค่าของคุณ",
"SONAR_HOST_URL": "ใส่ค่าของคุณ",
"SONAR_TOKEN": "ใส่ค่าของคุณ",
"SONAR_PROJECT_KEY": "ใส่ค่าของคุณ",
"ENABLE_I18N_RULES": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add ai-quality-gate --env PROJECT_ROOT='ใส่ค่าของคุณ' --env SONAR_HOST_URL='ใส่ค่าของคุณ' --env SONAR_TOKEN='ใส่ค่าของคุณ' --env SONAR_PROJECT_KEY='ใส่ค่าของคุณ' --env ENABLE_I18N_RULES='ใส่ค่าของคุณ' -- npx -y ai-quality-gateเติมค่าที่เว้นว่างไว้ก่อนรัน
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"ai-quality-gate": {
"command": "npx",
"args": [
"-y",
"ai-quality-gate"
],
"env": {
"PROJECT_ROOT": "ใส่ค่าของคุณ",
"SONAR_HOST_URL": "ใส่ค่าของคุณ",
"SONAR_TOKEN": "ใส่ค่าของคุณ",
"SONAR_PROJECT_KEY": "ใส่ค่าของคุณ",
"ENABLE_I18N_RULES": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"ai-quality-gate": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"ai-quality-gate"
],
"env": {
"PROJECT_ROOT": "ใส่ค่าของคุณ",
"SONAR_HOST_URL": "ใส่ค่าของคุณ",
"SONAR_TOKEN": "ใส่ค่าของคุณ",
"SONAR_PROJECT_KEY": "ใส่ค่าของคุณ",
"ENABLE_I18N_RULES": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
PROJECT_ROOT envSONAR_HOST_URL envSONAR_PROJECT_KEY envENABLE_I18N_RULES envค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 8 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub mustafacagri ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
ต้องใส่ค่าเหล่านี้: SONAR_TOKEN
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (1.1.0) เข้า registry 32 วันที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย
ในหมวดเดียวกันมี GitHub, Desktop Commander, Cloudflare MCP
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
server ทางการของ GitHub ให้ AI อ่านและจัดการโค้ด issue และ pull request ในบัญชีของคุณได้ ใช้ผ่านคลาวด์ของ GitHub หรือรันในเครื่องด้วย Docker ก็ได้
MCP server for terminal commands, file operations, and process management
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
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.
{
"mcpServers": { "ai-quality-gate": { "command": "npx", "args": ["-y", "ai-quality-gate"] } } }
npm installAfter npm i -g ai-quality-gate, the ai-quality-gate binary is on your PATH:
{
"mcpServers": { "ai-quality-gate": { "command": "ai-quality-gate", "args": [] } } }
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" } } } }
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. |
{
"mcpServers": { "ai-quality-gate": { "command": "npx", "args": ["-y", "ai-quality-gate"] } } }
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).
To dogfood or contribute:
dist/server.js.{
"mcpServers": { "ai-quality-gate-dev": { "command": "node", "args": ["/ABSOLUTE/PATH/TO/ai-quality-gate/dist/server.js"] } } }
env.PROJECT_ROOT only if the repo you analyze differs from the inferred root.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.
AI writes code → calls quality_fix → Fixes errors → "Done ✅"
--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.
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).
# Start SonarQube
docker run -d --name sonarqube -p 9000:9000 sonarqube:community
# docker-compose.yml
version: '3' services: sonarqube: image: sonarqube:community ports:
volumes: sonarqube_data: sonarqube_logs: sonarqube_extensions:
docker-compose up -d
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
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.
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:
Patterns use JavaScript RegExp source (escape backslashes as in YAML strings). An invalid pattern is skipped, and says so in warnings.
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.
issues and fail Phase 1 / quality_fix until fixed.passed: false and do not block the gate.Treat i18nIssues as advisory unless you add your own CI check on top.
All variables are optional unless you use Phase 2, which requires `SONAR_HOST_URL`, `SONAR_TOKEN`, and `SONAR_PROJECT_KEY` together.
| Variable | Description
ตัดมาแค่ช่วงต้น อ่านต่อใน repo