Code Review

by crazyrabbitltc

5 stars
487 downloads
Not rated
GitHub

About

Enables automated code reviews through multiple LLM providers by analyzing repository structures and evaluating code for security, performance, quality, and maintainability with structured output containing issues, strengths, and recommendations.

Details

Author
crazyrabbitltc
Repository
crazyrabbitLTC/mcp-code-review-server
GitHub stars
5
Downloads
487
Categories
Design, Developer Tools, AI, Security, Automation, Infrastructure

- Flatten codebases using Repomix
- Analyze code with Large Language Models
- Get structured code reviews with specific issues and recommendations
- Support for multiple LLM providers (OpenAI, Anthropic, Gemini)
- Handles chunking for large codebases

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Code Review
    Command (node, npx, python, etc.) node
    Arguments
    • Argument 1 build/index.js
    Environment
    • LLM_PROVIDER OPEN_AI
    • OPENAI_API_KEY your_openai_api_key_here

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

npm install

LLM_PROVIDER=OPEN_AI
OPENAI_API_KEY=your_openai_api_key_here
```

analyze_repo

Flattens a codebase using Repomix to provide a high-level overview of its structure and organization.

code_review

Performs a comprehensive code quality assessment, identifying issues and providing actionable recommendations for improvement.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "code review": {
            "env": {
                "LLM_PROVIDER": "OPEN_AI",
                "OPENAI_API_KEY": "your_openai_api_key_here"
            },
            "args": [
                "build/index.js"
            ],
            "command": "node"
        }
    }
}

Linux

{
    "env": {
        "LLM_PROVIDER": "OPEN_AI",
        "OPENAI_API_KEY": "your_openai_api_key_here"
    },
    "args": [
        "build/index.js"
    ],
    "command": "node"
}

Macos

{
    "env": {
        "LLM_PROVIDER": "OPEN_AI",
        "OPENAI_API_KEY": "your_openai_api_key_here"
    },
    "args": [
        "build/index.js"
    ],
    "command": "node"
}

Windows

{
    "env": {
        "LLM_PROVIDER": "OPEN_AI",
        "OPENAI_API_KEY": "your_openai_api_key_here"
    },
    "args": [
        "/c",
        "node",
        "build/index.js"
    ],
    "command": "cmd"
}
# Code Review Server A custom MCP server that performs code reviews using Repomix and LLMs. ## Features - Flatten codebases using Repomix - Analyze code with Large Language Models - Get structured code reviews with specific issues and recommendations - Support for multiple LLM providers (OpenAI, Anthropic, Gemini) - Handles chunking for large codebases ## Installation ```bash # Clone the repository git clone https://github.com/yourusername/code-review-server.git cd code-review-server # Install dependencies npm install # Build the server npm run build ``` ## Configuration Create a `.env` file in the root directory based on the `.env.example` template: ```bash cp .env.example .env ``` Edit the `.env` file to set up your preferred LLM provider and API key: ```bash # LLM Provider Configuration LLM_PROVIDER=OPEN_AI OPENAI_API_KEY=your_openai_api_key_here ``` ## Usage ### As an MCP Server The code review server implements the Model Context Protocol (MCP) and can be used with any MCP client: ```bash # Start the server node build/index.js ``` The server exposes two main tools: 1. `analyze_repo`: Flattens a codebase using Repomix 2. `code_review`: Performs a code review using an LLM ## When to Use MCP Tools This server provides two distinct tools for different code analysis needs: ### analyze_repo **Use this tool when you need to:** - Get a high-level overview of a codebase's structure and organization - Flatten a repository into a textual representation for initial analysis - Understand the directory structure and file contents without detailed review - Prepare for a more in-depth code review - Quickly scan a codebase to identify relevant files for further analysis **Example situations:** - "I want to understand the structure of this repository before reviewing it" - "Show me what files and directories are in this codebase" - "Give me a flattened view of the code to understand its organization" ### code_review **Use this tool when you need to:** - Perform a comprehensive code quality assessment - Identify specific security vulnerabilities, performance bottlenecks, or code quality issues - Get actionable recommendations for improving code - Conduct a detailed review with severity ratings for issues - Evaluate a codebase against best practices **Example situations:** - "Review this codebase for security vulnerabilities" - "Analyze the performance of these specific JavaScript files" - "Give me a detailed code quality assessment of this repository" - "Review my code and tell me how to improve its maintainability" **When to use parameters:** - `specificFiles`: When you only want to review certain files, not the entire repository - `fileTypes`: When you want to focus on specific file extensions (e.g., .js, .ts) - `detailLevel`: Use 'basic' for a quick overview or 'detailed' for in-depth analysis - `focusAreas`: When you want to prioritize certain aspects (security, performance, etc.) ### Using the CLI Tool For testing purposes, you can use the included CLI tool: ```bash node build/cli.js <repo_path> [options] ```
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.