ndlovu-code-reviewer

by shaunie2fly

Not rated
GitHub

Description

Manual code reviews are time-consuming and often miss the opportunity to combine static analysis with contextual, human-friendly feedback. This project was created to experiment with MCP tooling that gives AI assistants access to a purpose-built reviewer. Uses the Gemini cli…

About

Manual code reviews are time-consuming and often miss the opportunity to combine static analysis with contextual, human-friendly feedback. This project was created to experiment with MCP tooling that gives AI assistants access to a purpose-built reviewer. Uses the Gemini cli application to process the reviews at this…

Details

Author
shaunie2fly
Categories
Developer Tools

Setup

Install ndlovu-code-reviewer in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/shaunie2fly/ndlovu-code-reviewer

Follow the installation instructions in the repository README, then restart your MCP client.

A Gemini-CLI (for now), powered code review assistant that runs as a Model Context Protocol (MCP) server.

Manual code reviews are time-consuming and often miss the opportunity to combine static analysis with contextual, human-friendly feedback. This project was created to experiment with MCP tooling that gives AI assistants access to a purpose-built reviewer:

- Automates the busywork of gathering diffs and lint results from local, uncommitted changes.
- Streams that context into the Gemini CLI so the model can focus on actionable insights.
- Returns a structured JSON review that fits naturally into MCP-compatible clients.

- Connects to MCP clients over stdio using the official@modelcontextprotocol/sdk.
- Runs a "hybrid" review workflow that gathersgit diffoutput and linter findings.
- Falls back between ESLint, JSHint, and TypeScript to maximise coverage across projects.
- Safely invokes the Gemini CLI, handling long prompts and timeouts.
- Ships as TypeScript with Zod-backed types for predictable MCP responses.

- Node.js 18 or later (ES modules and AbortSignals are used throughout).
- npm (installed with Node.js).
- Git (used to collect local diffs).
- Google Gemini CLI (gemini) installed and authenticated. Seethe Gemini quickstartfor setup instructions.

git clone https://github.com/<your-org>/ndlovu-code-reviewer.git cd ndlovu-code-reviewer npm install npm run build

If you plan to iterate on the TypeScript source, you can skipnpm run buildand rely on the dev script described below.

The server communicates over stdio, so it is ready to be registered with any MCP-compatible client (e.g. IDE integrations or assistant sandboxes). Once connected, call thereview-local-changestool to trigger the hybrid analysis and receive the JSON review.

The server exposes a single tool calledreview-local-changesthat performs comprehensive analysis of your local, uncommitted code changes.

- You must have uncommitted changes in your git repository
- Changed files should be JavaScript, TypeScript, or Vue files (.js,.ts,.tsx,.vue)
- The Gemini CLI must be installed and authenticated

Once your MCP client is connected to the server, you can call thereview-local-changestool. The tool:
- Automatically detects changes- Finds all modified/added JS/TS/Vue files usinggit diff
- Runs static analysis- Executes the best available linter (ESLint, JSHint, or TypeScript compiler)
- Performs AI review- Sends the combined context to Gemini CLI for intelligent analysis
- Returns structured results- Provides a JSON response with findings and recommendations

For best results, be explicit about using the code review functionality. While natural language requests sometimes work, the most reliable approach is to use specific keywords:

- "Use the code review tool to analyze my changes"
- "Run code review on my local changes"
- "Perform a comprehensive code review of my uncommitted changes"
- "Analyze my code changes with static analysis"

Natural language requests (may work but less reliable):

- "Please review my local changes"
- "Can you analyze the code changes I've made?"

Explicit tool invocation (most reliable):

- "Use the review-local-changes tool"
- "Call the review-local-changes tool to check my modifications"

The tool has been enhanced with better descriptions to help Claude recognize when to use it, but being specific about "code review," "analyze changes," or mentioning the tool name directly will give you the most consistent results.

{ "summary": "Overview of changes made", "assessment": "Overall code quality evaluation", "findings": [ { "filePath": "src/example.js", "lineNumber": 42, "severity": "warning", "category": "style", "comment": "Detailed explanation of the issue", "suggestion": "Specific recommendation for improvement" } ] }

Note:If no relevant files have been changed, the tool will return a "No relevant files changed" message, which is normal behavior.

- npm run dev– Launches the server withts-nodefor rapid iteration.
- npm run build– Produces the compiled JavaScript output indist/.

The project structure is intentionally small:

- src/– TypeScript source for the MCP server.
- dist/– Compiled JavaScript created bynpm run build.
- assets/– Static assets, including the logo used above.

Before wiring the server into any client, make sure you have runnpm run buildsodist/index.jsexists. The commands below assume you execute the client from the repository root so the server can read your git workspace.
-

In VS Code, open the command palette (Cmd/Ctrl+Shift+P) and runClaude: Edit Config File.

Locate themcpServerssection (create it if needed) and add an entry similar to:

{ "mcpServers": { "ndlovu-code-reviewer": { "command": "node", "args": ["/absolute/path/to/ndlovu-code-reviewer/dist/index.js"], "cwd": "/absolute/path/to/ndlovu-code-reviewer" } } }

Save the file and runClaude: Restart Claude Code(or reload VS Code) so the server appears underTools.

Enable the tool for a conversation; Claude Code will streamreview-local-changesresults directly in the sidebar.

gemini mcp add ndlovu-code-reviewer node $(pwd)/dist/index.js

Verify the registration withgemini mcp list.

Launchgeminifrom the same repository directory and use thereview-local-changestool (e.g., run:toolsin the CLI and select it). The CLI spawns the server and forwards stdout back as the review JSON.
-

Open Roo Code and click the server icon in the top of the Roo panel.

ChooseAdd MCP Server → STDIOand fill in:

- Name:ndlovu-code-reviewer
- Command:node
- Arguments:/absolute/path/to/ndlovu-code-reviewer/dist/index.js
- Working Directory:/absolute/path/to/ndlovu-code-reviewer

Save the configuration and enable the server for your workspace. Roo stores it in either the globalmcp_settings.jsonor the project.roo/mcp.jsonfile.

To share with teammates, commit a.roo/mcp.jsonthat contains your preferred launch command, for example:

{ "mcpServers": { "ndlovu-code-reviewer": { "command": "npm", "args": ["run", "start"], "cwd": "." } } }

Roo resolves the working directory relative to the project root, so thenpm run startscript builds on the repository’s own package scripts.

codex mcp add ndlovu-code-reviewer node $(pwd)/dist/index.js

Usecodex mcp listto confirm the entry, then start Codex from the repository root. The CLI exposesreview-local-changesas a tool you can call inside interactive runs.

Contributions are very welcome. If you have ideas for new tools, better linters, or improved prompts:
- Open an issue or discussion so we can align on scope.
- Fork the repository and create a feature branch.
- Add or update documentation/tests where it helps future contributors.
- Submit a pull request describing the change and how you validated it.

If you're unsure where to start, feel free to reach out—there is plenty of room to expand the reviewer’s capabilities, add client examples, and tighten the prompts.

This project is licensed under the ISC License. SeeLICENSE(if present) for details.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

AI-to-AI code review platform — Claude, Codex, and Gemini cross-check each other via MCP, REST API, and CLI for consensus-based results.

A stateful LSP runtime for AI agents: warm language server sessions with 50+ tools for go-to-definition, find-references, diagnostics, rename, and more across 30+ languages.

Persistent code index using Tree-sitter for fast, precise code search. Replaces grep with ~50 token responses instead of 2000+.

Orchestrates a dual-AI engineering loop where a Primary AI plans and implements, while a Review AI validates and reviews, with continuous feedback for optimal code quality. Supports custom AI pairing (Claude, Codex, Gemini, etc.)

AmazingMCP — MCP Server for .NET / C# Codebases

An MCP server that gives AI agents deep understanding of C# codebases via Roslyn — type search, dependency graphs, usage analysis, and architecture overviews, all from a live in-memory compilation.

A platform-agnostic code analysis library with semantic search capabilities and MCP server support.

Enforce consistent C++ style and best practices across your codebase. Analyze naming conventions, memory safety, and const correctness, and get actionable modernization suggestions up to C++23. Accelerate reviews with ready-made prompts and quick access to curated guidelines.

AI-Safe Code Analysis with 113+ MCP tools for guard validation, memory, workflow, and testing.

A Rust-based CLI tool for code-related tasks, operating as an MCP server.

Provides AI assistants with a comprehensive, one-time analysis for complete codebase context and understanding.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.