BC

bradthebeeble/coderabbitai-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

30 stars 3 forks 质量 65 趋势 11MIT

用于与 CodeRabbit AI 审核互动的 MCP 服务器 GitHub 拉取请求

概览

一个模型上下文协议(MCP)服务器,用于与 GitHub 拉取请求中的 CodeRabbit AI 审核互动。该服务器使大型语言模型(LLMs)能够通过程序分析、理解并实现 CodeRabbit 建议。 - : 检索特定拉取请求的所有 CodeRabbit 评论 - : 获取特定评论的详细信息,包括配置和已审核的文件 - : 获取带有 AI 提示和建议的单行评论 - : 深入分析具体评论,附有上下文和修正示例 - : 将评论标记为已处理、不愿修复或不适用 - : 使用 /coderabbit-review 同命令进行完整审核处理 无需安装!直接使用NPX运行: 1. :在https://github.com/settings/tokens创建 - 所需范围:仓库(私有仓库)或public_repo(仅公开仓库)2.

概述(AI 翻译)

一个模型上下文协议(MCP)服务器,用于与 GitHub 拉取请求中的 CodeRabbit AI 审核互动。该服务器使大型语言模型(LLMs)能够通过程序分析、理解并实现 CodeRabbit 建议。

特色

  • 获取CodeRabbit评论:获取特定拉取请求的所有CodeRabbit评论
  • 评审详情:获取具体评测的详细信息,包括配置和已审查的文件
  • 提取评论:获得带有AI提示和建议的单行评论
  • 评论详情:深入探讨具体评论,附有上下文和修正示例
  • 解决评论:标记评论已处理、不修复或不适用
  • 自动工作流程提示:使用/coderabbit-review斜杠命令完成审核处理

快速启动

安装(NPX - 推荐)

无需安装!直接使用NPX运行:

先决条件

  1. GitHub 个人访问令牌:创建于
  • 必修范围:repo(针对私有仓库)或public_repo(仅限公共仓库)
  1. Node.js 18+:运行服务器所需

配置

Claude Desktop Configuration

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

CodeRabbit MCP Server

A Model Context Protocol (MCP) server for interacting with CodeRabbit AI reviews on GitHub pull requests. This server enables Large Language Models (LLMs) to analyze, understand, and implement CodeRabbit suggestions programmatically.

Features

  • Get CodeRabbit Reviews: Retrieve all CodeRabbit reviews for a specific pull request
  • Review Details: Get detailed information about specific reviews including configuration and files reviewed
  • Extract Comments: Get individual line comments with AI prompts and suggestions
  • Comment Details: Deep dive into specific comments with context and fix examples
  • Resolve Comments: Mark comments as addressed, won’t fix, or not applicable
  • Automated Workflow Prompt: Use /coderabbit-review slash command for complete review processing

Quick Start

No installation required! Run directly with npx:

# Install the latest stable version explicitly
npx coderabbitai-mcp@latest

Prerequisites

  1. GitHub Personal Access Token: Create at
    • Required scopes: repo (for private repos) or public_repo (for public only)
  2. Node.js 18+: Required for running the server

Configuration

Claude Desktop Configuration

To use the CodeRabbit MCP server in Claude Desktop, add it to your configuration file:

Configuration file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Step-by-step setup:

  1. Open your Claude Desktop configuration file (create it if it doesn’t exist)
  2. Add the CodeRabbit MCP server configuration:
{
  "mcpServers": {
    "coderabbitai": {
      "command": "npx",
      "args": ["coderabbitai-mcp@latest"],
      "env": {
        "GITHUB_PAT": "ghp_your_token_here"
      }
    }
  }
}
  1. Replace ghp_your_token_here with your actual GitHub Personal Access Token
  2. Save the file and restart Claude Desktop

Claude Code Configuration

To use the CodeRabbit MCP server in Claude Code, configure it in your project:

Step-by-step setup:

  1. Create a .claude directory in your project root (if it doesn’t exist):

    mkdir .claude
    
  2. Create or edit .claude/config.json:

{
  "mcpServers": {
    "coderabbitai": {
      "command": "npx",
      "args": ["coderabbitai-mcp@latest"],
      "env": {
        "GITHUB_PAT": "ghp_your_token_here"
      }
    }
  }
}
  1. Replace ghp_your_token_here with your actual GitHub Personal Access Token
  2. The server will be available next time you start Claude Code in this project

Pro tip: For security, you can use environment variables instead of hardcoding the token:

{
  "mcpServers": {
    "coderabbitai": {
      "command": "npx",
      "args": ["coderabbitai-mcp@latest"],
      "env": {
在 GitHub 查看完整 README

安装

npx coderabbitai-mcp@latest
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "coderabbitai": { "command": "npx", "args": ["coderabbitai-mcp@latest"], "env": { "GITHUB_PAT": "ghp_your_token_here" } } } }