This MCP server provides a powerful tool for performing code reviews using various Large Language Models (LLMs) through the Model Context Protocol. It analyzes git diff output to deliver detailed feedback on your code changes, making it compatible with AI coding assistants like Claude Code, Cursor, Windsurf, and other MCP-compatible clients.
GOOGLE_API_KEY
for Google modelsOPENAI_API_KEY
for OpenAI modelsANTHROPIC_API_KEY
for Anthropic modelsNavigate to your project:
cd /path/to/your-git-project
Run the MCP Server:
npx -y @vibesnipe/code-review-mcp
The server will start and display: [MCP Server] Code Reviewer MCP Server is running via stdio and connected to transport.
To install code-review-mcp for Claude Desktop automatically:
npx -y @smithery/cli install @praneybehl/code-review-mcp --client claude
Once the server is running:
Add as an MCP Server in Claude Code:
claude mcp add code-reviewer -s <user|local> -e GOOGLE_API_KEY="key" -- npx -y @vibesnipe/code-review-mcp
Use Smart Slash Commands in Claude Code:
examples/claude-commands/
directory to your project's .claude/commands/
directoryclaude > /project:review-staged-claude
Configure Cursor's Rules for Code Review:
Create or open .cursor/rules/project.mdc
and add slash commands like:
## Slash Commands
/review-staged: Use the perform_code_review tool from the code-reviewer MCP server to review staged changes. Use anthropic provider with claude-3-7-sonnet-20250219 model. Base the task description on our current conversation context and focus on code quality and best practices.
Add the MCP Server in Cursor settings:
"code-reviewer": {
"command": "npx",
"args": ["-y", "@vibesnipe/code-review-mcp"],
"env": {
"GOOGLE_API_KEY": "your-google-api-key",
"OPENAI_API_KEY": "your-openai-api-key",
"ANTHROPIC_API_KEY": "your-anthropic-api-key"
}
}
Configure the MCP Server in Windsurf:
"code-reviewer": {
"command": "npx",
"args": ["-y", "@vibesnipe/code-review-mcp"],
"env": {
"GOOGLE_API_KEY": "your-google-api-key",
"OPENAI_API_KEY": "your-openai-api-key",
"ANTHROPIC_API_KEY": "your-anthropic-api-key"
}
}
Create custom workflows in .windsurf/workflows/
directory
perform_code_review
Tool Parameterstarget
: Specifies what changes to review:
'staged'
: Reviews only changes staged for commit'HEAD'
: Reviews all uncommitted changes'branch_diff'
: Reviews changes between a base branch/commit and current HEADtaskDescription
: Description of the task or feature being implementedllmProvider
: Select from 'google'
, 'openai'
, or 'anthropic'
modelName
: Specific model to use (examples):
'gemini-2.5-pro-preview-05-06'
'o4-mini'
, 'gpt-4.1'
, 'o3'
'claude-3-7-sonnet-20250219'
reviewFocus
: Optional specific areas to focus on during reviewprojectContext
: Optional background about the project architecturediffBase
: Required if target
is 'branch_diff'
, specifies the base branch to compare againstmaxTokens
: Optional maximum tokens for the LLM response (default: 32000)Set these in your shell or in a .env
file in your project's root:
GOOGLE_API_KEY="your_google_api_key"
OPENAI_API_KEY="your_openai_api_key"
ANTHROPIC_API_KEY="your_anthropic_api_key"
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "code-reviewer" '{"command":"npx","args":["-y","@vibesnipe/code-review-mcp"],"env":{"GOOGLE_API_KEY":"your-google-api-key","OPENAI_API_KEY":"your-openai-api-key","ANTHROPIC_API_KEY":"your-anthropic-api-key"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"code-reviewer": {
"command": "npx",
"args": [
"-y",
"@vibesnipe/code-review-mcp"
],
"env": {
"GOOGLE_API_KEY": "your-google-api-key",
"OPENAI_API_KEY": "your-openai-api-key",
"ANTHROPIC_API_KEY": "your-anthropic-api-key"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"code-reviewer": {
"command": "npx",
"args": [
"-y",
"@vibesnipe/code-review-mcp"
],
"env": {
"GOOGLE_API_KEY": "your-google-api-key",
"OPENAI_API_KEY": "your-openai-api-key",
"ANTHROPIC_API_KEY": "your-anthropic-api-key"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect