AI News HubLIVE
In-site rewrite1 min read

MCP Code Review Server – AI code review in your editor

MCP Code Review Server is an open-source tool that integrates AI-powered code review into MCP-compatible editors like Claude Code and Cursor. It supports reviewing code snippets, diffs, and files, using OWASP Top 10 scanning, N+1 query detection, and race condition analysis to provide structured output with severity ratings. Easy installation via uvx or pip.

SourceHacker News AIAuthor: williamXue

Notifications You must be signed in to change notification settings

Fork 0

Star 2

Copy path

More options

More options

More options

More options

Latest commit

History

History

History

Copy path

Folders and files

NameName

Last commit message

Last commit date

parent directory

..

src

src

tests

tests

LAUNCHGUIDE.md

LAUNCHGUIDE.md

README.md

README.md

llms-install.md

llms-install.md

pyproject.toml

pyproject.toml

smithery.yaml

smithery.yaml

uv.lock

uv.lock

Code review as an MCP server. Connect it to Claude Code, Cursor, or any MCP-compatible AI assistant.

Features

review_code — Review any source code snippet for bugs, security, performance, and style

review_diff — Review a git diff for potential issues before merging

review_file — Review a local file by path

Powered by the same methodology as our Code Review Agent: OWASP Top 10 scanning, N+1 query detection, race condition analysis, and structured output with severity ratings.

Quick Start

Via uvx (no install)

Add to your Claude Code MCP config:

claude mcp add code-review -- uvx aicraft-code-review

Or add to your ~/.cursor/mcp.json or claude_desktop_config.json:

{ "mcpServers": { "code-review": { "command": "uvx", "args": ["mcp-code-review"] } } }

Via pip

pip install aicraft-code-review python -m mcp_code_review

Usage Examples

Once connected, ask your AI assistant:

"Review this Python code for security issues: [paste code]" "Review this diff before I commit: [paste diff]" "Review this file: /path/to/file.py"

The AI will call the MCP server and return structured results.

Sample Output

Review Results

🔴 Critical (1)

| Line | Issue | Category | Fix | |------|-------|----------|-----| | 42 | SQL injection via f-string | Security | Use parameterized queries |

🟠 High (2)

| Line | Issue | Category | Fix | |------|-------|----------|-----| | 15 | Unvalidated user input | Security | Add input validation | | 78 | N+1 query in loop | Performance | Add select_related |

Summary

  • Critical: 1 — must fix
  • High: 2 — should fix
  • Medium: 0
  • Info: 0

Development

git clone https://github.com/GoodJobwilliam/aicraft cd aicraft pip install -e ".[dev]" python -m mcp_code_review # Start server

Requirements

Python 3.11+

An MCP-compatible client (Claude Code, Cursor, etc.)

License

MIT