Skip to content

Setup

Better Code Review Graph — Manual Setup Guide

Section titled “Better Code Review Graph — Manual Setup Guide”

2026-05-02 Update: Plugin install (Method 1) now uses pure stdio mode. API keys are optional env vars. The previous “Zero-Config Relay” auto-spawn pattern has been removed. If you relied on the relay form to enter API keys, please:

  1. Set the env var directly in plugin config (Method 1), OR
  2. Use HTTP self-host mode (advanced; out of scope of this guide).

This plugin defaults to stdio via plugin install (uvx/npx) — the simplest path and the one this guide covers in full. It also ships Docker images (:stdio and :http targets) and supports HTTP transport (MCP_TRANSPORT=http / TRANSPORT_MODE=http / --http) for multi-user self-hosting. What it does not offer (unlike better-notion-mcp/better-email-mcp/better-telegram-mcp) is a hosted remote-relay/OAuth mode — HTTP here is self-host only.

For comparison, the other 6 plugins in this stack (better-notion-mcp, better-email-mcp, better-telegram-mcp, wet-mcp, mnemo-mcp, imagine-mcp) document 3 methods:

  1. Default — Plugin install (uvx/npx) stdio
  2. Fallback — Docker stdio (Windows/macOS PATH issues)
  3. Recommended — Docker HTTP (multi-device, OAuth/relay form, claude.ai web)

⚠️ Mutually exclusive — pick ONE per plugin: Do NOT stack /plugin install AND a user mcpServers override (Docker stdio or HTTP) — both would load simultaneously and create duplicate entries (plugin’s npx/uvx stdio + your override). Plugin matching is by endpoint (URL or command string) per CC docs, not by name — and npx/uvxdocker ≠ HTTP URL, so all three are distinct endpoints. Choosing the Docker stdio or HTTP self-host path means losing the plugin’s skills/agents/hooks/commands. For full plugin features, use the default plugin install (Method 1) documented below.

  • Python 3.13 (3.14+ is NOT supported)
  • uv or uvx installed (docs)
  • Docker (optional, for containerized setup)
  • A code repository to analyze
Section titled “Method 1: Claude Code Plugin (Recommended)”

Plugin marketplace install runs the server in pure stdio mode with optional API key env vars. No daemon-bridge, no auto-spawn, no relay form. The graph is stored locally in SQLite — no external graph database required.

When you run /plugin install, Claude Code prompts you for the following credentials (declared in userConfig per CC docs). Sensitive values are stored in your system keychain and persist across /plugin update:

FieldRequiredWhere to obtain
JINA_AI_API_KEYOptionalhttps://jina.ai/api-key
GEMINI_API_KEYOptionalhttps://aistudio.google.com/apikey
OPENAI_API_KEYOptionalhttps://platform.openai.com/api-keys
COHERE_API_KEYOptionalhttps://dashboard.cohere.com/api-keys
  1. Open Claude Code.
  2. Install the plugin (Claude Code prompts for JINA_AI_API_KEY — press Enter to skip):
    Terminal window
    /plugin marketplace add n24q02m/claude-plugins
    /plugin install better-code-review-graph@n24q02m-plugins
  3. The server starts automatically when Claude Code launches.
  4. The SessionStart hook auto-builds the graph for the current project; PostToolUse updates it after edits.

All API keys are optional. The server works with local ONNX embeddings out of the box.

Set API keys in your MCP client env block or shell profile:

Terminal window
export JINA_AI_API_KEY="jina_..."
export GEMINI_API_KEY="AIza..."
VariableRequiredDefaultDescription
JINA_AI_API_KEYNoJina AI: embedding + reranking (highest priority)
GEMINI_API_KEYNoGemini: embedding (free tier). Also accepts GOOGLE_API_KEY
OPENAI_API_KEYNoOpenAI: embedding
COHERE_API_KEYNoCohere: embedding + reranking. Also accepts CO_API_KEY
EMBEDDING_BACKENDNoauto-detectcloud or local (ONNX)
EMBEDDING_MODELNoauto-detectCloud embedding model name
TRANSPORT_MODENostdioSet to http to enable HTTP transport (multi-user).
PUBLIC_URLYes (http)Server’s public URL for relay form.
MCP_DCR_SERVER_SECRETYes (http)HMAC secret for stateless Dynamic Client Registration.
MCP_PORTNo8080Server port (http mode only).
LOG_LEVELNoINFOLogging level

Cloud auto-detection order: Jina AI > Gemini > OpenAI > Cohere > Local ONNX (Qwen3)

All embeddings are stored at 768 dimensions. Switching providers does NOT invalidate existing vectors.

Python, TypeScript, JavaScript, Go, Rust, Java, C#, Ruby, Kotlin, Swift, PHP, C/C++, Solidity

Create .code-review-graphignore in your project root to exclude paths:

generated/**
*.generated.ts
vendor/**
node_modules/**

Ensure the repo_path parameter points to the root of a code repository. Check that the project contains files in a supported language.

On first use, the local ONNX embedding model (~570MB) is downloaded. Subsequent runs are instant. Use cloud embedding (any API key) to avoid this download.

Build the graph first:

graph(action="build", repo_path="/path/to/your/repo")

Ensure the volume mount is correct. The repo path inside the container is /repo:

Terminal window
docker run -i --rm -v "/absolute/path/to/repo:/repo:ro" n24q02m/better-code-review-graph:latest