Codereviewbuddy

io.github.detailobsessedPublished by GitHub account detailobsessedv0.37.0Updated Oct 27, 2026

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

Overview

AI-generated overview

MCP server that lets an AI coding agent triage, read and reply to GitHub PR review comments from AI reviewers, and diagnose CI failures.

What you can do
  • Summarize review status and triage actionable inline review threads across a PR stack
  • Read full thread history and reply to inline threads, PR-level reviews and bot comments
  • Check CI status and diagnose failed runs, jobs, steps and error lines
  • Track stack activity, scan recently merged PRs for unresolved threads, and review PR description quality
  • Show active configuration and expose a read-only per-PR review resource plus review workflow prompts
When to use it
Useful when an agent works on GitHub pull requests reviewed by AI reviewers and needs to find which comments still need action, answer them, and check why CI failed before merging. Also handy for stacked PRs where the agent must decide when a stack has settled.
Requirements
Runs locally as a Python package via uvx (Python 3.14+). Requires the GitHub CLI (gh) installed and authenticated with gh auth login; no personal access tokens or config files. Optional CRB_* environment variables tune behavior. Desktop MCP client only.
Before you install
Replies posted through reply_to_comment are public GitHub comments written under the authenticated gh account, so review wording before sending. The server acts with the full permissions of that gh login, including reading private repositories. Optional settings such as CRB_SELF_IMPROVEMENT__ENABLED let agents suggest Linear issues when they hit gaps.

Installation

In SourceWeft

  1. Open Codereviewbuddy in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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 .

Source: README.md at commit 4790956

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.37.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts