Codereviewbuddy

io.github.detailobsessed由 GitHub 帳號 detailobsessed 發布v0.37.0更新於 Oct 27, 2026

MCP server that helps AI coding agents interact with AI code reviewers on GitHub PRs

已驗證STDIO僅桌面效率與工作流開發者工具

概覽

AI 產生的概覽

讓 AI 程式助理整理、閱讀並回覆 GitHub PR 上 AI 程式碼審查意見,並診斷 CI 失敗的 MCP 伺服器。

可以做什麼
  • 彙整審查狀態,篩選出 PR 堆疊中真正需要處理的評論討論串
  • 讀取完整討論串歷程,並回覆行內討論串、PR 層級審查與機器人留言
  • 檢查 CI 狀態,一次呼叫找出失敗的執行、工作、步驟與錯誤行
  • 檢視 PR 堆疊活動時間軸,掃描已合併 PR 的未解決討論串,檢查 PR 描述品質
  • 顯示目前設定,並提供唯讀的單一 PR 審查資源與審查流程提示詞
適用情境
適合助理處理由 AI 審查者評審的 GitHub 拉取請求時使用:找出仍需處理的留言、逐則回覆,並在合併前查明 CI 失敗原因。對堆疊式 PR 也很有用,可判斷整個堆疊何時穩定。
執行需求
以 Python 套件形式透過 uvx 在本機執行,需要 Python 3.14 以上。需要安裝並已用 gh auth login 登入的 GitHub CLI,不需個人存取權杖或設定檔。可選的 CRB_* 環境變數可調整行為。僅支援桌面版 MCP 用戶端。
安裝前請注意
reply_to_comment 會以已登入的 gh 帳號張貼公開的 GitHub 留言,送出前應確認措辭。伺服器擁有該 gh 登入的全部權限,包括讀取私有儲存庫。啟用 CRB_SELF_IMPROVEMENT__ENABLED 等選項後,助理會在遇到功能缺口時建議建立 Linear 議題。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Codereviewbuddy,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

codereviewbuddy

[ci] [release] [documentation] [Python 3.14+] [FastMCP v3]

An MCP server that helps your AI coding agent manage PR review comments from any AI reviewer that uses GitHub's PR review infrastructure.

Features

Review comment management

  • Triage review comments — triage_review_comments filters to only actionable inline threads and includes direct GitHub URLs for each comment
  • Get thread details — get_thread fetches full conversation history for any thread by node ID
  • Reply to anything — inline review threads (PRRT_), PR-level reviews (PRR_), and bot issue comments (IC_) all routed to the correct GitHub API

CI & stack diagnosis

  • Diagnose CI failures — diagnose_ci collapses 3-5 sequential gh commands into one call: finds the failed run, identifies failed jobs/steps, and extracts actionable error lines
  • Stack activity feed — stack_activity shows a chronological timeline of pushes, reviews, labels, merges across all PRs in a stack with a settled flag for deciding when to proceed
  • Scan merged PRs — list_recent_unresolved catches late review comments on already-merged PRs

Agent experience

  • Recovery-guided errors — every tool handler classifies errors (auth, rate limit, not found, workspace, GraphQL, config) and returns actionable recovery hints so agents self-correct instead of retrying blindly
  • Next-action hints — tool responses include next_steps suggestions guiding agents to the right follow-up tool call
  • Empty result messages — when results are empty, responses explain why and suggest what to try next
  • GUI URLs — triage items include comment_url so agents can link users directly to the comment on GitHub
  • Tool classification tags — tools are tagged query, command, or discovery for MCP clients that support filtering

Server features (FastMCP v3)

  • Typed output schemas — all tools return Pydantic models with JSON Schema, giving MCP clients structured data instead of raw strings
  • Progress reporting — long-running operations report progress via FastMCP context (visible in MCP clients that support it)
  • Production middleware — ErrorHandling (transforms exceptions to clean MCP errors with tracebacks), Timing (logs execution duration for every tool call), and Logging (request/response payloads for debugging)
  • Zero config auth — uses gh CLI, no PAT tokens or .env files

CLI testing (free with FastMCP v3)

FastMCP v3 gives you terminal testing of the server with no extra code:

bash
# List all tools with their signaturesfastmcp list codereviewbuddy.server:mcp
# Call a tool directly from the terminalfastmcp call codereviewbuddy.server:mcp triage_review_comments pr_numbers='[42]'
# Inspect server metadatafastmcp inspect codereviewbuddy.server:mcp
# Run with MCP Inspector for interactive debuggingfastmcp dev codereviewbuddy.server:mcp

Prerequisites

Installation

This project uses uv. No install needed — run directly:

bash
uvx codereviewbuddy

Or install permanently:

bash
uv tool install codereviewbuddy

MCP Client Configuration

Quick setup (recommended)

One command configures your MCP client — no manual JSON editing:

bash
uvx codereviewbuddy install claude-desktopuvx codereviewbuddy install claude-codeuvx codereviewbuddy install cursoruvx codereviewbuddy install windsurfuvx codereviewbuddy install windsurf-next

With optional environment variables:

bash
uvx codereviewbuddy install windsurf \  --env CRB_SELF_IMPROVEMENT__ENABLED=true

For any other client, generate the JSON config:

bash
uvx codereviewbuddy install mcp-json          # print to stdoutuvx codereviewbuddy install mcp-json --copy   # copy to clipboard

Restart your MCP client after installing. See uvx codereviewbuddy install --help for all options.

Manual configuration

If you prefer manual setup, add the following to your MCP client's config JSON:

jsonc
{  "mcpServers": {    "codereviewbuddy": {      "command": "uvx",      "args": ["codereviewbuddy@latest"],      "env": {        // All CRB_* env vars are optional — zero-config works out of the box.        // See Configuration section below for the full list.      }    }  }}

All options enabled:

jsonc
{  "mcpServers": {    "codereviewbuddy": {      "command": "uvx",      "args": ["codereviewbuddy@latest"],      "env": {        // GitHub logins considered "ours" for triage filtering (comma-separated)        "CRB_OWNER_LOGINS": "alice,bob",        // Enable PR description quality checks        "CRB_PR_DESCRIPTIONS__ENABLED": "true",        // Agents suggest Linear issues when they hit server gaps        "CRB_SELF_IMPROVEMENT__ENABLED": "true"      }    }  }}

The server auto-detects your project from MCP roots (sent per-window by your client). This works correctly with multiple windows open on different projects — no env vars needed.

Why @latest? Without it, uvx caches the first resolved version and never upgrades automatically.

From source (development)

For local development, use uv run --directory to run the server from your checkout instead of the PyPI-published version. Changes to the source take effect immediately — just restart the MCP server in your client.

jsonc
{  "mcpServers": {    "codereviewbuddy": {      "command": "uv",      "args": ["run", "--directory", "/path/to/codereviewbuddy", "codereviewbuddy"],      "env": {        // Same CRB_* env vars as above, plus dev-specific settings:        "CRB_SELF_IMPROVEMENT__ENABLED": "true"      }    }  }}

Troubleshooting

If your MCP client reports No module named 'fastmcp.server.tasks.routing', the runtime has an incompatible FastMCP. Fixes:

  1. Prefer uvx codereviewbuddy@latest in MCP client config.
  2. For local source checkouts, launch with uv run --directory /path/to/codereviewbuddy codereviewbuddy.
  3. Reinstall to refresh cached deps: uv tool install --reinstall codereviewbuddy.

MCP Tools

ToolTagsDescription
summarize_review_statusquery, discoveryLightweight stack-wide overview — start here
triage_review_commentsqueryOnly actionable inline threads needing attention
get_threadqueryFull thread details by node ID — use after triage for conversation history
reply_to_commentcommandReply to inline threads (PRRT_), PR-level reviews (PRR_), or bot comments (IC_)
diagnose_ciqueryDiagnose CI failures — finds the failed run, jobs, steps, and error lines in one call
check_ci_statusqueryLightweight CI pass/fail/pending check for a PR — use before merging
stack_activityqueryChronological activity feed across a PR stack with a settled flag
list_recent_unresolvedqueryScan recently merged PRs for unresolved review threads
review_pr_descriptionsqueryAnalyze PR descriptions for quality issues (empty body, boilerplate, missing linked issues)
show_configdiscoveryShow active configuration with human-readable explanation

MCP Resources

ResourceDescription
pr://{owner}/{repo}/{pr_number}/reviewsRead-only review summary for a single PR

MCP Prompts

PromptDescription
review_stackFull review pass workflow — summarize, triage, fix, reply, verify
pr_review_checklistPre-merge quality checklist (review threads, PR hygiene, CI, tests)
ship_stackPre-merge sanity check workflow before merging a PR stack

Configuration

codereviewbuddy works zero-config with sensible defaults. All configuration is via CRB_* environment variables in the "env" block of your MCP client config — no config files needed. Nested settings use __ (double underscore) as a delimiter. See the dev setup above for a fully-commented example.

All settings

Env varTypeDefaultDescription
CRB_PR_DESCRIPTIONS__ENABLEDbooltrueWhether review_pr_descriptions tool is available
CRB_SELF_IMPROVEMENT__ENABLEDboolfalseAgents suggest Linear issues when they encounter server gaps
CRB_OWNER_LOGINScomma-separated[]GitHub usernames considered "ours" for triage filtering (e.g. alice,bob)

Typical workflow

1. summarize_review_status()                     # Stack-wide overview — start here2. triage_review_comments(pr_numbers=[42, 43])   # Only actionable threads needing attention3. # Fix bugs flagged by triage, then:4. reply_to_comment(42, thread_id, "Fixed in ...")  # Reply explaining the fix5. diagnose_ci(pr_number=42)                     # If CI fails, diagnose in one call

Each tool response includes next_steps hints guiding the agent to the right follow-up call. For stacked PRs, all query tools auto-discover the stack when pr_numbers is omitted.

Development

bash
git clone https://github.com/detailobsessed/codereviewbuddy.gitcd codereviewbuddyuv sync

Testing

bash
poe test          # Run tests (excludes slow)poe test-cov      # Run with coverage reportpoe test-all      # Run all tests including slow

Quality checks

bash
poe lint          # ruff checkpoe typecheck     # ty checkpoe check         # lint + typecheckpoe prek          # run all pre-commit hooks

Architecture

The server is built on FastMCP v3 with a clean separation:

  • server.py — FastMCP server with tool registration, middleware, instructions, and recovery-guided error handling
  • config.py — Configuration (CRB_* env vars via pydantic-settings)
  • tools/ — Tool implementations (comments.py, stack.py, ci.py, descriptions.py)
  • gh.py — Thin wrapper around the gh CLI for GraphQL and REST calls
  • models.py — Pydantic models for typed tool outputs with next_steps and message fields for agent guidance

All blocking gh CLI calls are wrapped with call_sync_fn_in_threadpool to avoid blocking the async event loop.

Template Updates

This project was generated with copier-uv-bleeding. To pull the latest template changes:

bash
copier update --trust .

來源:README.md,提交 4790956

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.37.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分