Skip to main content
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.
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

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: the MCP server serves organizations in CodeRabbit’s US region. If your organization is in the EU region, use the API with an API key, or coderabbit api from the CLI.
  • 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

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:
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

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.
  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.
  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.

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:
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

What’s next

Browse MCP tools

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

Call from the CLI

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

Authenticate requests

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