Overview
What is MCP Server - Code Review?
A server implementation for the Model Context Protocol (MCP) that connects Cursor to OpenRouter API via stdio, enabling code review and AI chat functionalities. It is designed for developers using Cursor who want automated code review with project context and access to various large language models.
How to use MCP Server - Code Review?
Install globally or locally via npm (npm install -g mcp-server-code-review). Run from the command line: mcp-server-code-review --api-key YOUR_OPENROUTER_API_KEY [--default-model MODEL_ID]. The server implements two MCP tools: ask for text prompts and code_review for project‑aware code review. Configure the server in Cursor by adding a "mcp-openrouter-stdio" entry using npx with your API key and optional model.
Key features of MCP Server - Code Review
- Connects to OpenRouter API for various large language models
- Provides
asktool for simple text prompt responses - Provides
code_reviewtool with project context analysis - Integrates with repomix for codebase packaging and analysis
- Supports multi‑language project detection automatically
- Runs as a stdio server compatible with MCP protocol
Use cases of MCP Server - Code Review
- Get AI‑powered answers to coding questions directly in Cursor.
- Automate code reviews with context from completed tasks and work reports.
- Analyze entire project directories for code quality and suggestions.
- Use from any MCP‑compatible editor (e.g., Cursor) for flexible AI chat.
FAQ from MCP Server - Code Review
What is the OpenRouter API key and how do I get one?
The API key is required to connect to OpenRouter. You can obtain one at OpenRouter.
What are the runtime requirements?
Node.js version 16 or higher and an OpenRouter API key. No other external dependencies are needed.
What LLM models can be used?
Any model available on OpenRouter. The default is google/gemini-2.0-flash-thinking-exp:free. You can override it with the --default-model option or per‑call in the code_review tool.
How does the code_review tool differ from the ask tool?
The ask tool sends a simple text prompt and returns the response. The code_review tool includes project‑specific context such as completed tasks, work report, project path, and planned tasks, enabling a more thorough analysis.
What programming languages are supported for project detection?
JavaScript/TypeScript, Python, C#, PHP, Java, Ruby, Go, Rust, C++, and Swift. The server automatically detects the primary language.