better-code-review-graph
About
Knowledge graph for token-efficient code reviews with Tree-sitter parsing, dual-mode embedding (ONNX + LiteLLM), and blast-radius analysis via MCP tools.
Details
- Author
- n24q02m
- Categories
- Developer Tools, Knowledge Base
Jump to
config-- Server configuration and credential setup
Actions:status|set|cache_clear|setup_status|setup_start|setup_skip|setup_reset|setup_complete
Actions:scan|report|suppress|rule_list
Thesemgrepengine requires the](https://mcp.n24q02m.com/get-started/multi-user/)[security]extra and runs Semgrep'sp/autoregistry pack plus a 3-rule curated overlay.
Topics:graph|query|review|config|security|recipes
Returns complete documentation for each tool. Use when the compressed descriptions above are insufficient.
config__open_relay-- Re-trigger the relay setup form
Registered automatically frommcp-core. In HTTP mode it returns<PUBLIC_URL>/authorizeso the agent can re-open the browser setup form (e.g. after credential expiry); in stdio mode it returnsstatus: 'stdio_unsupported'.
Runningbetter-code-review-graphwithno argumentsstarts the MCP server over stdio (this is what an MCP client launches). A leading positional argument routes to a subcommand instead -- handy for building or embedding the graph directly from a shell or CI step, before any MCP client connects. Run these withuvx(oruv runfrom a source checkout):
# Start the MCP server over stdio (default -- no subcommand) uvx better-code-review-graph # Build (or incrementally update) the graph for the current repo uvx better-code-review-graph graph build # Full re-parse of every file instead of a git-diff incremental uvx better-code-review-graph graph build --full-rebuild # Compute embeddings for semantic search (local ONNX by default) uvx better-code-review-graph graph embed
Thegraph buildandgraph embedsubcommands print a JSON result and exit non-zero on error. Theconfig,doctor, andrelaysubcommands come from the sharedmcp-coreCLI.
What this fork fixes versus the upstreamcode-review-graph:
How better-code-review-graph stacks up against direct competitors in each pillar:
Sources:Greptile·Greptile pricing·Sourcegraph MCP·CodeGraph. Cells marked?are capabilities the competitor does not publicly document, not confirmed absences.
- Graceful fallbacks-- Cloud embedding failure falls back to local ONNX.
- Error handling-- Tools return error strings with fix suggestions, never crash.
- Read-only mount-- Docker mode mounts the repo as:ro(read-only).
- SSRF-guarded endpoints-- CustomEMBEDDING_API_BASE/LLM_API_BASEURLs are validated before any outbound call.
To report a vulnerability, seeSECURITY.md.
git clone https://github.com/n24q02m/better-code-review-graph cd better-code-review-graph uv sync --group dev uv run pytest uv run better-code-review-graph
This plugin implementsTC-Local(machine-bound, single trust principal). See themcp-core trust modelfor full classification.
The v2.0 release addedtemporal columns(valid_from_sha/valid_to_shaon every node and edge) plus an opt-in security scanner. The schema migration is auto-applied on firstGraphStoreopen, and a backup of the pre-2.0 DB is written to<graph_db>.pre-2.0.bak. To downgrade and restore it:
CRG_DOWNGRADE_TO_1_X=1 uvx better-code-review-graph
Full schema-change list, behavior changes, and rollback procedure:BREAKING_CHANGES.md. Release-by-release history:CHANGELOG.md.
Full docs atmcp.n24q02m.com/servers/better-code-review-graph/setup/:
- Setup-- install methods for Claude Code, Codex, Gemini CLI, Cursor, Windsurf, mcp.json
- Modes overview-- stdio / local-relay / remote-relay / remote-oauth
- Multi-user setup-- per-JWT-sub credential model
Use thehelptool from any MCP client for inline per-tool reference.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Code Rag with Graph - local only installation
A blazingly fast codebase graphRAG implementation in 100% Rust
Recon indexes your codebase into a knowledge graph and exposes it via 14 MCP tools. AI agents get dependency mapping, blast radius analysis, safe multi-file rename, execution flow tracing, Cypher queries, semantic search, and PR review — without reading every file. Supports 13 languages, live re-index in ~50ms, and zero config setup.
Local-first knowledge graph for developers. Watches project files, extracts entities and relationships via LLMs, and lets you query across projects with natural language and source citations.
A platform-agnostic code analysis library with semantic search capabilities and MCP server support.
A server for CodeFuse-CGM, a graph-integrated large language model designed for repository-level software engineering tasks.
Generates and queries a graph representation of a codebase.
An MCP server that indexes local code into a graph database to provide context to AI assistants.
Graph-powered code intelligence MCP server with semantic search, knowledge graph, and dependency analysis for Claude Code, Cursor, and Copilot.
Graph-based long-term memory skill for AI (LLM) coding agents — faster context, fewer tokens, safer refactors
mcp-name: io.github.n24q02m/better-code-review-graph
Knowledge graph for token-efficient code reviews -- semantic search and call-graph resolution across your codebase.
An MCP server that parses your codebase withTree-sitter, builds a structural graph of functions/classes/imports, and gives Claude (or any MCP client) precise context so it reads only what matters instead of the whole tree. Semantic search runs through the local ONNX model registry fromfastretrievalby default (zero config, no API key), with an optional cloud embedding chain. Fork ofcode-review-graphwith fixed multi-word search, qualified call resolution, dual-mode embeddings, output pagination, and production CI/CD.
v2.0 adds temporal columns (valid_from_sha/valid_to_shaon every node + edge) and an opt-in security scanner. The schema migration is auto-applied on firstGraphStoreopen, and a backup of the pre-2.0 DB is saved to<graph_db>.pre-2.0.bakso you can roll back. SeeBREAKING_CHANGES.mdfor the full schema-change list, behavior changes, environment requirements, and the downgrade procedure (CRG_DOWNGRADE_TO_1_X=1 uv run better-code-review-graph).
- v2.0 migration (BREAKING)
- Install
- Smithery
- Configuration
- Tools
- CLI
- Features
- Comparison
- Security
- Build from source
- Trust model
- Migration & changelog
- Documentation
- License
The server runs overstdioby default and works with any MCP client. The recommended launcher isuvx(no install step -- it fetches and runs the published package in an isolated environment):
{ "mcpServers": { "better-code-review-graph": { "command": "uvx", "args": ["--python", "3.13", "better-code-review-graph"], "env": { "MCP_TRANSPORT": "stdio" } } } }
uvx better-code-review-graph # run without installing pip install better-code-review-graph
The optional Semgrep engine for deeper security scans is a separate extra:
pip install 'better-code-review-graph[security]'
Install with an AI agent-- paste this to your AI coding agent:
Install MCP serverbetter-code-review-graphfollowing the steps athttps://raw.githubusercontent.com/n24q02m/claude-plugins/main/plugins/better-code-review-graph/setup-with-agent.md
Full per-client setup (Claude Code, Codex, Gemini CLI, Cursor, Windsurf, rawmcp.json) is atmcp.n24q02m.com/servers/better-code-review-graph/setup/.
The repo ships asmithery.yamlso the server can be built and run throughSmithery. It deploys overstdioand needs no startup configuration -- the config schema is empty, and any optional cloud embedding/summary keys are supplied at runtime through the server's own config flow (seeConfigurationbelow). The launch command is the sameuvxinvocation as a local install:
startCommand: type: stdio commandFunction: |- (config) => ({ command: 'uvx', args: ['--python', '3.13', 'better-code-review-graph'] })
Everything worksout of the box with zero configuration-- semantic search uses the local ONNX registry fromfastretrieval(Qwen3-Embedding-0.6Bis the current built-in reference entry, ~570 MB downloaded on firstgraph embed). This reference entry is not a Qwen-only boundary: any built-in registry ID or valid non-Qwen artifact manifest follows the same resolver. All environment variables below are optional and only needed for cloud embeddings, LLM summaries, or an explicit BYO local artifact.
Embeddings and summaries are each driven by anordered model chain-- a CSV ofprovider/modelentries where the order is the litellm fallback order (first entry is the active model). The provider is inferred from the model prefix, so the matching<PROVIDER>_API_KEYis all you need to add.
All vectors are stored at a fixed 768 dimensions (MRL truncation), so the embeddings table schema stays valid across providers. Switching embeddingmodelchanges the vector space; embeddings are tracked per provider and a provider switch triggers re-embedding rather than mixing incomparable vectors.
Cloud models need the provider key for whatever prefixes appear in your chains. Without any cloud key the server stays on local ONNX. Summarizers must expose a chat-completion API (so Jina and Cohere are embedding-only).
Any otherlitellm providerworks via its standard<PROVIDER>_API_KEY.
CRG intentionally exposes no local reranker settings because this server has no local reranker path. A custom external embedding ID without a manifest must provideLOCAL_EMBEDDING_DIM; a local artifact directory must provide a validfastretrieval-manifest.json, otherwise startup fails closed.
{ "mcpServers": { "better-code-review-graph": { "command": "uvx", "args": ["--python", "3.13", "better-code-review-graph"], "env": { "MCP_TRANSPORT": "stdio", "EMBEDDING_MODELS": "jina_ai/jina-embeddings-v5-text-small,gemini/gemini-embedding-001", "SUMMARY_MODELS": "gemini/gemini-2.5-flash", "JINA_AI_API_KEY": "jina_...", "GEMINI_API_KEY": "AIza..." } } } }
You can also configure cloud keys interactively in HTTP mode via the relay setup form (config(action="setup_start")returns the browser URL). See themodes overviewandmulti-user setup.
The relay setup form has an optionalworkspace usernamefield. Entering the same username always lands you in the same per-subbucket, so your keys and graph stay reachable across a re-authorization and across devices, instead of being tied to the one-off subject minted for each/authorizeround-trip. Leaving it blank keeps the previous per-authorize behaviour.
Trust boundary: when the form is gated by asharedMCP_RELAY_PASSWORD, the username is a partition key, not a secret -- anyone who knows that password can type any username and reach that bucket. That is fine for a trusted group; an untrusted multi-tenant deployment needs a per-user secret or delegated OAuth instead.
One-time migration:existing users must re-enter their credentials once after this change. Nothing is deleted; credentials stored under the old random subject are simply no longer addressed.
Seven tools, each grouping related actions to keep the tool surface small.
Actions:build|update|stats|embed|export|summarize
Actions:query|search|impact|large_functions|spot_check|renamed_in_diff|diff
Most read actions acceptas_of=<sha>for temporal (point-in-time) snapshots andrepo=<repo_id>to scope a federated multi-repo graph.
Token-optimized review context with structural summary, impacted nodes, source snippets, and review guidance.contextauto-detects changed files from the git diff;delta(withfrom_sha/to_sha, optionalshow_line_shifts) surfaces refactor moves between two commits.
config-- Server configuration and credential setup
Actions:status|set|cache_clear|setup_status|setup_start|setup_skip|setup_reset|setup_complete
Actions:scan|report|suppress|rule_list
Thesemgrepengine requires the[security]extra and runs Semgrep'sp/autoregistry pack plus a 3-rule curated overlay.
Topics:graph|query|review|config|security|recipes
Returns complete documentation for each tool. Use when the compressed descriptions above are insufficient.
config__open_relay-- Re-trigger the relay setup form
Registered automatically frommcp-core. In HTTP mode it returns<PUBLIC_URL>/authorizeso the agent can re-open the browser setup form (e.g. after credential expiry); in stdio mode it returnsstatus: 'stdio_unsupported'.
Runningbetter-code-review-graphwithno argumentsstarts the MCP server over stdio (this is what an MCP client launches). A leading positional argument routes to a subcommand instead -- handy for building or embedding the graph directly from a shell or CI step, before any MCP client connects. Run these withuvx(oruv runfrom a source checkout):
# Start the MCP server over stdio (default -- no subcommand) uvx better-code-review-graph # Build (or incrementally update) the graph for the current repo uvx better-code-review-graph graph build # Full re-parse of every file instead of a git-diff incremental uvx better-code-review-graph graph build --full-rebuild # Compute embeddings for semantic search (local ONNX by default) uvx better-code-review-graph graph embed
Thegraph buildandgraph embedsubcommands print a JSON result and exit non-zero on error. Theconfig,doctor, andrelaysubcommands come from the sharedmcp-coreCLI.
What this fork fixes versus the upstreamcode-review-graph:
How better-code-review-graph stacks up against direct competitors in each pillar:
Sources:Greptile·Greptile pricing·Sourcegraph MCP·CodeGraph. Cells marked?are capabilities the competitor does not publicly document, not confirmed absences.
- Graceful fallbacks-- Cloud embedding failure falls back to local ONNX.
- Error handling-- Tools return error strings with fix suggestions, never crash.
- Read-only mount-- Docker mode mounts the repo as:ro(read-only).
- SSRF-guarded endpoints-- CustomEMBEDDING_API_BASE/LLM_API_BASEURLs are validated before any outbound call.
To report a vulnerability, seeSECURITY.md.
git clone https://github.com/n24q02m/better-code-review-graph cd better-code-review-graph uv sync --group dev uv run pytest uv run better-code-review-graph
This plugin implementsTC-Local(machine-bound, single trust principal). See themcp-core trust modelfor full classification.
The v2.0 release addedtemporal columns(valid_from_sha/valid_to_shaon every node and edge) plus an opt-in security scanner. The schema migration is auto-applied on firstGraphStoreopen, and a backup of the pre-2.0 DB is written to<graph_db>.pre-2.0.bak. To downgrade and restore it:
CRG_DOWNGRADE_TO_1_X=1 uvx better-code-review-graph
Full schema-change list, behavior changes, and rollback procedure:BREAKING_CHANGES.md. Release-by-release history:CHANGELOG.md.
Full docs atmcp.n24q02m.com/servers/better-code-review-graph/setup/:
- Setup-- install methods for Claude Code, Codex, Gemini CLI, Cursor, Windsurf, mcp.json
- Modes overview-- stdio / local-relay / remote-relay / remote-oauth
- Multi-user setup-- per-JWT-sub credential model
Use thehelptool from any MCP client for inline per-tool reference.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Code Rag with Graph - local only installation
A blazingly fast codebase graphRAG implementation in 100% Rust
Recon indexes your codebase into a knowledge graph and exposes it via 14 MCP tools. AI agents get dependency mapping, blast radius analysis, safe multi-file rename, execution flow tracing, Cypher queries, semantic search, and PR review — without reading every file. Supports 13 languages, live re-index in ~50ms, and zero config setup.
Local-first knowledge graph for developers. Watches project files, extracts entities and relationships via LLMs, and lets you query across projects with natural language and source citations.
A platform-agnostic code analysis library with semantic search capabilities and MCP server support.
A server for CodeFuse-CGM, a graph-integrated large language model designed for repository-level software engineering tasks.
Generates and queries a graph representation of a codebase.
An MCP server that indexes local code into a graph database to provide context to AI assistants.
Graph-powered code intelligence MCP server with semantic search, knowledge graph, and dependency analysis for Claude Code, Cursor, and Copilot.
Graph-based long-term memory skill for AI (LLM) coding agents — faster context, fewer tokens, safer refactors
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





