MCP server that aggregates Semgrep, PHPStan, Knip, PHPMetrics and Deptrac into a unified code-quality gate for AI coding agents (Claude Code, Cursor, Windsurf). Baseline-aware, session-level digest, cross-stack dead code (source, DB schema, i18n, CSS).
Server has 7 well-defined tools with consistent naming (qg_* prefix), clear descriptions (avg 180 chars), and explicit Zod schemas. All tools are READ_ONLY except qg_scan_full (WRITE). Schemas include enums, type constraints, and min/max bounds. However, output schemas are not formally documented, responses are text-based or JSON strings without structured field definitions. Error handling is minimal (no recovery guidance, no actionable error messages). Parameter descriptions are adequate but lack dependency hints and format constraints. No tool annotations (readOnlyHint/destructiveHint) despite clear risk profiles.
Reports how many findings are in the baseline (accepted tech-debt) vs currently open (new code). Useful to decide whether to re-seed baseline.
Returns a priority-ordered digest of the last quality scan: counts by severity, top-N NEW findings (not in baseline). Use at session start or before starting a task on a module.
Reports MCP server version, configured scan root, which analyzers are enabled.
Lists findings that are NOT in baseline (i.e., new since last seed). Optionally filter by severity or file prefix.
Returns findings for a file from the last completed run. Both absolute and project-relative paths are tried. For a fresh scan use qg_scan_full.
Spawns scripts/scan.js to re-scan the configured root with enabled collectors (knip, dead-i18n-keys, dead-db-columns, dead-css-classes). Expensive — use sparingly; prefer scheduled cron.
Output schemas not documented. Tools return text or JSON strings without formal field definitions. LLMs cannot plan downstream calls or extract structured data reliably.
No tool annotations (readOnlyHint/destructiveHint/idempotentHint). qg_scan_full is destructive (WRITE) but lacks annotation. Agents cannot distinguish safe from risky tools without reading descriptions.
Error handling lacks recovery guidance. qg_scan_file returns 'No runs yet. Run qg_scan_full first' but other tools (qg_scan_full, qg_scan_module) have no visible error paths or actionable messages.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 60 | 2026-07-28+ | v2 |
Resolves a module name (e.g. "billing", "router", "ai", "auth") to the Support files that belong to it via the support-architect dependency map, then returns open findings from the last run filtered to those files. Useful before starting work on a subsystem.
Parameter descriptions lack format constraints and dependency hints. E.g., 'module' param in qg_scan_module says 'Module name to query (e.g. billing, router, ai, auth)' but does not state: are these the ONLY valid modules? How to discover available modules? Should qg_info be called first?
qg_scan_full has a 10-minute timeout but no timeout error handling or retry guidance. If scan hangs, the agent receives a generic error with no actionable next step.