MCP Integration

Using CorgReview as an MCP server for deep agent integration.

Overview

CorgReview includes a built-in Model Context Protocol (MCP) server. This lets AI agents call CorgReview as a tool rather than running a shell command — providing richer parameter passing and structured responses.

MCP mode is supported for Claude Code, Cursor, and Windsurf.

Setup

The easiest way to set up MCP is with corg init --mcp:

corg init --agent claude --mcp

This adds the MCP server to your agent's configuration automatically.

Manual configuration

If you prefer to configure manually, add CorgReview to your MCP settings:

{
  "mcpServers": {
    "corgreview": {
      "command": "corg",
      "args": ["mcp"]
    }
  }
}

For Claude Code, this goes in ~/.claude/settings.json (global) or .claude/settings.local.json (project-level).

How it works

  1. Your AI agent launches corg mcp as a subprocess
  2. CorgReview reads JSON-RPC requests from stdin
  3. When request_human_review is called, CorgReview starts the HTTP server and opens your browser
  4. You complete the review in the browser UI
  5. CorgReview returns the result via stdout to your agent

Tool: request_human_review

The MCP server exposes a single tool:

Parameters

Parameter Type Description
commit_rangestringGit range to review. Default: auto-detect branch or HEAD~1..HEAD
repo_pathstringRepository path. Default: current working directory
focus_areasstring[]Hints for the reviewer about what to focus on
blockingbooleanWait for review completion. Default: true
descriptionstringBranch overview/purpose shown in the review UI
agentstringAgent name to record in review metadata

Response

{
  "status": "changes_requested",
  "review_path": ".corg/reviews/2026-03-feat-auth-flow.md",
  "review_file_path": ".corg/reviews/2026-03-feat-auth-flow.md",
  "summary": "3 comments total: 1 blocker, 1 question, 1 suggestion",
  "blocker_count": 1,
  "question_count": 1,
  "suggestion_count": 1,
  "reviewer_summary": "Overall looks good but error handling needs work."
}

Protocol details

The MCP server uses JSON-RPC 2.0 over stdio and supports these methods:

  • initialize — Protocol handshake
  • initialized — Client ready notification
  • tools/list — List available tools
  • tools/call — Execute a tool

CLI mode vs MCP mode

Both modes achieve the same result — the main differences are:

CLI Mode MCP Mode
SetupSkill file onlySkill file + MCP config
ParametersCLI flagsStructured JSON
ResponseJSON on stdoutStructured MCP response
Agent supportAll agentsClaude Code, Cursor, Windsurf

For most users, CLI mode is simpler and works everywhere. MCP mode provides richer integration for agents that support it.