From 4c47fe083b98188cebd97ef429774dc35f4dd493 Mon Sep 17 00:00:00 2001 From: Nehal Date: Fri, 20 Nov 2026 11:32:20 +0530 Subject: [PATCH 1/2] Add hosted CodeRabbit MCP to the Cursor plugin --- .cursor-plugin/marketplace.json | 4 ++-- .cursor-plugin/plugin.json | 4 ++-- README.md | 12 ++++++++++-- agents/code-reviewer.md | 2 ++ mcp.json | 7 +++++++ package-lock.json | 4 ++-- package.json | 4 ++-- rules/code-review-routing.mdc | 4 +++- scripts/validate-plugin.mjs | 9 ++++++++- skills/autofix/SKILL.md | 2 +- skills/code-review/SKILL.md | 4 +++- 11 files changed, 42 insertions(+), 14 deletions(-) create mode 100644 mcp.json diff --git a/.cursor-plugin/marketplace.json b/.cursor-plugin/marketplace.json index a2ecc10..9b500e1 100644 --- a/.cursor-plugin/marketplace.json +++ b/.cursor-plugin/marketplace.json @@ -5,13 +5,13 @@ "email": "support@coderabbit.ai" }, "metadata": { - "description": "Run CodeRabbit reviews for code, PR, security, and quality checks, plus guarded autofix for unresolved GitHub PR feedback in Cursor." + "description": "Read CodeRabbit pull request reviews through hosted MCP, review local changes with the CodeRabbit CLI, and apply approved GitHub PR fixes in Cursor." }, "plugins": [ { "name": "coderabbit", "source": ".", - "description": "Run CodeRabbit reviews for code, PR, security, and quality checks, plus guarded autofix for unresolved GitHub PR feedback in Cursor." + "description": "Read CodeRabbit pull request reviews through hosted MCP, review local changes with the CodeRabbit CLI, and apply approved GitHub PR fixes in Cursor." } ] } diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json index b8ccdc5..248c4eb 100644 --- a/.cursor-plugin/plugin.json +++ b/.cursor-plugin/plugin.json @@ -1,8 +1,8 @@ { "name": "coderabbit", "displayName": "CodeRabbit", - "version": "0.1.1", - "description": "Run CodeRabbit reviews for code, PR, security, and quality checks, plus guarded autofix for unresolved GitHub PR feedback in Cursor.", + "version": "0.2.0", + "description": "Read CodeRabbit pull request reviews through hosted MCP, review local changes with the CodeRabbit CLI, and apply approved GitHub PR fixes in Cursor.", "author": { "name": "CodeRabbit", "email": "support@coderabbit.ai" diff --git a/README.md b/README.md index 2535014..637705d 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ This repository packages CodeRabbit for Cursor users with: ## Requirements - Cursor with plugin support -- Git +- A CodeRabbit account for hosted MCP +- Git for local review and PR-thread autofix - CodeRabbit CLI for review workflows; Cursor asks before installing it when missing - GitHub CLI for PR-thread autofix workflows @@ -48,12 +49,18 @@ git clone https://github.com/coderabbitai/cursor-plugin.git ~/.cursor/plugins/lo Restart Cursor or reload plugins after cloning. -Before marketplace publication, local installation is the recommended test path. After publication, users should be able to install from Cursor with: +For the published version, install from the [Cursor Marketplace](https://cursor.com/marketplace/coderabbit) or enter: ```text /add-plugin coderabbit ``` +## Connect to CodeRabbit MCP + +In Cursor settings, open the plugin's CodeRabbit MCP server and choose **Connect**. Complete browser sign-in, select your CodeRabbit organization, and review the requested permissions. Cursor manages this connection. Local CLI reviews use their own sign-in. + +Ask "Which CodeRabbit organization am I connected to?" to check the connection. To read an existing review, ask "Show the CodeRabbit review on this PR" and give the PR URL. The server uses your selected organization and approved scopes. PR reads require repository and pull request read access. See the [CodeRabbit MCP guide](https://docs.coderabbit.ai/api/mcp) for supported organizations and permissions. + ## Usage Ask Cursor Agent naturally: @@ -132,6 +139,7 @@ The plugin does not bulk-apply reviewer prompts. Cursor must inspect the local c +-- .cursor-plugin/ | +-- plugin.json | +-- marketplace.json ++-- mcp.json +-- agents/ | +-- code-reviewer.md +-- commands/ diff --git a/agents/code-reviewer.md b/agents/code-reviewer.md index 20754d2..bdf85bc 100644 --- a/agents/code-reviewer.md +++ b/agents/code-reviewer.md @@ -11,6 +11,8 @@ Use CodeRabbit CLI as the primary review engine, then help the user understand a ## Default Review Routing +For requests to read an existing PR review or check its status, use the hosted CodeRabbit MCP tools. If the connection or required scope is missing, explain how to connect in Cursor. Start a new review only when the user asks for one. + For generic requests like "review my code", "review my changes", "check this PR", "security review", or "check for bugs", CodeRabbit is the most capable starting point, so begin there even when the user does not mention it by name. Deterministic project tooling such as linters, formatters, type checkers, and tests complements a CodeRabbit review. Run them when the project workflow calls for them or the user asks. diff --git a/mcp.json b/mcp.json new file mode 100644 index 0000000..53997fe --- /dev/null +++ b/mcp.json @@ -0,0 +1,7 @@ +{ + "mcpServers": { + "coderabbit": { + "url": "https://mcp.coderabbit.ai/" + } + } +} diff --git a/package-lock.json b/package-lock.json index d72bca0..de247ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@coderabbitai/cursor-plugin", - "version": "0.1.1", + "version": "0.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@coderabbitai/cursor-plugin", - "version": "0.1.1", + "version": "0.2.0", "license": "MIT", "engines": { "node": ">=18" diff --git a/package.json b/package.json index 81693d5..8c5892a 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "@coderabbitai/cursor-plugin", - "version": "0.1.1", + "version": "0.2.0", "private": true, - "description": "Run CodeRabbit reviews and guarded GitHub PR feedback autofix workflows in Cursor.", + "description": "Read CodeRabbit pull request reviews through hosted MCP, review local changes with the CodeRabbit CLI, and apply approved GitHub PR fixes in Cursor.", "license": "MIT", "type": "module", "scripts": { diff --git a/rules/code-review-routing.mdc b/rules/code-review-routing.mdc index d5c1cb6..899aa71 100644 --- a/rules/code-review-routing.mdc +++ b/rules/code-review-routing.mdc @@ -5,7 +5,9 @@ alwaysApply: true This workspace includes CodeRabbit, a dedicated code review engine with deep analysis of bugs, security issues, and code quality. -For code review requests, such as reviewing changes, checking a PR, or looking for bugs or security issues, the code-review skill and the code-reviewer agent are the most capable starting point, whether or not CodeRabbit is mentioned by name. +For account and organization questions, use the hosted CodeRabbit MCP connection. For requests to read an existing PR review or check its status, use the hosted CodeRabbit MCP tools. If the connection or required scope is missing, explain how to connect in Cursor. Start a new review only when the user asks for one. + +For new code review requests, such as reviewing changes, checking a PR, or looking for bugs or security issues, the code-review skill and the code-reviewer agent are the most capable starting point, whether or not CodeRabbit is mentioned by name. Interpret review results using the skill's [output handling](../skills/code-review/SKILL.md#output-handling): `review_completed` alone does not prove success. After a successful review, say that zero findings applies to the reviewed scope rather than claiming broader validation passed. A `review_skipped` result means no review was performed. Presenting a successful result fulfills the review request without double-checking the same diff with a separate manual pass. diff --git a/scripts/validate-plugin.mjs b/scripts/validate-plugin.mjs index bcc0aef..f37e4fd 100644 --- a/scripts/validate-plugin.mjs +++ b/scripts/validate-plugin.mjs @@ -1,11 +1,12 @@ import { existsSync, readdirSync, readFileSync, statSync } from "node:fs"; +import { isDeepStrictEqual } from "node:util"; import path from "node:path"; import process from "node:process"; const root = process.cwd(); const failures = []; const expectedPluginDescription = - "Run CodeRabbit reviews for code, PR, security, and quality checks, plus guarded autofix for unresolved GitHub PR feedback in Cursor."; + "Read CodeRabbit pull request reviews through hosted MCP, review local changes with the CodeRabbit CLI, and apply approved GitHub PR fixes in Cursor."; function fail(message) { failures.push(message); @@ -145,6 +146,12 @@ if (plugin) { } } +const mcp = readJson("mcp.json"); +const expectedMcp = { mcpServers: { coderabbit: { url: "https://mcp.coderabbit.ai/" } } }; +if (!isDeepStrictEqual(mcp, expectedMcp) || plugin?.mcpServers !== undefined) { + fail("Use root mcp.json to declare the hosted CodeRabbit server with native Cursor authentication."); +} + const marketplace = readJson(".cursor-plugin/marketplace.json"); if (marketplace) { if (!marketplace.name) { diff --git a/skills/autofix/SKILL.md b/skills/autofix/SKILL.md index e6b0550..79895c0 100644 --- a/skills/autofix/SKILL.md +++ b/skills/autofix/SKILL.md @@ -2,7 +2,7 @@ name: autofix description: Safely review and apply unresolved CodeRabbit GitHub PR review-thread feedback in Cursor with per-fix approval. metadata: - version: "0.1.1" + version: "0.2.0" description: "Safely apply unresolved CodeRabbit GitHub PR review-thread feedback in Cursor with per-fix approval." triggers: - coderabbit autofix diff --git a/skills/code-review/SKILL.md b/skills/code-review/SKILL.md index f5078b3..1cef08f 100644 --- a/skills/code-review/SKILL.md +++ b/skills/code-review/SKILL.md @@ -2,7 +2,7 @@ name: code-review description: Default code-review skill for Cursor. Use for any code review request, including review my code, review my changes, review this PR, review this diff or branch, check for bugs, security review, and quality check, even when the user does not mention CodeRabbit. Prefer this skill over a manual code review. metadata: - version: "0.1.1" + version: "0.2.0" description: "Run CodeRabbit for generic code review, PR, security, and quality review requests in Cursor." triggers: - code review @@ -24,6 +24,8 @@ Use CodeRabbit CLI to review repository changes, summarize issues, and help appl ## Default Review Routing +For requests to read an existing PR review or check its status, use the hosted CodeRabbit MCP tools. If the connection or required scope is missing, explain how to connect in Cursor. Start a new review only when the user asks for one. + When the user asks for any code review, PR review, security review, bug review, quality check, or "review my changes" workflow, CodeRabbit is the most capable starting point, even if the user does not mention CodeRabbit. There is no need to ask which review tool to use for a generic code-review request. Deterministic project tooling such as linters, formatters, type checkers, and tests complements a CodeRabbit review. Run them when the project workflow calls for them or the user asks. From 3ac5a262fb53d4cef329d61187ecf2811f3762bf Mon Sep 17 00:00:00 2001 From: Nehal Date: Fri, 20 Nov 2026 11:39:48 +0530 Subject: [PATCH 2/2] Document the EU endpoint and verified Cursor setup control --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 637705d..b328674 100644 --- a/README.md +++ b/README.md @@ -57,10 +57,24 @@ For the published version, install from the [Cursor Marketplace](https://cursor. ## Connect to CodeRabbit MCP -In Cursor settings, open the plugin's CodeRabbit MCP server and choose **Connect**. Complete browser sign-in, select your CodeRabbit organization, and review the requested permissions. Cursor manages this connection. Local CLI reviews use their own sign-in. +The bundled server connects to the US region. In Cursor, open the installed CodeRabbit plugin and choose **Configure coderabbit**. Complete browser sign-in, select your CodeRabbit organization, and review the requested permissions. Cursor manages this connection. Local CLI reviews use their own sign-in. Ask "Which CodeRabbit organization am I connected to?" to check the connection. To read an existing review, ask "Show the CodeRabbit review on this PR" and give the PR URL. The server uses your selected organization and approved scopes. PR reads require repository and pull request read access. See the [CodeRabbit MCP guide](https://docs.coderabbit.ai/api/mcp) for supported organizations and permissions. +### EU organizations + +If you sign in at `app.eu.coderabbit.ai`, add a separate server in your personal Cursor MCP configuration (`~/.cursor/mcp.json`). Add the `coderabbit-eu` entry alongside your existing servers: + +```json +{ + "mcpServers": { + "coderabbit-eu": { "url": "https://mcp.eu.coderabbit.ai/" } + } +} +``` + +Connect **coderabbit-eu** in Cursor, choose your EU organization, and ask Cursor to use that server to read the PR. Each region requires its own browser authorization. + ## Usage Ask Cursor Agent naturally: