better-code-review-graph

mcp
Security Audit
Warn
Health Warn
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Pass
  • Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested
Purpose
This tool is a knowledge graph server designed to make code reviews more efficient. It parses your codebase using Tree-sitter to build a structural graph of functions and classes, allowing an AI assistant to pull only the specific context it needs instead of reading entire files.

Security Assessment
Overall Risk: Low. The tool requires no dangerous system permissions and a light code audit of 12 files found no malicious patterns, hardcoded secrets, or dangerous code. It does have network capabilities, as it supports dual-mode embeddings, which includes a "cloud" mode (via LiteLLM) to send data to external APIs for processing. Because it inherently analyzes your source code, any cloud-based embedding feature will transmit code snippets to third-party providers. However, it offers a local ONNX mode, which keeps all data safely on your machine.

Quality Assessment
The project is in excellent structural health. It uses the permissive MIT license, features automated CI/CD pipelines, and enforces code coverage. The developer has actively integrated modern tooling like Renovate and semantic-release. The primary caveat is low community visibility; it is a recent fork of another project and currently has only 5 GitHub stars. While this means it hasn't been broadly battle-tested by a large community, the developer's commitment to fixing upstream bugs, paginating outputs, and maintaining production-ready code is a strong positive indicator.

Verdict
Safe to use, but select local ONNX embeddings rather than cloud mode if you want to prevent your source code from leaving your local environment.
SUMMARY

Knowledge graph for token-efficient code reviews — fixed search, qualified call resolution, dual-mode embedding (ONNX + LiteLLM)

README.md

Better Code Review Graph

mcp-name: io.github.n24q02m/better-code-review-graph

Knowledge graph for token-efficient code reviews -- fixed search, configurable embeddings, qualified call resolution.

CI
codecov
PyPI
Docker
License: MIT

Python
MCP
semantic-release
Renovate

better-code-review-graph MCP server

Fork of code-review-graph with critical bug fixes, configurable embeddings, and production CI/CD. Parses your codebase with Tree-sitter, builds a structural graph of functions/classes/imports, and gives Claude (or any MCP client) precise context so it reads only what matters.

Features

Feature code-review-graph better-code-review-graph
Multi-word search Broken (literal substring) AND-logic word splitting
callers_of/callees_of Empty results (bare name targets) Qualified name resolution + bare fallback
Embedding sentence-transformers + torch (1.1 GB) qwen3-embed ONNX + cloud (200 MB), dual-mode
Output size Unbounded (500K+ chars) Paginated (max_results, truncated flag)
Tool design 9 individual tools 5 tools: graph + query + review + config + help
Plugin hooks Invalid PostEdit/PostGit Valid PostToolUse

Setup

With AI Agent -- copy and send this to your AI agent:

Please set up better-code-review-graph for me. Follow this guide:
https://raw.githubusercontent.com/n24q02m/better-code-review-graph/main/docs/setup-with-agent.md

Manual Setup -- follow docs/setup-manual.md

Tools

graph -- Graph lifecycle

Actions: build | update | stats | embed

Action Description
build Full or incremental graph build. Set full_rebuild=true to re-parse all files.
update Alias for build with full_rebuild=false (incremental).
stats Graph size, languages, node/edge breakdown, embedding count.
embed Compute vector embeddings for semantic search. Dual-mode: local ONNX or cloud.

query -- Graph queries

Actions: query | search | impact | large_functions

Action Description
query Predefined pattern queries: callers_of, callees_of, imports_of, importers_of, children_of, tests_for, inheritors_of, file_summary.
search Search code entities by name/keyword or semantic similarity.
impact Blast radius of changed files. Auto-detects from git diff. Paginated with max_results.
large_functions Find functions/classes exceeding a line-count threshold.

review -- Code review context

Token-optimized review context with structural summary, source snippets, and review guidance. Auto-detects changed files from git diff.

config -- Server configuration

Actions: status | set | cache_clear

Action Description
status Server info: version, graph path, node/edge counts, embedding backend.
set Update runtime settings (e.g., log_level).
cache_clear Remove all computed embeddings.

help -- Full documentation

Topics: graph | query | review | config

Returns complete documentation for each tool. Use when the compressed descriptions above are insufficient.

Security

  • 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 repo as :ro (read-only)

Build from Source

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

Requirements: Python 3.13, uv

License

MIT -- See LICENSE.

Reviews (0)

No results found