从终端和CI进行代码审查,不需要MCP客户端

2026年8月16日4 次浏览来源:Dev.to阅读原文

正文保留英文原文(机翻易破坏代码与排版),标题/摘要已提供中文

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 — / / inside Claude Code, Cursor, Cline CLI — CI — pipe into it and branch on the exit code The CLI Exit codes are CI-friendly: Code Meaning clean, or only info-level findings high / medium issues found critical issues found What it catches out of the box Security (OWASP patterns), performance (N+1, unbounded growth), quality (bare excepts, TODOs, missing type hints), style (naming, line length).

Real output: Making it match YOUR rules The config file is the part I'd actually show a teammate: is auto-discovered from the reviewed file's directory upward points a whole team at one shared profile valid severities: / / / regex patterns work best in single quotes (double quotes will error on escapes like ) One caveat if you're also shipping Python MCP servers Pin your MCP dependency. shipped breaking changes and broke fresh installs of servers that had unpinned.

Use until you've migrated.

The server is MIT-licensed: , or .

Issues and feedback welcome on GitHub.

分享