Code Review MCP
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.
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
Maintainer
Works with
Installation
Manual Installation
npx code-review-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 buildCreate 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 overrideConfigure 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"
}
}
}
}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.
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,qualityCode 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.
Code Review MCP Alternatives — Similar Version Control Servers
Looking for alternatives to Code Review MCP? Here are other popular version control servers you can use with Claude, Cursor, and VS Code.
Ruiyu MA
★ 30.1kConnect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
GitMCP
★ 8.1kTransforms any GitHub repository or GitHub Pages site into a documentation hub for AI assistants using the Model Context Protocol. It allows AI tools to access real-time code and documentation to prevent hallucinations and provide accurate API usage
GitHub Codemunch
★ 1.8kA token-efficient MCP server for exploring GitHub repositories using tree-sitter AST parsing to extract symbol signatures and summaries. It enables users to search and retrieve specific code components while significantly reducing token consumption c
Azure DevOps MCP Server
★ 1.7kThis server provides a convenient API for interacting with Azure DevOps services, enabling AI assistants and other tools to manage work items, code repositories, boards, sprints, and more. Built with the Model Context Protocol, it provides a standard
GitHub Official
★ 1.2kOfficial GitHub integration with comprehensive API coverage
Azure DevOps
★ 367Enables interaction with Azure DevOps through Cursor chat, providing tools to manage builds, pipelines, work items, sprints, and board operations. Supports secure authentication via Personal Access Tokens and allows natural language-driven DevOps tas
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.
Set Up Code Review MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.