Cursor Reviewer MCP

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.

Category
Visit Server

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

セットアップ

  1. Node.js 22 LTS を用意(推奨)

    • nvm 利用時: nvm use(本リポジトリは .nvmrc で 22 を指定)
  2. 依存インストール(任意のパッケージマネージャ)

npm i
  1. ビルド
npm run build
  1. 実行(MCPサーバーとして stdio で起動)
./bin/cursor-reviewer-mcp
  1. 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

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