Choose the organization
org_id is a Git-provider ID, which may be numeric text. GET /me returns a CodeRabbit organization ID in scope.id. Do not interchange them. For workspace credentials, place org_id in the location shown by the operationâs schema: the query for reads or the JSON input for writes.
Make a REST request
Sendx-coderabbitai-api-key to your regionâs REST base URL: https://api.coderabbit.ai/v1 in the US or https://api.eu.coderabbit.ai/v1 in the EU. This US example supplies the header through standard input so the secret is not part of curlâs command-line arguments.
403 forbidden for that action, even when it can read the pull request. Hosted MCP uses the separate review-request consent scopes described below.
Use the same key with API mode
Use CodeRabbit CLI 0.9.4 or later for API mode. The explicit key file takes precedence over a saved CLI login without changing that login. The file must contain only the key. An unreadable or empty file fails without falling back to another credential.Approve MCP access
Hosted MCP is available only for US organizations. Connect through CodeRabbitâs hosted MCP flow, select your organization, and review the requested permissions. The consent page distinguishes reads from actions that change configuration, create work, or deliver code. Execution actions may consume credits or paid usage under your plan. Every new shared tool requiresaccount:read plus its operation scopes. Examples include code:read, code:write, security:read, security:write, and configuration:write. Read permission does not imply write permission. An existing grant does not automatically gain additional scopes.
Requesting a pull-request review with request_pull_request_review requires account:read, pull_requests:read, and reviews:write. Reading review status needs only the first two. The legacy review scope remains for local code review and does not authorize a pull-request review request; approve reviews:write through the hosted MCP consent flow when needed.
MCP uses the signed-in personâs current identity and organization membership. It does not receive an API key or a provider credential. The same product authorization still applies after consent.
Recover from an access error
See Platform API boundaries for operations that still require browser interaction or retain legacy key restrictions.
Whatâs next
Try an API workflow
Read a pull request or create a coding task with your selected credential.
Read your API identity
Inspect the authenticated principal and selected organization.