File size: 2,344 Bytes
f4bd24d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | ---
title: CodeRabbit
sidebarTitle: CodeRabbit
description: AI-powered code review tool
---
[CodeRabbit](https://coderabbit.ai) is an AI-powered code review tool that automatically reviews pull requests. By connecting Context7 as an MCP server, CodeRabbit can access up-to-date library documentation during reviews, helping it verify implementations against the latest API references and best practices.
## Setup
<Steps>
<Step title="Navigate to MCP Servers">
Go to your [CodeRabbit dashboard](https://app.coderabbit.ai) and navigate to **Integrations** → **MCP Servers**.

</Step>
<Step title="Add Context7">
Click the **Add** button next to **Context7** MCP server.
Add the following header for higher rate limits:
| Header | Value |
|--------|-------|
| `CONTEXT7_API_KEY` | Your API key from the [Context7 dashboard](https://context7.com/dashboard) |
```json
{
"CONTEXT7_API_KEY": "YOUR_API_KEY"
}
```

</Step>
<Step title="Connect">
Click the **Connect** button to connect the server.

</Step>
<Step title="Enable for Public Repos">
To use Context7 with public repositories, go to **Organization Settings** → **Configuration** → **Knowledge Base**. In the MCP section, select **Enabled** instead of **Auto** and click **Apply Changes**.

</Step>
</Steps>
## Usage Guidance
In the **Usage Guidance** field, you can instruct CodeRabbit on how to use Context7 during reviews. For example:
```
Use Context7 to look up documentation for any libraries used in the code being reviewed.
Verify that API usage matches the latest documentation and flag any deprecated patterns.
```
## How It Works
Once connected, CodeRabbit will query Context7 for relevant library documentation when reviewing pull requests. This helps CodeRabbit:
- Verify correct API usage against the latest documentation
- Identify deprecated methods or patterns
- Suggest improvements based on library best practices
- Provide more accurate and informed review comments
|