Code Review MCP

v1.0.0Version Controlstable

Connects LLMs to GitHub and GitLab to analyze pull and merge requests for logic, security, and architectural alignment. It provides tools for fetching diffs, file contents, and project metadata, alongside guided prompts for professional code reviews.

code-review-mcp-servermcpai-integration
Share:
33
Stars
0
Downloads
0
Weekly
0/5

What is Code Review MCP?

Code Review MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to connects llms to github and gitlab to analyze pull and merge requests for logic, security, and architectural alignment. it provides tools for fetching diffs, file contents, and project metadata, along...

Connects LLMs to GitHub and GitLab to analyze pull and merge requests for logic, security, and architectural alignment. It provides tools for fetching diffs, file contents, and project metadata, alongside guided prompts for professional code reviews.

This server falls under the Version Control and Developer Tools categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Connects LLMs to GitHub and GitLab to analyze pull and merge

Use Cases

Analyze GitHub and GitLab pull requests for quality.
Review code for security, logic, and architectural alignment.
Fetch diffs and provide professional code feedback.
crazyrabbitLTC

Maintainer

LicenseISC License
Languagejavascript
Versionv1.0.0
UpdatedApr 10, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx code-review-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Code Review MCP

The Code Review MCP server connects AI assistants to local codebases and provides two core capabilities: flattening a repository into a structured overview using Repomix, and performing a comprehensive code quality assessment that flags security vulnerabilities, performance issues, maintainability problems, and architectural concerns with severity ratings. It supports multiple LLM back-ends (OpenAI, Anthropic, and Gemini) so teams can choose the model best suited for code analysis. Developers integrate it to automate pre-commit or pre-merge reviews and get structured, actionable feedback without leaving their AI assistant.

Prerequisites

  • Node.js 18+ and npm installed
  • At least one LLM provider API key: OPENAI_API_KEY, ANTHROPIC_API_KEY, or GEMINI_API_KEY
  • Git installed (the server analyses local repository paths)
  • An MCP client such as Claude Desktop or VS Code with MCP extension
1

Clone and build the server

Clone the repository, install dependencies, and build the TypeScript project. The compiled output lands in the build/ directory.

git clone https://github.com/crazyrabbitLTC/mcp-code-review-server.git
cd mcp-code-review-server
npm install
npm run build
2

Create a .env file with your LLM credentials

Create a .env file in the project root. Set LLM_PROVIDER to your preferred provider (OPEN_AI, ANTHROPIC, or GEMINI) and supply the matching API key.

LLM_PROVIDER=ANTHROPIC
ANTHROPIC_API_KEY=your-api-key-here
# ANTHROPIC_MODEL=claude-3-5-sonnet-20241022  # optional override
3

Configure your MCP client

Add the built server to your MCP client configuration, pointing the command to the compiled entry point and loading the .env file.

{
  "mcpServers": {
    "code-review": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-code-review-server/build/index.js"],
      "env": {
        "LLM_PROVIDER": "ANTHROPIC",
        "ANTHROPIC_API_KEY": "your-api-key-here"
      }
    }
  }
}
4

Analyse a repository structure

Use the analyze_repo tool to flatten a codebase into an overview. Point it to the absolute path of your project directory so the tool can inventory files and structure.

5

Run a code review

Use the code_review tool to perform a deep quality assessment. You can focus the review on specific concern areas (security, performance, quality, maintainability) and choose basic or detailed output.

node build/cli.js ./my-project --types .js,.ts --detail detailed --focus security,quality

Code Review MCP Examples

Client configuration

Full MCP client configuration block using Anthropic as the LLM provider. Replace the path and API key with your actual values.

{
  "mcpServers": {
    "code-review": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-code-review-server/build/index.js"],
      "env": {
        "LLM_PROVIDER": "ANTHROPIC",
        "ANTHROPIC_API_KEY": "your-api-key-here"
      }
    }
  }
}

Prompts to try

Use these prompts with your AI assistant after connecting the server to analyse local codebases.

- "Analyse the repository at /home/user/my-app and give me a structural overview"
- "Review the codebase at /home/user/my-app for security vulnerabilities with detailed output"
- "Check the JavaScript and TypeScript files in /home/user/api for performance issues"
- "Review this project's maintainability and list the top 3 architectural concerns"

Troubleshooting Code Review MCP

LLM_PROVIDER is not recognized or API calls fail

Ensure LLM_PROVIDER is set to exactly 'OPEN_AI', 'ANTHROPIC', or 'GEMINI' (case-sensitive) and that the corresponding API key environment variable is populated.

npm run build fails with TypeScript errors

Make sure you are running Node.js 18 or later. Run 'node --version' to check, and if needed install the correct version via nvm: 'nvm install 18 && nvm use 18'.

Server starts but analyze_repo returns empty results

Provide an absolute path to the repository directory, not a relative one. Relative paths may not resolve correctly when the server is launched by the MCP client daemon.

Frequently Asked Questions about Code Review MCP

What is Code Review MCP?

Code Review MCP is a Model Context Protocol (MCP) server that connects llms to github and gitlab to analyze pull and merge requests for logic, security, and architectural alignment. it provides tools for fetching diffs, file contents, and project metadata, alongside guided prompts for professional code reviews. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Code Review MCP?

Follow the installation instructions on the Code Review MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Code Review MCP?

Code Review MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Code Review MCP free to use?

Yes, Code Review MCP is open source and available under the ISC License license. You can use it freely in both personal and commercial projects.

Browse More Version Control MCP Servers

Explore all version control servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "code-review-mcp-server": { "command": "npx", "args": ["-y", "code-review-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Code Review MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides