Labsco
MCP SERVER

Better Code Review Graph

by n24q02m

Build a knowledge graph of the codebase once, then ask what a change reaches, get token-efficient review context, and scan for security issues over the graph.

Code Intelligence & Repository IndexingVerified
Summary
Review context assembled from the graph, not the whole diff.

The review tool is the payoff: instead of feeding a model a raw diff, it auto-detects the changed files, resolves what they impact through the call graph, and returns a structural summary with just the relevant snippets — which is where the token efficiency comes from. Running the security scan over the same graph means findings carry the structural context of what calls what, and the local-ONNX default keeps the whole thing working without sending code to an embedding service.

What it is

A code-knowledge-graph server for token-efficient code review: 7 composite tools — graph, query, review, security, config, help and a relay-setup helper — each dispatching to a set of actions, with semantic search and call-graph resolution across the codebase. Embeddings run locally by default.

What you get
  • graph builds and maintains the knowledge graph — build for a full rebuild, update for incremental changes, embed, stats, summarize, and export/import to move it between machines
  • query answers relationship and impact questions: query by pattern and target, search by text, impact for what a set of changed files reaches, large_functions above a line threshold, and spot_check to pull random callsite snippets from the last callers/callees/inheritors result
  • review generates the review context itself — its context action auto-detects changed files from the git diff and returns a structural summary, impacted nodes, source snippets and review guidance, while delta compares two SHAs with optional line-shift tracking
  • security scans over the graph with a heuristic or semgrep engine, reports as json or sarif, lists rules, and suppresses a rule by id
  • config manages status, log level, cache clearing and the credential setup flow, and config__open_relay opens the relay configuration URL in the browser
  • help returns full documentation for any tool — graph, query, review, config, security or recipes — when the compressed tool descriptions are not enough
Requirements

Python 3.13, run with uvx better-code-review-graph over stdio, or from the Docker image. Embeddings default to a local ONNX model — no API key — with EMBEDDING_MODELS to configure a cloud or ordered model chain and SUMMARY_MODELS to enable summaries (empty disables them).

Setup effort

One command — uvx better-code-review-graph