mcp-code-reviewer
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP PR Review
An MCP (Model Context Protocol) server for automatic code review using OpenRouter as the LLM provider.
π Features
Intelligent code review: Analyzes your code and suggests improvements based on:
Performance optimizations
Clean Code principles
SOLID principles application
Proper async handling
Error handling
Security best practices
Multiple LLM support: Uses OpenRouter to access different models
Direct file modification: Inserts JSDoc review comments directly into your files
Easy integration: Connects with any MCP-compatible client
Related MCP server: Claude Code Review MCP
π Requirements
Node.js >= 18.0.0
Yarn 4
OpenRouter API Key
π οΈ Installation
Clone the repository
git clone <your-repo>
cd mcp-pr-reviewInstall dependencies:
yarn installConfigure environment variables:
cp .env.example .envEdit the .env file and add your OpenRouter API key:
OPENROUTER_API_KEY=your_api_key_here
OPENROUTER_MODEL=moonshotai/kimi-k2:freeπ Getting OpenRouter API Key
Go to OpenRouter
Create an account
Generate an API key in your dashboard
Add it to your
.envfile
π Usage
Running the server
# Production mode
yarn start
# Development mode (with watch)
yarn devUsing MPC client
Add this configuration to your MCP configuration file:
{
"mcpServers": {
"code-review": {
"command": "node",
"args": ["path/to/mcp-pr-review/src/index.js"],
"env": {
"OPENROUTER_API_KEY": "your_api_key_here"
}
}
}
}Available Tools
review
Reviews a code file and inserts JSDoc review comments directly into the file.
Parameters:
file_path(string): Absolute path to the file you want to review
Important notes:
β οΈ Only absolute paths are accepted (paths starting with
/)π The tool modifies the original file by inserting JSDoc comments
π Review categories include: SOLID, PERFORMANCE, ASYNC, ERROR_HANDLING, CLEAN_CODE, SECURITY
Example usage:
# In your MCP client (like Claude Desktop)
/review /Users/username/project/src/myfile.jsWhat the tool does:
Reads the specified file
Analyzes the code for issues
Generates JSDoc comments with @fixme annotations
Inserts these comments directly into the file before problematic lines
Saves the modified file
Example output format:
/**
* @fixme PERFORMANCE: Consider using more efficient algorithm
* @example Use Map instead of nested loops for O(1) lookups
*/
function inefficientFunction() {
// your code here
}π§ Configuration
Environment Variables
Variable | Description | Default | Required |
| Your OpenRouter API key | - | β |
| API base URL |
| β |
| Model to use |
| β |
Recommended Models
Free models:
moonshotai/kimi-k2:freemeta-llama/llama-3.1-8b-instruct:freegoogle/gemini-flash-1.5
Paid models (better quality):
anthropic/claude-3-haiku:betamicrosoft/wizardlm-2-8x22banthropic/claude-3-sonnet:beta
π§ͺ Development
Project Structure
mcp-pr-review/
βββ src/
β βββ index.js # Main MCP server
βββ package.json # Dependencies and scripts
βββ .env.example # Environment variables template
βββ .gitignore # Files to ignore by git
βββ README.md # This documentationAvailable Scripts
yarn start # Run in production
yarn dev # Run in development mode
yarn test # Run tests (not implemented yet)Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
The OpenZeppelin Solidity Contracts MCP server integrates OpenZeppelin's security and style rules into AI-driven development workflows, enabling AI assistants to generate safe, correct, and production-ready smart contracts. It automatically validates generated code against OpenZeppelin standards (including imports, modifiers, naming conventions, and security checks) and supports various contract types including ERC-20, ERC-721, ERC-1155, Stablecoins, RWA, Governor, and Account contracts through prompt-driven workflows.
Zero-log MCP server with 49 tools for AI guardrails, secret scanning, MCP linting & EU compliance.
491Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceAn MCP server that automatically generates documentation, test plans, and code reviews for code repositories by analyzing directory structures and code files using AI models via OpenRouter API.6Creative Commons Zero v1.0 Universal
- AlicenseAqualityDmaintenanceAn MCP server that provides code review functionality using OpenAI, Google, and Anthropic models, serving as a "second opinion" tool that works with any MCP client.141 npm34MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for code review using OpenRouter API. Supports local code review via MCP or web interface.12ISC
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides agentic code review powered by OpenAI-compatible models, designed for use with Claude Code.1MIT