What it does
Code Auditor checks code as an AI agent writes it. When an edit breaks a project rule, the edit is blocked and the agent receives the rule's message so it can correct the change. Rules are defined in a project file and cover seven kinds: banned imports, restricted function calls, cross-module imports, naming patterns for exports, AST patterns, approved style mechanisms per file, and hardcoded CSS values.
It suits teams that want architectural constraints, such as keeping one layer from importing another or limiting where a function may be called, enforced during agent editing rather than only in review. Agents can also be prompted to index the codebase, run a full audit, work through violations file by file, or audit only changes relative to a branch.
Installation copies a skill and CLI to supported AI coding tools and connects the MCP server. Blocking hooks are available on Claude Code and Codex, while Cursor gets advisory hooks and some tools have no hook support. A Claude Code plugin is also offered. The index is stored in a user-level OS cache by default, and eleven environment variables control worker pool size, timeouts, the database location, and the UI port.
Limitations and requirements
Requires Node.js. On Node versions before 23.4, a native SQLite dependency (better-sqlite3) must be approved once in npm or pnpm before it can build. Blocking enforcement is available only on Claude Code and Codex; Cursor receives advisory hooks only, and Gemini CLI, VS Code/Copilot, other SKILL.md tools and ZCode have no hook support. Some MCP-only clients have no skill or hook path.
Safety
Our team has not reviewed this resource. Only automated rules checked it; resources with high-risk signals are not published. These are signals, not a guarantee that installing it is safe. Try it in a sandbox project first.
- Runs code or changes an assistant's behaviour
Sources
- Official MCP Registry first seen 13 Nov 2026 · last seen 13 Nov 2026 · its page on the source
io.github.BenAHammond/code-auditor-mcp
Enforces architectural invariants and code quality rules inside your AI agent's edit loop.
v5.0.2As shown on registry.modelcontextprotocol.io when we last read it