code-review-mcp

code-review-mcp

Local MCP server for Cursor that analyzes code, finds bugs, generates tests and documentation via OpenRouter.

Category
Visit Server

README

Python MCP OpenRouter

code-review-mcp

Локальный MCP-сервер для Cursor: анализ кода, поиск багов, генерация тестов и документации через OpenRouter.

1. Prerequisites

2. Installation

git clone <repo>
cd <ABSOLUTE_PATH_TO_PROJECT>
python -m venv .venv
.venv\Scripts\activate       # Windows
pip install -r requirements.txt
Copy-Item .env.example .env
# вписать OPENROUTER_API_KEY в .env

Если вы используете не PowerShell, можно просто скопировать .env.example в .env любым удобным способом.

3. Cursor Integration

Подключить сервер можно двумя способами.

Способ A — через глобальный конфиг Cursor:

Файл конфигурации находится по пути %APPDATA%\Cursor\User\globalStorage\cursor.mcp\mcp.json.

Способ B — через .cursor/mcp.json в корне проекта (рекомендуемый):

{
  "mcpServers": {
    "code-review-mcp": {
      "command": "<ABSOLUTE_PATH_TO_PROJECT>\\.venv\\Scripts\\python.exe",
      "args": [
        "<ABSOLUTE_PATH_TO_PROJECT>\\server.py"
      ],
      "env": {
        "OPENROUTER_API_KEY": "<YOUR_OPENROUTER_API_KEY>"
      }
    }
  }
}

Используйте только абсолютные пути. В Windows обратные слеши в JSON нужно писать как \\.

4. Verification

  1. Откройте Cursor Settings -> MCP и убедитесь, что code-review-mcp виден со статусом connected.
  2. В чате Cursor отправьте: Use review_bugs tool on this code: def foo(): pass
  3. Ожидаемый результат: структурированный Markdown-ответ в чате без падения сервера.

5. Available Tools

Tool Description Key params
review_bugs Find logical bugs focus
review_quality Code readability & style focus
review_security Security vulnerabilities focus
review_performance Performance bottlenecks focus
generate_tests Generate unit/integration tests test_framework, test_style
explain_code Explain code audience (junior/middle/senior)
refactor_code Suggest refactoring goal
full_review Combined 4-section review
generate_docs Generate docstrings doc_style

Models

По умолчанию модель задаётся в config.py через DEFAULT_MODEL, FAST_MODEL и STRONG_MODEL.

Любой tool также принимает аргумент model, поэтому при вызове можно явно передать любую OpenRouter-совместимую модель, если нужен другой баланс цены, скорости и качества.

6. Troubleshooting

  • ValueError: OPENROUTER_API_KEY is required — проверьте .env или секцию env в mcp.json.
  • Cursor не видит сервер — проверьте, что в конфиге указаны абсолютные пути и они ведут к существующим файлам.
  • Ответ приходит слишком долго или упирается в таймаут — попробуйте более быструю или более доступную OpenRouter-модель через аргумент model у tool-вызова.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured