# CodeRabbit MCP for AI Agents MCP

> CodeRabbit manages your entire code review process through natural conversation. This MCP lets you control user roles, assign and unassign seats instantly, track detailed PR metrics, and audit every administrative action from any AI agent.

## Overview
- **Category:** ai-frontier
- **Price:** Free
- **Tags:** ai-code-review, pull-request-automation, code-quality, security-analysis, team-productivity, dev-workflow

## Description

Managing an engineering team's code reviews used to mean jumping between dashboards, running reports, and manually updating access lists—a total time suck. Now, connect your CodeRabbit organization to Vinkius and let your AI agent handle the governance part through natural conversation.

Instead of digging into complex menus, you simply ask your agent what's going on with team seats or who needs training. You can instantly list every user, assign bulk seats across 500 members, or even promote an engineer to admin status without ever touching a settings panel. This MCP gives your AI client full control over the review lifecycle—from tracking average complexity scores on pull requests to generating tamper-resistant audit logs for compliance reporting. It turns tedious governance tasks into simple conversation prompts.

## Tools

### assign_seats
Assign CodeRabbit seats to a group of users, supporting up to 500 IDs in one request.

### get_audit_logs
Retrieves the organization's tamper-proof audit logs for compliance reporting purposes.

### demote_users
Demotes specified users from an admin role back to a standard member status.

### get_seat_mode
Checks and returns the current system mode for assigning CodeRabbit seats.

### list_users
Lists all users in the organization, allowing optional filtering by role or seat assignment status.

### get_metrics
Retrieves key PR review metrics for a specified date range to analyze productivity.

### promote_users
Promotes specified users, elevating them to the administrator role within CodeRabbit.

### unassign_seats
Removes existing CodeRabbit seats from users without deleting their underlying accounts.

### update_seat_mode
Changes the overall seat assignment policy, requiring an Enterprise plan.

## Prompt Examples

**Prompt:** 
```
Show me all team members who do not have a CodeRabbit seat assigned or are currently demoted.
```

**Response:** 
```
I found 3 users that need attention:

*   **sarah.chen**: Status: Unassigned Seat (Action needed)
*   **marcus.dev**: Role: Member; Seats: No (Needs promotion/seat)
*   **new.hire**: Status: Unassigned Seat (Requires initial assignment)

Would you like me to run assign_seats on all of them?
```

**Prompt:** 
```
What were our average PR complexity scores for the last month?
```

**Response:** 
```
Here are the review metrics for June 2026:

*   **Total PRs reviewed:** 185
*   **Average Complexity Score (last 30 days):** 7.9/10
*   **Median Review Time:** 4.5 minutes
*   **Critical Issues Found:** 25

The score is slightly up; should we investigate the repository metrics?
```

**Prompt:** 
```
I need to confirm who has admin rights and what changes were made last week.
```

**Response:** 
```
Here are the audit logs for the past 7 days:

1.  **role.promoted**: The ops team promoted john.doe to Admin (June 25).
2.  **seat.assigned**: Three new seats were assigned by admin@company.com (June 28).
3.  **config.updated**: Seat assignment mode changed from Manual to Automatic (June 30).

All entries are logged and ready for compliance review.
```

## Capabilities

### List all organization members
You can check who is in the organization and filter that list by their role or whether they have a seat assigned.

### Assign CodeRabbit seats to users
This function lets you assign active code review seats to up to 500 user IDs per request.

### Retrieve organization audit logs
It pulls tamper-resistant records detailing all administrative actions taken within the CodeRabbit environment, useful for compliance.

### Demote users from admin to member role
You can safely demote specific users, removing their elevated administrator privileges while keeping them as standard members.

### Get the current seat assignment mode
This checks and reports the operational policy for how CodeRabbit seats are currently being assigned in the organization.

### Retrieve PR review metrics for a date range
The agent gathers detailed data on merged pull requests, including complexity scores and average time taken for reviews.

### Promote users to admin role
This function elevates specified members into the administrator role, granting them full control over settings.

### Remove CodeRabbit seats from users
You can unassign seats from users without deleting their entire accounts, which is useful for temporary access restrictions.

### undefined
Allows you to change the overall seat assignment policy mode across the organization (requires Enterprise plan).

## Use Cases

### Identifying team members who lack review access
An engineer needs to know which new hires haven't been given code review seats yet. The agent runs list_users, filters by seat assignment status, and provides a clean list of people needing immediate attention.

### Auditing an admin change for compliance
A security officer needs proof that the team lead was only given admin rights on June 1st. They query get_audit_logs, filtering by date and action type to generate a perfect report.

### Analyzing team efficiency over time
The manager wants to know if the average review time increased after adopting a new codebase. The agent calls get_metrics for the last quarter, providing complex score and time trend data.

## Benefits

- Get instant visibility into team code review velocity. Instead of downloading reports, you simply ask your agent to retrieve PR review metrics using get_metrics.
- Maintain strict compliance records effortlessly. The get_audit_logs tool provides tamper-resistant access to all admin actions for SIEM integration.
- Manage large teams at scale. Use assign_seats or unassign_seats to control hundreds of user seats in bulk, saving hours of manual clicking.
- Enforce proper team structure with precision. You can promote users using promote_users or demote them using demote_users when roles change.
- Know your current policy instantly. Use get_seat_mode and update_seat_mode to manage how seats are assigned across the organization.

## How It Works

The bottom line is, you tell your AI client what governance task needs doing, and it handles the connection and execution using CodeRabbit’s API.

1. Subscribe to this MCP on Vinkius.
2. Provide your CodeRabbit API Key in the organization settings.
3. Use your AI agent to issue commands like 'list all users with unassigned seats' directly through your preferred client.

## Frequently Asked Questions

**How does CodeRabbit help me manage roles and user access?**
This MCP lets you control who has what permissions through conversation. You can list users, promote members to admin, or demote them instantly without navigating complex settings.

**Can I track team productivity metrics using CodeRabbit with AI agents?**
Yes, you can retrieve detailed PR review metrics like average complexity scores and total review times for any date range. This gives you a clear view of the team's actual output quality.

**Is CodeRabbit good for compliance auditing?**
Absolutely. It provides access to tamper-resistant audit logs, letting you query every administrative action taken on the organization, which is critical for SIEM reporting.

**Do I need to manually assign seats when new employees join?**
No. You can use this MCP to check who has unassigned seats and then bulk assign them across your entire team using a single command prompt.

**What if I want to change the overall seat assignment policy?**
You can view the current policy with get_seat_mode, and if needed (and on the Enterprise plan), you can update the mode using update_seat_mode.