@codeagora/mcp
v0.1.2
Published
CodeAgora MCP server — Claude Code integration for AI-powered code review
Maintainers
Readme
@codeagora/mcp
CodeAgora MCP server for Claude Code, Cursor, and other MCP-compatible clients.
Install
Release/local smoke uses a packed tarball before publishing:
pnpm --filter @codeagora/mcp build
pnpm --filter @codeagora/mcp pack --dry-runFor published installs, users can run the package with:
npx -y @codeagora/mcpClient Configuration
{
"mcpServers": {
"codeagora": {
"command": "npx",
"args": ["-y", "@codeagora/mcp"]
}
}
}For local validation, point your client at the built workspace binary instead:
{
"mcpServers": {
"codeagora": {
"command": "node",
"args": ["/absolute/path/to/CodeAgora/packages/mcp/dist/index.js"]
}
}
}Environment Variables
Provider keys are required only for live review tools that call LLM providers. Config and stats tools do not require provider keys.
OPENAI_API_KEYfor OpenAI models.ANTHROPIC_API_KEYfor Anthropic models.GROQ_API_KEYfor Groq models.OPENROUTER_API_KEYfor OpenRouter models.OPENCODE_API_KEYfor OpenCode Go and OpenCode Zen models.GITHUB_TOKENfor PR review workflows that fetch or post GitHub data.
Deterministic benchmark CI gates such as pnpm bench:ci do not require live provider keys. Manual live benchmark runs with pnpm bench:fn:run do.
Tools
review_quick: fast L1-only diff review.review_full: full L0-L3 review with debate and head verdict.review_pr: PR-oriented review flow. Passpr_urlorpr_number.dry_run: estimate diff complexity and review cost from a unified diff.explain_session: explain a previous session (repo_pathoptional).get_leaderboard: inspect model ranking data.get_stats: inspect review statistics (repo_pathoptional).config_get: read current reviewer configuration (repo_pathoptional).config_set: update supported configuration fields (repo_pathoptional).
Default MCP review responses are compact to preserve agent context. Request output_format: "json" from review tools when you need the versioned codeagora.review.v1 machine contract.
Common Calls
Use the current workspace root implicitly when the MCP server is already started inside the repo:
{
"name": "review_quick",
"arguments": {
"diff": "diff --git a/src/app.ts b/src/app.ts\n@@ -1,3 +1,4 @@\n+const ready = true;\n"
}
}Use staged mode when you do not want to paste a diff:
{
"name": "review_full",
"arguments": {
"staged": true,
"output_format": "json"
}
}Preflight a diff before spending provider tokens:
{
"name": "dry_run",
"arguments": {
"diff": "diff --git a/src/app.ts b/src/app.ts\n@@ -1,3 +1,4 @@\n+const ready = true;\n"
}
}Inspect or update config from the same workspace:
{
"name": "config_get",
"arguments": {
"key": "discussion.maxRounds"
}
}{
"name": "config_set",
"arguments": {
"key": "discussion.maxRounds",
"value": 3
}
}Explain a prior session without re-running the review:
{
"name": "explain_session",
"arguments": {
"session": "2026-03-19/001"
}
}Tool failures use MCP protocol isError: true with a structured JSON body:
{
"status": "error",
"code": "INVALID_INPUT",
"message": "Either diff or staged=true is required"
}Stable error codes include INVALID_INPUT, INVALID_REPO_PATH, REVIEW_FAILED, REVIEW_PR_FAILED, DRY_RUN_FAILED, CONFIG_GET_FAILED, CONFIG_SET_FAILED, EXPLAIN_SESSION_FAILED, LEADERBOARD_FAILED, and STATS_FAILED.
Troubleshooting
- If the server exits immediately, run
pnpm --filter @codeagora/mcp buildand confirmpackages/mcp/dist/index.jsexists. - If review tools return missing-provider errors, set the provider key for the configured reviewer backend.
- If
repo_pathis rejected, omit it when you are already inside the workspace; otherwise pass the exact workspace root. Symlinks and paths outside the repo are intentionally rejected. - The structured error body includes
guidancefor invalidrepo_path, empty diff, and other common retryable failures. - If a client cannot find the command, use an absolute
nodepath and an absolutedist/index.jspath for local beta smoke.
