- MCP Server - Code Review
MCP Server - Code Review
Content
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.
Features
- Connects to OpenRouter API to access various large language models
- Provides two main functionalities:
- Simple text prompt responses (
asktool) - Automated code review with project context analysis (
code_reviewtool)
- Simple text prompt responses (
- Integrates with repomix for codebase packaging and analysis
- Supports multi-language project detection
- Runs as a stdio server compatible with the MCP protocol
Installation
# Install globally
npm install -g mcp-server-code-review
# Or install locally in your project
npm install mcp-server-code-review
Requirements
- Node.js v16 or higher
- OpenRouter API key - obtain one at OpenRouter
Usage
Command Line
mcp-server-code-review --api-key YOUR_OPENROUTER_API_KEY [--default-model MODEL_ID]
Options
--api-key,-k(required): Your OpenRouter API key--default-model,-m(optional): Default model to use (defaults togoogle/gemini-2.0-flash-thinking-exp:free)
Example
mcp-server-code-review --api-key sk-or-v1-xxxxxxxxxxxx --default-model anthropic/claude-3-haiku:free
MCP Tools
This server implements two main MCP tools:
1. Ask Tool
Sends a simple text prompt to OpenRouter API and returns the response.
"mcp-openrouter-stdio": {
"name": "mcp-openrouter-stdio",
"command": "npx",
"args": [
"mcp-openrouter-stdio",
"--api-key",
"sk-or-v1-your_key",
"--default-model",
"google/gemini-2.0-flash-thinking-exp:free"
],
"transport": "stdio"
},
2. Code Review Tool
Performs a code review using OpenRouter API with project context analysis.
{
name: "code_review",
arguments: {
completed_tasks: ["Task 1", "Task 2"],
work_report: "Details of the work performed",
project_path: "/absolute/path/to/project",
planned_tasks: ["Future task 1", "Future task 2"],
language: "js", // Primary language of the project
model: "optional-model-id" // Uses default if not specified
}
}
Supported Languages
The server can automatically detect and analyze projects in various programming languages:
- JavaScript/TypeScript (js)
- Python (python)
- C# (csharp)
- PHP (php)
- Java (java)
- Ruby (ruby)
- Go (go)
- Rust (rust)
- C++ (cpp)
- Swift (swift)
Development
# Clone the repository
git clone https://github.com/arahisman/mcp-server-code-review.git
cd mcp-server-code-review
# Install dependencies
npm install
# Build the project
npm run build
# Watch mode for development
npm run watch
Testing
The repository includes several test scripts:
# Basic server test
node test-mcp-server.js
# Test the ask tool
node test-ask.js
# Simple functionality test
node simple-test.js
License
MIT
Author
Adam Rahisman
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
WindsurfThe new purpose-built IDE to harness magic
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Playwright McpPlaywright MCP server
CursorThe AI Code Editor
Serper MCP ServerA Serper MCP Server
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbot™
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Tavily Mcp
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Amap Maps高德地图官方 MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.