CodeRabbit

CodeRabbit is the governance and control layer for agentic software development helping developers trust AI written code.

Hosted MCP Server

npx add-mcp 'https://mcp.coderabbit.ai/'

Installs into Claude Code, Codex, Cursor and more

Documentation

CodeRabbit MCP server

Connect Claude Code, Codex, Claude, or another MCP client to CodeRabbit's MCP server so your AI agent can read pull requests and reviews, request reviews, and run coding tasks.

GitHub Cloud (The MCP server's product tools are available for GitHub Cloud organizations.)

The CodeRabbit MCP server turns CodeRabbit into tools for your AI agent. Connect it to Claude Code, Codex, or Claude, and the agent can read your pull requests and CodeRabbit's review threads, check review status, request a review, start and steer coding tasks, and work with Triage, security findings, Verify, automations, reports, Knowledge Base, and settings. The agent acts as you, in the organization you choose, within the permissions you approve.

[!NOTE]

This page is about your AI agent calling CodeRabbit. It isn't Connections in CodeRabbit's settings, where CodeRabbit calls your own MCP servers during reviews and chat. For that, see Connect MCP servers.

The CodeRabbit MCP server is also different from the docs MCP server that Mintlify provides for this documentation. The CodeRabbit MCP server acts in CodeRabbit: it reads your pull requests and starts reviews and coding tasks. The docs MCP server only searches these docs, and you add it from the menu at the top of any docs page. If one client uses both, give them different names, such as coderabbit for the CodeRabbit MCP server and coderabbit-docs for the docs MCP server.

The MCP server suits interactive work: your agent acts with your own CodeRabbit account, in one organization, after you sign in through your browser. It doesn't suit unattended jobs, such as CI pipelines or scheduled scripts, because every connection starts with a person signing in. It doesn't suit managing users and seats across an Enterprise SSO workspace either, because each connection reaches one organization. For those jobs, use the API with a key; Authentication says which key fits which job.

How it works

PropertyValue
Server URLUS: https://mcp.coderabbit.ai/. EU: https://mcp.eu.coderabbit.ai/.
TransportStreamable HTTP
Sign-inOAuth authorization code flow with PKCE (S256) in your browser, with consent per organization. No API key.
Consent pageUS: https://app.coderabbit.ai/mcp/connect. EU: https://app.eu.coderabbit.ai/mcp/connect.
ClientsPublic OAuth clients, registered through dynamic client registration or a client ID metadata document
OrganizationOne per connection, chosen when you approve it

Most tools come from the CodeRabbit API: an API operation becomes a tool with the same name as its operationId, such as get_me or create_code_task, the operation's summary and description as its title and description, and the same inputs and outputs. Tools run the same permission checks as the API and the CodeRabbit app, so the agent can only do what your role, repository access, and plan already allow. See MCP tools for the full list.

Availability

  • Plan: the MCP server has no plan requirement of its own. Each tool applies the plan and access checks of the operation behind it; see Plans.
  • Region: most organizations are in CodeRabbit's US region and connect to https://mcp.coderabbit.ai/. If you sign in to CodeRabbit at https://app.eu.coderabbit.ai/, your organization is in the EU region; connect to https://mcp.eu.coderabbit.ai/. If you aren't sure, use the US server. A connection works only on the server that created it.
  • Git platform: GitHub Cloud organizations get all the tools in MCP tools. You can connect an organization on another Git platform, but only the account tools work there: connection_status, get_me, and get_usage.
  • Deployment: organizations on self-hosted CodeRabbit or on a self-hosted Git provider, such as GitHub Enterprise Server, can't connect.
  • GitHub identity: list_pull_requests and get_pull_request need a GitHub account linked to your CodeRabbit user. If you sign in to CodeRabbit with GitHub, that account is linked already. In an Enterprise SSO workspace, connect your GitHub account in CodeRabbit or ask an admin to link it; see How IdP members, Git identities, and seats relate.

Choose scopes

Scopes are the permissions your client asks for when it connects. CodeRabbit's consent page shows them, and the connection gets exactly the scopes you approve. A scope limits what the agent can do; it never grants access you don't already have in CodeRabbit.

Decide on scopes before you connect. Every scope list must include connection: CodeRabbit refuses a sign-in whose list leaves it out. Claude Code and Codex request only the scopes you configure, and without a setting they request only connection, which is enough for connection_status and nothing else.

Common setups

JobScopesTools the agent calls
Check the review status of your pull request and read its summaryconnection account:read repositories:read pull_requests:readlist_pull_requests with repository_url and head_branch, or get_pull_request with the pull request URL. Both return the repository as owner/name and the pull request number, not the numeric repository ID. Call list_repositories, follow next_page_token, and take the id of the repository whose full_name matches. Then call get_pull_request_review with that repository_id and the number, and get_pull_request_review_summary. If review is null, CodeRabbit has no status for the current commit; see follow the review status. Read the summary instead: summary: null means CodeRabbit hasn't posted one.
Request a review after you pushThe scopes above, plus reviews:writeget_pull_request_review first. Each request starts a review like a new push, so request again only when no review of the current head is running or completed. Then request_pull_request_review and get_pull_request_review to follow the status. The pull request must be open. No API key is involved.
Read open plan feedback on a coding taskconnection account:read code:readlist_code_tasks, then pick the task whose pull_request_url or title matches. get_code_task, get_code_task_plan, and list_code_task_plan_comments follow. Keep the threads with status: open.
Work through your Triage queueconnection account:read triage:read, plus triage:write to set prioritieslist_triage_changes, get_triage_change, and list_triage_change_history. With triage:write, set_triage_change_priority sets a change's manual priority: pass the priority.revision from get_triage_change as expected_revision, and reuse the same idempotency_key when you retry.
Manage Triage rulesconnection account:read triage:read triage:writelist_triage_rules, preview_triage_rule, create_triage_rule, update_triage_rule, and transition_triage_rule.
Explore without changing anythingconnection account:read usage:read repositories:read pull_requests:read, plus any other read scopes from the table belowget_me, get_usage, list_repositories, list_pull_requests, and get_pull_request, plus the read tools of the areas you add.

To combine jobs, join their scopes. For one agent that reads your pull request's review, requests a review, and reads plan feedback, use this list:

connection account:read repositories:read pull_requests:read reviews:write code:read

Claude Code takes it space-separated in oauth.scopes. Codex takes it comma-separated.

To read plan feedback, the agent passes each result to the next call: get_code_task returns the task's plan_version; get_code_task_plan takes it as version and returns the plan's sha256; list_code_task_plan_comments takes version and sha256. The result has open and resolved threads, so the agent keeps the threads whose status is open.

Scopes by area

AreaRead scopeWrite scopeWhat the agent can do
ConnectionconnectionCheck which account and organization the connection uses. Always include it: a sign-in whose scope list leaves it out fails.
Accountaccount:readRead your profile and organization memberships. Include it in every list: nearly every tool also needs it.
Usageusage:readRead usage and credit balances.
Repositoriesrepositories:readList and read the repositories you can access.
Pull requestspull_requests:readreviews:writeRead pull requests, discussions, and review state; with the write scope, request reviews.
Local reviewsreviewStart reviews of local code, which the CodeRabbit CLI uploads from your machine.
Coding taskscode:readcode:writeRead coding tasks; with the write scope, create tasks and make code changes through them.
Triagetriage:readtriage:writeRead Triage changes and rules; with the write scope, set a change's manual priority and create, change, and delete rules.
Securitysecurity:readsecurity:writeRead security findings; with the write scope, start scans and request fixes.
Settings, users, and rolesconfiguration:readconfiguration:writeRead settings, users, roles, and audit logs; with the write scope, change organization and repository settings and manage roles and seats.
Connectionsconnections:readconnections:writeRead the workspace connections in CodeRabbit's settings, such as the MCP servers CodeRabbit calls during reviews and chat; with the write scope, manage them. It isn't about the CodeRabbit MCP server your agent uses.
Knowledge Baseknowledge:readknowledge:writeRead Learnings, connected knowledge repositories, and architecture documents; with the write scope, manage Learnings and connected repositories.
Reportsreports:readreports:writeRead reports; with the write scope, generate and manage them.
Verifyverify:readverify:writeRead Verify jobs and findings; with the write scope, configure Verify and run jobs.
Automationsautomations:readautomations:writeRead automations and their runs; with the write scope, manage and run them.

A read scope doesn't include its write scope, so request both when the agent reads before it changes something. Triage rule changes need both. Write scopes that start work, such as review, reviews:write, code:write, security:write, verify:write, automations:write, reports:write, and triage:write, let the agent take actions that can consume credits or paid usage. When a tool needs a scope that your connection lacks, the call fails with insufficient_scope and names the missing scope. MCP tools lists the scopes for each group of tools.

To add a scope later, add it to your client's scope list and sign in again. Keep connection in the list. A connection never gains scopes on its own.

Connect your agent

The Claude Code and Codex examples connect with the scopes for exploring without changing anything, from Common setups. Add the scopes your jobs need before you sign in.

The steps use the US server, which most organizations use. If your organization is in the EU region, use https://mcp.eu.coderabbit.ai/ wherever they show https://mcp.coderabbit.ai/.

[tab] Claude Code

  1. Add the server with the scopes you want in oauth.scopes. --scope user is Claude Code's configuration scope, which makes the server available in all your projects; it isn't a CodeRabbit permission.

    claude mcp add-json --scope user coderabbit '{"type":"http","url":"https://mcp.coderabbit.ai/","oauth":{"scopes":"connection account:read usage:read repositories:read pull_requests:read"}}'
    
  2. In Claude Code, run /mcp, select coderabbit, and sign in. You can also run claude mcp login coderabbit from your shell.

  3. Approve the connection in your browser. See Approve the connection.

Claude Code requests exactly the scopes in oauth.scopes. To change them, run claude mcp logout coderabbit and claude mcp remove coderabbit, add the server again with the new list, and sign in again. See Claude Code's MCP documentation for configuration scopes and project .mcp.json files.

[tab] Codex

  1. Add the server:

    codex mcp add coderabbit --url https://mcp.coderabbit.ai/
    
  2. Sign in with the scopes you want, separated by commas:

    codex mcp login coderabbit --scopes connection,account:read,usage:read,repositories:read,pull_requests:read
    
  3. Approve the connection in your browser. See Approve the connection.

In the Codex TUI, run /mcp to check that the server is connected. To change scopes, run codex mcp login again with the new list. See Codex's MCP documentation for other configuration options.

[tab] Claude

These steps add CodeRabbit as a custom connector in Claude on the web and in Claude Desktop.

  1. Open the connector settings:
    • Pro and Max: go to Customize > Connectors, then click + Add > Add custom connector.
    • Team and Enterprise: an owner goes to Organization settings > Connectors, clicks Add, hovers over Custom, and selects Web.
  2. Enter CodeRabbit as the name and https://mcp.coderabbit.ai/ as the server URL, then click Continue.
  3. Under the OAuth client setting, select Register automatically.
  4. Click Add, then click Connect next to the connector. On Team and Enterprise plans, each member connects from Customize > Connectors.
  5. Check the permissions on the consent page, then approve. See Approve the connection.

Claude's connector settings have no scope list, so the consent page shows the scopes that Claude requests.

See Claude's custom connector guide for plan limits and per-chat settings.

[tab] Other clients

Other MCP clients can connect if they support Streamable HTTP and OAuth with PKCE, and register either through dynamic client registration or with a client ID metadata document. Add https://mcp.coderabbit.ai/ as a remote HTTP server, set the client's OAuth scopes if it has that setting, and sign in. See Approve the connection.

CodeRabbit gives a sign-in that requests no scopes only connection. A client that can't set scopes therefore connects with connection alone, and the agent can call connection_status and nothing else. The consent page lists what the client requested.

Approve the connection

When your client signs in, your browser opens CodeRabbit. Sign in if you aren't already, then:

  1. Choose the organization to connect. The connection works only in this organization, and tool arguments can't switch it.
  2. Read the summary under Allow client to access your selected organization? It lists what the connection can read and do, based on the requested scopes, and warns when actions can consume credits or paid usage.
  3. Check the hostname in Return to hostname after connecting. For a client on your computer, approve only connections you started.
  4. Click Connect to organization, or Cancel to refuse.

A consent request expires after 10 minutes. Your client refreshes its access automatically, and the connection lasts up to 30 days. It ends sooner if the CodeRabbit browser session you approved it in ends, for example when you sign out, or if you lose access to the organization. Then sign in again from your client.

Check the connection

Ask your agent to call the account tools:

Use the coderabbit MCP server: call connection_status, then get_me, and tell me which organization and role you see.

connection_status returns your user ID, the connected organization, and the region. get_me needs account:read and returns your profile, your role in the connected organization, and your other organization memberships. Memberships don't give the connection access to those organizations.

In Claude Code, claude mcp list also shows whether the server is connected or needs authentication.

Disconnect

  • Claude Code: run claude mcp logout coderabbit to clear the stored sign-in, then claude mcp remove coderabbit to remove the server.
  • Claude: disconnect or remove the connector in Customize > Connectors.
  • Other clients: use the client's sign-out or remove action.

CodeRabbit doesn't list MCP connections in its app, so disconnect from the client. A connection you don't disconnect still ends after 30 days at most.

Troubleshooting

ProblemCauseFix
Sign-in fails with invalid_scopeThe scope list leaves out connection, or it has a scope that CodeRabbit doesn't support.Add connection, check the other scopes against Choose scopes, and sign in again.
The agent can call only connection_statusThe connection has only the connection scope, because the client didn't request any other scopes.Set the scopes in your client and sign in again. If the client has no scope setting, see the Other clients tab in Connect your agent.
A tool fails with insufficient_scope, or Claude Code says the server needs additional permissionsThe connection doesn't have a scope that the tool needs.Add the scope named in the error to your client's scope list, then sign in again.
The client reports 401 or says the server needs authenticationThe connection ended: it expired, you signed out of CodeRabbit, your access changed, or it was revoked.Sign in again from your client.
The consent page says the connection request has endedYou took longer than 10 minutes, or the request was already used.Start the sign-in again from your client.
The consent page says connection access was deniedThe selected organization can't be connected.Select another organization in the organization picker.
Only connection_status, get_me, and get_usage workThe connected organization isn't on GitHub Cloud.The other tools need a GitHub Cloud organization. Sign in again and choose one.
list_pull_requests or get_pull_request returns unsupported_connectionYour CodeRabbit user has no linked GitHub account, or the organization isn't on GitHub Cloud.Link your GitHub account as Availability describes, or connect a GitHub Cloud organization.
The agent works in the wrong organizationEach connection is bound to the organization you approved.Disconnect, sign in again, and choose the other organization on the consent page.
A tool returns not_foundThe resource doesn't exist, or you can't access it.Check the identifier and your access in CodeRabbit.
A tool returns rate_limit_exceededMCP tools share your organization's API quota with API and CLI requests.Wait for the retry_after seconds in the result. See Rate limits.

What's next

[card] Browse MCP tools

Find the tool for each task and the scopes its group needs.

[card] Call from the CLI

Run the same operations from a terminal or CI job with an API key.

[card] Authenticate requests

Create an API key for scripts and integrations that don't use MCP.

This documentation is built and hosted on Mintlify, a developer documentation platform.