CodeRabbit MCP
README.md
# CodeRabbit MCP
[](https://cursor.com/en/install-mcp?name=CodeRabbit%20MCP&config=eyJDb2RlUmFiYml0IE1DUCI6eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBkZWZmei1maW5lc3NlL2NvZGVyYWJiaXQtbWNwIl19fQ==)
[](https://www.npmjs.com/package/@deffz-finesse/coderabbit-mcp) [](https://www.npmjs.com/package/@deffz-finesse/coderabbit-mcp) [](https://nodejs.org/)
MCP (Model Context Protocol) server that exposes [CodeRabbit](https://coderabbit.ai) IDE extension review comments as tools and resources. Use it from Cursor or any MCP client to scan the latest batch, list unaddressed comments, read exported markdown by file/kind, and mark comments as addressed or wontfix.
The comments this server reads are written locally by the **CodeRabbit IDE extension** ([VS Code](https://marketplace.visualstudio.com/items?itemName=CodeRabbit.coderabbit-vscode) / Cursor). Install that extension and run a CodeRabbit review in your workspace; this MCP server then discovers the latest batch from the extension’s storage and exposes it as tools and resources.
- **Node:** ≥20
- **Transport:** stdio (stdin/stdout for JSON-RPC; stderr for logs)
## Installation
This server is **stdio only** (no remote URL). Use the local connection config for your client.
<details>
<summary><b>Cursor</b></summary>
Go to: **Settings** → **Cursor Settings** → **MCP** → **Add new global MCP server**
Pasting the following configuration into your Cursor `~/.cursor/mcp.json` file is the recommended approach. You may also install in a specific project by creating `.cursor/mcp.json` in your project folder. See [Cursor MCP docs](https://cursor.com/docs/context/mcp) for more info.
Since Cursor 1.0, you can click an install button below for instant one-click installation.
### Local Server Connection
[](https://cursor.com/en/install-mcp?name=CodeRabbit%20MCP&config=eyJDb2RlUmFiYml0IE1DUCI6eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBkZWZmei1maW5lc3NlL2NvZGVyYWJiaXQtbWNwIl19fQ==)
```json
{
"mcpServers": {
"CodeRabbit MCP": {
"command": "npx",
"args": ["-y", "@deffz-finesse/coderabbit-mcp"]
}
}
}
```
Optional: add `"env": { "RABBIT_DISCOVERY_ROOT": "/path/to/workspaceStorage", "RABBIT_OUTPUT_BASE": "/path/to/output" }` to override discovery or output paths.
</details>
<details>
<summary><b>Claude Code</b></summary>
Run this command. See [Claude Code MCP docs](https://code.claude.com/docs/en/mcp) for more info.
### Local Server Connection
```sh
claude mcp add CodeRabbit-MCP -- npx -y @deffz-finesse/coderabbit-mcp
```
</details>
<details>
<summary><b>Claude Desktop</b></summary>
Open Claude Desktop developer settings and edit your `claude_desktop_config.json` file. See [Claude Desktop MCP docs](https://docs.anthropic.com/en/docs/build-with-claude/mcp) for more info.
### Local Server Connection
- **macOS / Linux:** `~/.claude/claude_desktop_config.json`
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"CodeRabbit MCP": {
"command": "npx",
"args": ["-y", "@deffz-finesse/coderabbit-mcp"]
}
}
}
```
Restart Claude Desktop after editing.
</details>
<details>
<summary><b>VS Code</b></summary>
Add this to your VS Code MCP config file, or click the **Install in VS Code** badge at the top for one-click install (opens VS Code). See [VS Code MCP docs](https://code.visualstudio.com/docs/copilot/customization/mcp-servers) for more info.
### Local Server Connection
[](vsweb+mcp:/install?%7B%22name%22%3A%22CodeRabbit%20MCP%22%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40deffz-finesse%2Fcoderabbit-mcp%22%5D%7D)
```json
"mcp": {
"servers": {
"CodeRabbit MCP": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@deffz-finesse/coderabbit-mcp"]
}
}
}
```
</details>
<details>
<summary><b>Antigravity (Google)</b></summary>
Add this to your Antigravity MCP config file. See [Antigravity MCP docs](https://antigravity.google/docs/mcp) for more info.
### Local Server Connection
```json
{
"mcpServers": {
"CodeRabbit MCP": {
"command": "npx",
"args": ["-y", "@deffz-finesse/coderabbit-mcp"]
}
}
}
```
</details>
<details>
<summary><b>Other clients (Windsurf, Cline, etc.)</b></summary>
Add the following to your client’s MCP config. Use `mcpServers` (or your client’s equivalent) with the same `command` and `args`.
```json
{
"mcpServers": {
"CodeRabbit MCP": {
"command": "npx",
"args": ["-y", "@deffz-finesse/coderabbit-mcp"]
}
}
}
```
</details>
## Install (from source)
```bash
npm install -g @deffz-finesse/coderabbit-mcp
```
Or clone and build:
```bash
git clone <repo-url>
cd coderabbit-mcp
npm install
npm run build
```
## Run (manual)
The server uses stdio (stdin/stdout). When not using the Installation snippets above: **command** = `node` (or `npx`), **args** = path to `dist/index.js` or `["-y", "@deffz-finesse/coderabbit-mcp"]`. It does not listen on a port.
## Environment
|Variable|Purpose|
|------|--------|
|`RABBIT_DISCOVERY_ROOT`|Root directory to search for CodeRabbit batch folders. Default: `~/.cursor-server/data/User/workspaceStorage` (Cursor workspace storage). Set this for VS Code or other editors to point at their workspace storage.|
|`RABBIT_OUTPUT_BASE`|Base directory for the SQLite DB and exported markdown. Default: `.coderabbit` under the current working directory, then `~/.coderabbit` if cwd is not writable.|
Data written by the server:
- **DB:** `<RABBIT_OUTPUT_BASE>/rabbit-comment.db` (or `.coderabbit/rabbit-comment.db` when using default).
- **Exports:** `<RABBIT_OUTPUT_BASE>/exports/rabbit-<batchId>/` (markdown files per file/kind).
## Available tools
All tools are under the `rabbit` namespace.
|Tool|Description|
|------|-------------|
|`rabbit.ping`|No-op; use to check the server is reachable.|
|`rabbit.scan`|Discover latest CodeRabbit batch, parse comments, export markdown, persist to DB. Returns JSON with `ok`, `batchId`, `exportDir`, `filesProcessed`, `commentsExtracted`, `unaddressedCount` (or `error` on failure). No parameters; idempotent.|
|`rabbit.list_unaddressed`|List unaddressed comments for a batch. Optional `batchId` (default: latest). Returns `byFile`, `countByKind`, `resourceUris` per file.|
|`rabbit.get_comment`|Get full comment record and status history by `comment_id` (fingerprint). Requires `comment_id`.|
|`rabbit.mark_addressed`|Set comment status to addressed. Requires `comment_id`; optional `note`.|
|`rabbit.mark_wontfix`|Set comment status to wontfix. Requires `comment_id`; optional `note`.|
## Resources
- **rabbit-markdown:** Exported markdown for a repository file and comment kind within a batch.
URI form: `rabbit://b/{batchId}/f/{filename}/{kind}` (filename and kind are URL-encoded).
List returns URIs for the latest batch; read returns the markdown content.
## Prompts
- **rabbit-triage:** Runs a scan, lists unaddressed comments by file, and returns a triage summary with suggested next steps.
For detailed installation steps (Cursor, VS Code, Claude, etc.), architecture, configuration, and development, see the [project docs](docs/README.md).
## Develop
```bash
npm install
npm run dev # Run with tsx (stdio; connect an MCP client)
npm run build # Compile TypeScript to dist/
npm run typecheck # tsc --noEmit
npm run lint:check # Biome check
npm run lint:fix # Biome check --write
npm test # Build + Node test runner
```
## Security / Trust model
This server is **local-only**: it runs as a subprocess of your MCP client (e.g. Cursor) and does not open network ports or authenticate users. All data stays on your machine.
- **No authentication:** Anyone who can run the server can run all tools and read all resources. Use normal OS and editor access controls.
- **Paths:** Discovery root (`RABBIT_DISCOVERY_ROOT`) and output base (`RABBIT_OUTPUT_BASE`) are taken from the environment. The server reads from the discovery root and writes the DB and exports under the output base. Ensure these paths point at locations you trust.
- **Inputs:** Tool and resource inputs (e.g. `comment_id`, `batchId`) are used only as identifiers; path traversal is prevented when reading exported markdown. Tool arguments are validated with Zod; invalid args return a structured error (`Invalid arguments` with details) rather than being passed through.
## License
MIT © Deffz Finesse. See [LICENSE](LICENSE) for the full text.
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessSyncing