Codereviewbuddy
C

Codereviewbuddy

2 points
5.9K

Installation

Copy the following command to your Client for configuration
Note: Your key is sensitive information, do not share it with anyone.

๐Ÿš€ codereviewbuddy

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

  • List review comments: Inline threads, PR - level reviews, and bot comments (codecov, netlify, vercel, etc.) with reviewer identification and staleness detection.
  • Stacked PR support: list_stack_review_comments fetches comments across an entire PR stack in one call.
  • Reply to anything: Inline review threads (PRRT_), PR - level reviews (PRR_), and bot issue comments (IC_) all routed to the correct GitHub API.

Triage & CI diagnosis

  • Triage review comments: triage_review_comments filters to only actionable threads, pre - classifies severity, suggests fix/reply/create_issue actions, and includes direct GitHub URLs for each comment.
  • 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.

Issue tracking

  • Create issues from review comments: Turn useful AI suggestions into GitHub issues with labels, PR backlinks, file/line location, and quoted comment text.

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).
  • Update checker: check_for_updates compares the running version against PyPI and suggests upgrade commands.
  • 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:

# List all tools with their signatures
fastmcp list codereviewbuddy.server:mcp

# Call a tool directly from the terminal
fastmcp call codereviewbuddy.server:mcp list_review_comments pr_number=42

# Inspect server metadata
fastmcp inspect codereviewbuddy.server:mcp

# Run with MCP Inspector for interactive debugging
fastmcp dev codereviewbuddy.server:mcp

๐Ÿ“ฆ Installation

Prerequisites

  • GitHub CLI (gh) installed and authenticated (gh auth login).
  • Python 3.14+.

Installation Steps

This project uses uv. No install needed โ€” run directly:

uvx codereviewbuddy

Or install permanently:

uv tool install codereviewbuddy

๐Ÿ“š Documentation

MCP Client Configuration

Quick setup (recommended)

One command configures your MCP client โ€” no manual JSON editing:

uvx codereviewbuddy install claude-desktop
uvx codereviewbuddy install claude-code
uvx codereviewbuddy install cursor
uvx codereviewbuddy install windsurf
uvx codereviewbuddy install windsurf-next

With optional environment variables:

uvx codereviewbuddy install windsurf \
  --env CRB_SELF_IMPROVEMENT__ENABLED=true \
  --env CRB_SELF_IMPROVEMENT__REPO=your-org/codereviewbuddy

For any other client, generate the JSON config:

uvx codereviewbuddy install mcp-json          # print to stdout
uvx 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:

{
  "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.

        // Self-improvement: agents file issues when they hit server gaps
        // "CRB_SELF_IMPROVEMENT__ENABLED": "true",
        // "CRB_SELF_IMPROVEMENT__REPO": "your-org/codereviewbuddy",

        // Diagnostics (off by default)
        // "CRB_DIAGNOSTICS__IO_TAP": "true",
        // "CRB_DIAGNOSTICS__TOOL_CALL_HEARTBEAT": "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.

{
  "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",
        "CRB_SELF_IMPROVEMENT__REPO": "detailobsessed/codereviewbuddy",
        "CRB_DIAGNOSTICS__IO_TAP": "true",
        "CRB_DIAGNOSTICS__TOOL_CALL_HEARTBEAT": "true",
        "CRB_DIAGNOSTICS__HEARTBEAT_INTERVAL_MS": "5000",
        "CRB_DIAGNOSTICS__INCLUDE_ARGS_FINGERPRINT": "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

Tool Tags Description
summarize_review_status query, discovery Lightweight stack - wide overview with severity counts โ€” start here
triage_review_comments query Only actionable threads, pre - classified with severity and suggested actions
list_review_comments query All review threads with reviewer ID, status, staleness, and auto - discovered stack
list_stack_review_comments query Comments for multiple PRs in one call, grouped by PR number
reply_to_comment command Reply to inline threads (PRRT_), PR - level reviews (PRR_), or bot comments (IC_)
create_issue_from_comment command Create a GitHub issue from a review comment with labels and PR backlink
diagnose_ci query Diagnose CI failures โ€” finds the failed run, jobs, steps, and error lines in one call
stack_activity query Chronological activity feed across a PR stack with a settled flag
list_recent_unresolved query Scan recently merged PRs for unresolved review threads
review_pr_descriptions query Analyze PR descriptions for quality issues (empty body, boilerplate, missing linked issues)
show_config discovery Show active configuration with human - readable explanation

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 var Type Default Description
CRB_PR_DESCRIPTIONS__ENABLED bool true Whether review_pr_descriptions tool is available
CRB_SELF_IMPROVEMENT__ENABLED bool false Agents file issues when they encounter server gaps
CRB_SELF_IMPROVEMENT__REPO string "" Repository to file issues against (e.g. owner/repo)
CRB_DIAGNOSTICS__IO_TAP bool false Log stdin/stdout for transport debugging
CRB_DIAGNOSTICS__TOOL_CALL_HEARTBEAT bool false Emit heartbeat entries for long - running tool calls
CRB_DIAGNOSTICS__HEARTBEAT_INTERVAL_MS int 5000 Heartbeat cadence in milliseconds
CRB_DIAGNOSTICS__INCLUDE_ARGS_FINGERPRINT bool true Log args hash/size in tool call logs

Severity levels

Severity is classified from emoji markers in comment bodies:

Emoji Level Meaning
๐Ÿ”ด bug Critical issue, must fix before merge
๐Ÿšฉ flagged Likely needs a code change
๐ŸŸก warning Worth addressing but not blocking
๐Ÿ“ info Informational, no action required
(none) info Default when no marker is present

Typical workflow

1. summarize_review_status()                     # Stack-wide overview โ€” start here
2. triage_review_comments(pr_numbers=[42, 43])   # Only actionable threads with suggested actions
3. # Fix bugs flagged by triage, then:
4. reply_to_comment(42, thread_id, "Fixed in ...")  # Reply explaining the fix
5. create_issue_from_comment(thread_id, "Improve X")  # Track followups as issues
6. 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.

๐Ÿ”ง Technical Details

Development

git clone https://github.com/detailobsessed/codereviewbuddy.git
cd codereviewbuddy
uv sync

Testing

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

Quality checks

poe lint          # ruff check
poe typecheck     # ty check
poe check         # lint + typecheck
poe 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, issues.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:

copier update --trust .

Alternatives

V
Vestige
Vestige is an AI memory engine based on cognitive science. By implementing 29 neuroscience modules such as prediction error gating, FSRS - 6 spaced repetition, and memory dreaming, it provides long - term memory capabilities for AI. It includes a 3D visualization dashboard and 21 MCP tools, runs completely locally, and does not require the cloud.
Rust
5.2K
4.5 points
M
Moltbrain
MoltBrain is a long-term memory layer plugin designed for OpenClaw, MoltBook, and Claude Code, capable of automatically learning and recalling project context, providing intelligent search, observation recording, analysis statistics, and persistent storage functions.
TypeScript
4.7K
4.5 points
B
Bm.md
A feature-rich Markdown typesetting tool that supports multiple style themes and platform adaptation, providing real-time editing preview, image export, and API integration capabilities
TypeScript
4.1K
5 points
S
Security Detections MCP
Security Detections MCP is a server based on the Model Context Protocol that allows LLMs to query a unified security detection rule database covering Sigma, Splunk ESCU, Elastic, and KQL formats. The latest version 3.0 is upgraded to an autonomous detection engineering platform that can automatically extract TTPs from threat intelligence, analyze coverage gaps, generate SIEM-native format detection rules, run tests, and verify. The project includes over 71 tools, 11 pre-built workflow prompts, and a knowledge graph system, supporting multiple SIEM platforms.
TypeScript
6.4K
4 points
P
Paperbanana
Python
7.7K
5 points
B
Better Icons
An MCP server and CLI tool that provides search and retrieval of over 200,000 icons, supports more than 150 icon libraries, and helps AI assistants and developers quickly obtain and use icons.
TypeScript
7.5K
4.5 points
A
Assistant Ui
assistant - ui is an open - source TypeScript/React library for quickly building production - grade AI chat interfaces, providing composable UI components, streaming responses, accessibility, etc., and supporting multiple AI backends and models.
TypeScript
6.7K
5 points
A
Apify MCP Server
The Apify MCP Server is a tool based on the Model Context Protocol (MCP) that allows AI assistants to extract data from websites such as social media, search engines, and e-commerce through thousands of ready-to-use crawlers, scrapers, and automation tools (Apify Actors). It supports OAuth and Skyfire proxy payment and can be integrated into MCP clients such as Claude and VS Code through HTTPS endpoints or local stdio.
TypeScript
7.5K
5 points
N
Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
21.6K
4.5 points
G
Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
24.9K
4.3 points
M
Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
34.7K
5 points
D
Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
73.8K
4.3 points
U
Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
31.6K
5 points
F
Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
64.1K
4.5 points
G
Gmail MCP Server
A Gmail automatic authentication MCP server designed for Claude Desktop, supporting Gmail management through natural language interaction, including complete functions such as sending emails, label management, and batch operations.
TypeScript
22.1K
4.5 points
M
Minimax MCP Server
The MiniMax Model Context Protocol (MCP) is an official server that supports interaction with powerful text-to-speech, video/image generation APIs, and is suitable for various client tools such as Claude Desktop and Cursor.
Python
48.7K
4.8 points