Cursor Reviewer MCP
Enables code review through Cursor CLI integration with GPT-5. Provides a cursor.review tool that executes code reviews and returns structured JSON results with automatic audit logging.
README
cursor-reviewer-mcp
MCPサーバー「cursor-reviewer」。Claude Code から cursor.review ツールを呼び出し、Cursor CLI(GPT‑5)でレビューを実行し、レビューJSONのみを返します。仕様は 1.specs/spec.md(v3)に準拠しています。
概要
- ツール名:
cursor.review - 入力:
targets,reference,review_request,timeout_ms(オプション),policy(予約・null固定) - 実装: Node.js + TypeScript + MCP SDK(
@modelcontextprotocol/sdk) - 実行:
cursor-agent -p --model gpt-5 --output-format json "<プロンプト>" - 出力: CursorのJSON出力から
resultを取り出し、再度 JSON.parse したレビューJSONのみを返却 - 監査:
reviews/YYYYMMDD-HHMMSS.jsonにレビューJSONを保存
ディレクトリ構成
.
├─ bin/
│ └─ cursor-reviewer-mcp # 実行バイナリ(ビルド済みdistを起動)
├─ src/
│ ├─ server.ts # MCPサーバー本体(stdio)
│ ├─ cursor.ts # Cursor CLI 呼び出し・再試行・パース
│ ├─ prompt/
│ │ └─ template.txt # Cursorに渡すプロンプトテンプレート
│ └─ schemas/
│ └─ cursor.review.input.schema.json
├─ reviews/.gitkeep # 監査ログ出力先(JSON)
├─ .cursor/cli.json # Cursor CLI の権限制御(Read-only)
├─ .claude/agents/build-and-iterate.md # サブエージェント定義テンプレ
├─ package.json
├─ tsconfig.json
├─ .gitignore
└─ README.md
セットアップ
-
Node.js 22 LTS を用意(推奨)
nvm利用時:nvm use(本リポジトリは.nvmrcで 22 を指定)
-
依存インストール(任意のパッケージマネージャ)
npm i
- ビルド
npm run build
- 実行(MCPサーバーとして stdio で起動)
./bin/cursor-reviewer-mcp
- Claude Code への登録例(プロジェクトスコープ)
claude mcp add --scope project cursor-reviewer $(pwd)/bin/cursor-reviewer-mcp
環境変数
- 通常は不要です。
cursor-agentが既にローカル設定済みであれば、環境変数は不要です。 - 特殊な環境(CI 等)で
cursor-agentが環境変数経由の認証を要求する場合のみ、CURSOR_API_KEYを設定してください。
ツール仕様(要点)
- 入力スキーマは
src/schemas/cursor.review.input.schema.jsonに定義。 targets[].pathが存在しない場合はエラーを返却。- Cursor出力のトップレベルJSONから
resultを取り出し、さらに JSON.parse(失敗時1回だけ再実行)。 - 各実行のレビューJSONは
reviews/にタイムスタンプ名で保存。
注意
- このリポジトリにはSDK等の依存は含まれていません。
npm iで取得してください。 - Cursor CLI(
cursor-agent)がPATHに存在する必要があります。
ライセンス
- 本リポジトリは MIT License です。詳細は
LICENSEを参照してください。
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.