DEV Community

Will
Will

Posted on

Team-Shared Code Review Rules for Your MCP AI Assistant

Last month I shipped an MCP server that reviews code locally — no SaaS, no uploads. Two pieces of feedback kept coming up on Product Hunt:

  1. "Can my whole team sync the same review rules?"
  2. "Can each repo have its own rule set?"

So I built exactly that. aicraft-code-review now reads a config file from your repo.

One config file per repo

Drop a .mcp-code-review.yaml in your project root:

disabled_checks:
  - todo_comment

severity_overrides:
  hardcoded_secret: critical

min_severity: medium

custom_rules:
  - name: no-console-log
    pattern: 'console\.log\('
    severity: high
    issue: Console logging left in production code
    fix: Use a structured logger instead
Enter fullscreen mode Exit fullscreen mode

That gives you:

  • Custom regex rules with their own severity, message, and suggested fix
  • disabled_checks to silence noise
  • severity_overrides to make your team's blockers actually block
  • min_severity to keep junior devs from drowning in info-level findings

Config is auto-discovered from the reviewed file's directory upward — one file per repo works automatically.

YAML tip: put regex patterns in single quotes. Double-quoted patterns like "console\.log\(" can trigger YAML escape errors — single quotes keep the backslashes literal.

Team-wide profiles

For a single shared profile, point every teammate at the same file:

{
  "mcpServers": {
    "code-review": {
      "command": "uvx",
      "args": ["aicraft-code-review"],
      "env": {
        "MCP_CODE_REVIEW_CONFIG": "/path/to/team-repo/.mcp-code-review.yaml"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Commit the YAML to your repo and every machine gives identical feedback.

Try it

uvx aicraft-code-review
Enter fullscreen mode Exit fullscreen mode

JSON configs work with zero extra dependencies; YAML needs pip install "aicraft-code-review[yaml]".

The server is MIT-licensed and reviews code snippets, git diffs, and local files with OWASP security checks, N+1 detection, and style/quality passes.

Happy reviewing!

Top comments (0)