English documentation lives here. A full Japanese version is available in README.ja.md.
- A minimal Model Context Protocol (MCP) server that exposes the CodeRabbit CLI through the
run_reviewtool. - No other helper tools are provided; setup guidance (installation/auth hints) is embedded in the
run_reviewerror messages themselves. - Every invocation streams structured logs and stores combined stdout/stderr under
report://resources for later inspection.
| Tool | Role | Key arguments |
|---|---|---|
run_review |
Executes coderabbit with full flag coverage. If the CLI is missing or unauthenticated, the same response returns OS-specific setup guidance plus a reminder for Codex to consult the user. |
mode, type, base, baseCommit, cwd, configFiles[], noColor, timeoutSec, extraArgs[] |
- The MCP server never attempts to install CodeRabbit or perform
auth loginautomatically. Follow the guidance printed byrun_reviewand execute commands manually in your own shell. - Codex (or any MCP client) must not run additional commands on its own when an error occurs. Report the guidance back to the user and wait for explicit instructions before retrying.
- Windows native is unsupported; WSL2 instructions are provided instead. PATH modifications also remain manual.
# Install dependencies
npm install
# Type-check & build (creates dist/server.js)
npm run build
# Run the MCP server in dev mode (tsx)
npm run devRegister the server via codex mcp add so agents can call /mcp coderabbit-cli-mcp directly:
codex mcp add coderabbit-cli-mcp \
--env TSX_BANNER=false \
-- "$(pwd)/node_modules/.bin/tsx" \
"$(pwd)/src/server.ts"After registration you can inspect tools with codex mcp call coderabbit-cli-mcp tools/list or trigger run_review via codex mcp call.
# List tools through the MCP inspector
npx @modelcontextprotocol/inspector \
--cli node dist/server.js \
--method tools/list
# Call run_review (plain output against uncommitted changes)
npx @modelcontextprotocol/inspector \
--cli node dist/server.js \
--method tools/call \
--tool-name run_review \
--tool-arg mode=plain \
--tool-arg type=uncommitted
# List report:// resources for recent runs
npx @modelcontextprotocol/inspector \
--cli node dist/server.js \
--method resources/list
# List prompts
npx @modelcontextprotocol/inspector \
--cli node dist/server.js \
--method prompts/listnpm run build
npm pkg fix
npm version patch # or minor / major as needed
npm publish --access public
npm view coderabbit-cli-mcp version