Code Review From the Terminal and CI, No MCP Client Required
A month ago I shipped aicraft-code-review , an MCP server that reviews code locally. This week I added a CLI mode — because not everyone wants to wire up an MCP client just to check a diff. Now the same reviewer runs three ways: MCP tools — review_code / review_diff / review_file inside Claude Code, Cursor, Cline CLI — mcp-code-review review-file path/to/file.py CI — pipe git diff into it and…
A month ago, the author released aicraft-code-review, an MCP server designed to review code locally without requiring a full MCP client setup. This week, the author expanded the tool by adding a command-line interface (CLI) mode. This decision was made to accommodate users who do not wish to set up an MCP client merely to inspect code differences.
Now, the reviewer can operate in three distinct modes: using MCP tools within Claude Code, Cursor, or Cline CLI; employing the mcp-code-review command through the terminal with the syntax mcp-code-review review-file path/to/file.py; or piping the output of git diff directly into the mcp-code-review review-diff command. Installation is straightforward via pip install aicraft-code-review, as the tool relies on a single file that automatically discovers its configuration from the file's directory structure.
The CLI mode is initiated by running pip install aicraft-code-review, followed by executing mcp-code-review review-file src/api.py to analyze the current differences. Users can also test snippets by piping git diff into the CLI with git diff | mcp-code-review review-diff. The exit codes generated by the tool are compatible with CI systems, with 0 indicating no issues, 1 signifying medium or high-level problems, and 2 denoting critical issues.
The reviewer tool is equipped to detect a range of issues, including security flaws (OWASP patterns), performance bottlenecks (N+1 queries, unbounded growth), quality concerns (bare excepts, TODOs, missing type hints), and style violations (naming conventions, line length). Real-world examples of detected issues include command injection risks and inefficient database queries. Positive outcomes are flagged with green checkmarks, while potential problems are highlighted in yellow and critical issues in red.
The configuration file, usually named .mcp-code-review.yaml, can be customized to tailor the reviewer's behavior to specific project needs. Key features of the configuration file include custom rules, ignored checks, and severities for various issues. For instance, the config might prohibit console.log statements under a high severity level or disable checks for TODO comments. This flexibility allows teams to align the tool's functionality with their coding standards and project requirements.
The tool is MIT-licensed and distributed via pip install aicraft-code-review or through claude mcp add code-review -- uvx aicraft-code-review. The authors encourage feedback and issue reports on the GitHub repository, ensuring continuous improvement and adaptation to user needs.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.