better-code-review-graph
by n24q02m·★ 46·Score 47
MCP server for token-efficient code reviews using knowledge graphs with fixed search and configurable embeddings.
Overview
Better Code Review Graph is an MCP server that parses codebases using Tree-sitter, builds a structural graph of functions, classes, and imports, and provides precise context to AI clients like Claude. It offers tools for graph lifecycle management, code queries, impact analysis, and code review context generation. The server supports both local ONNX embeddings and cloud-based embeddings, with configurable options for embedding models and LLM-generated summaries.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this for AI code review when working with medium to large codebases where token efficiency matters, especially if you need temporal analysis of changes or security scanning.
When NOT to choose this
Don't choose this for very small projects where the overhead of building a knowledge graph outweighs benefits, or if you need real-time collaborative editing features.
Tools this server exposes
6 tools extracted from the READMEgraphGraph lifecycle management: build, update, stats, embed, export, summarize
queryPredefined pattern queries: callers_of, callees_of, imports_of, etc.
searchSearch code entities by name/keyword or semantic similarity
impactBlast radius of changed files based on git diff
large_functionsFind functions/classes exceeding a line-count threshold
reviewGenerate token-optimized code review context with structural summary
Comparable tools
Installation
Installation
With Claude Desktop
- Add to your
claude_desktop_config.json:
{
"mcpServers": {
"better-code-review-graph": {
"command": "uv",
"args": ["run", "better-code-review-graph", "stdio"],
"env": {
"CRG_DATABASE_URL": "sqlite:///code-review-graph.db"
}
}
}
}With pip
pip install better-code-review-graph
better-code-review-graph initWith Docker
docker run -it --rm -v "$(pwd):/app" -e CRG_DATABASE_URL="sqlite:///code-review-graph.db" n24q02m/better-code-review-graph:latest"FAQ
- What file formats can be exported from the code graph?
- The graph can be exported in 4 formats: graphml (Gephi/Cytoscape), json-ld, dot (Graphviz), and cypher (Neo4j replay).
- How are embeddings computed and stored?
- Embeddings can be computed using either local ONNX models (qwen3-embed) or cloud APIs. The embeddings are stored in the graph database for semantic search capabilities.
Compare better-code-review-graph with
Last updated · Auto-generated from public README + GitHub signals.