<div align="center">
Stop Burning Tokens โ Use Knowledge Graphs + MCP to Give AI a Map of Your Code
<img src="https://readme-typing-svg.herokuapp.com?font=Fira+Code&weight=600&size=20&=1000&color=00D4AA¢er=true&vCenter=true&width=700&lines=500x+fewer+tokens+per+query;AI+reads+a+graph+instead+of+your+entire+codebase;Auto-updates+on+every+git+commit;Works+with+Claude+Code%2C+Cursor%2C+Windsurf;Zero+config+after+setup+%E2%80%94+fully+automatic" alt="Typing SVG" />
<br/>
</div>
๐ What This Guide Covers #
Your AI assistant reads your ENTIRE codebase every time you ask a question.
That's slow, expensive, and dumb.
This guide gives your AI a MAP of your code โ so it looks up answers
instead of reading everything from scratch.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 1. What is MCP? โ โ The "USB port" for AI
โ 2. Install graphify โ โ Builds the knowledge graph
โ 3. Install code-review-graph โ โ Fast code-only MCP server
โ 4. Connect via MCP โ โ Wire it to Claude Code
โ 5. Automate updates โ โ Graph stays fresh forever
โ 6. Use it โ โ 500x less tokens
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ค Wait, What is MCP? #
MCP = Model Context Protocol
Think of it like a USB port for AI.
USB lets ANY device talk to ANY computer:
๐จ๏ธ Printer โโโ
๐ท Camera โโโคโโ USB โโโโ ๐ป Computer
๐ฎ Gamepad โโโ
MCP lets ANY tool talk to ANY AI assistant:
๐ Graph DB โโโ
๐ฌ Slack โโโคโโ MCP โโโโ ๐ค AI Assistant
๐ Code Graph โโโ
Without MCP:
You: "How does LlmRouter work?"
AI: "Let me read... *reads 143 files* ... *burns 362,000 tokens* ... here's what I found"
โฑ๏ธ 30 seconds
๐ฐ $$$ tokens burned
With MCP:
You: "How does LlmRouter work?"
AI: "Let me check the graph..."
โ query_graph("callers_of", "LlmRouter")
โ gets back 10 precise connections in 0.2 seconds
"LlmRouter has 47 connections. It's called by WebChatServer, ZeroClawService..."
โฑ๏ธ 2 seconds
๐ฐ ~700 tokens (that's 500x less!)
The Restaurant Analogy ๐
WITHOUT MCP (reading files):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ You walk into a restaurant. โ
โ There's no menu. โ
โ You go to the kitchen. โ
โ You open EVERY fridge. โ
โ You read EVERY ingredient label. โ
โ Then you decide what to order. โ
โ โ
โ That's your AI reading your codebase. โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
WITH MCP (using graph):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ You walk into a restaurant. โ
โ There's a MENU on the table. โ
โ You pick what you want. โ
โ Done. โ
โ โ
โ The graph IS the menu. โ
โ MCP IS the waiter. โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐งฉ The Two Tools (And Why You Need Both) #
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ graphify code-review-graph โ
โ โโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โ
โ ๐ The FULL picture โก The FAST picture โ
โ โ
โ โ
Code (functions, classes) โ
Code (functions, classes) โ
โ โ
Docs (README, guides) โ No docs โ
โ โ
Images (screenshots) โ No images โ
โ โ
Bugs & plans โ No docs โ
โ โ
Semantic connections โ Only structural โ
โ โ
Community clusters โ Basic clusters โ
โ โ
Interactive HTML viz โ
HTML viz โ
โ โ
โ ๐ Needs LLM for docs/images โก Pure AST, no LLM needed โ
โ ๐ 1,479 nodes example ๐ 1,411 nodes example โ
โ โ
โ Best for: Best for: โ
โ "How does feature X relate "Who calls this function?" โ
โ to the bug in BUGS.md?" "What imports this class?" โ
โ "Impact of changing this?" โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
USE BOTH. They complement each other.
code-review-graph = your quick dictionary
graphify = your full encyclopedia
๐ฆ Step 1 โ Install Everything #
1a. Install graphify
pip install graphifyy
Yes, it's
graphifyywith two y's on PyPI.
1b. Install code-review-graph
pip install code-review-graph
1c. Verify both installed
graphify --version
code-review-graph --help
You should see version info and help text. If not, make sure Python is in your PATH.
๐จ Step 2 โ Build Your First Graph #
2a. Build the graphify knowledge graph
Navigate to your project root and run:
cd /path/to/your/project
Then in Claude Code (or any AI assistant with graphify skill):
/graphify .
This will:
- Detect all files (code, docs, images)
- Parse code via AST (free, no LLM)
- Extract concepts from docs/images (uses LLM)
- Build a graph with nodes + edges
- Cluster into communities
- Generate
graphify-out/graph.html(interactive viz!)
What happens:
Your Project graphify-out/
โโโ src/ โโโ graph.json โ The graph data
โ โโโ auth.kt โโโโโโโบ โโโ graph.html โ Open in browser!
โ โโโ router.kt โโโโโโโบ โโโ GRAPH_REPORT.md โ Audit report
โ โโโ database.kt โโโโโโโบ โโโ cost.json โ Token usage
โโโ README.md โโโโโโโบ
โโโ BUGS.md โโโโโโโบ
โโโ screenshots/ โโโโโโโบ
All files become graph nodes
with edges showing relationships
2b. Build the code-review-graph
code-review-graph build
This is instant โ it only parses code via AST (no LLM needed):
$ code-review-graph build
INFO: Progress: 50/140 files parsed
INFO: Progress: 100/140 files parsed
INFO: Progress: 140/140 files parsed
Full build: 140 files, 1411 nodes, 2801 edges
2c. Open the graph in your browser
open graphify-out/graph.html # macOS
start graphify-out/graph.html # Windows
xdg-open graphify-out/graph.html # Linux
You'll see something like this:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ โ LlmRouter โ
โ /|\ โ
โ / | \ โ
โ โ โ โ WebChat KeyManager ToolSystem โ
โ | | | โ
โ โ โ โ Service Agents OfflineModel โ
โ โ
โ Nodes colored by community โ
โ Click any node to see connections โ
โ Zoom, pan, drag โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Step 3 โ Connect to Your AI via MCP #
What are we doing here?
Right now:
Claude Code โโโโ ??? โโโโ Your graph
(can't see the graph)
After this step:
Claude Code โโโโ MCP โโโโ code-review-graph server โโโโ Fast code lookups
โ
โโโโโโโโโโโ MCP โโโโ graphify server โโโโโโโโโโโโ Full knowledge graph
3a. Create .mcp.json in your project root
Create a file called .mcp.json (note the dot!) in your project's root directory:
{
"mcpServers": {
"code-review-graph": {
"command": "code-review-graph",
"args": ["serve"],
"type": "stdio"
},
"graphify": {
"command": "python",
"args": ["-m", "graphify.serve", "graphify-out/graph.json"],
"type": "stdio"
}
}
}
That's it. Claude Code reads
.mcp.jsonon startup and connects to both servers automatically.
3b. What each server provides
code-review-graph MCP tools:
| Tool | What it does | Example |
|---|---|---|
semantic_search_nodes |
Find code by keyword | "Find all auth-related classes" |
query_graph |
Trace relationships | "Who calls LlmRouter?" |
get_impact_radius |
Blast radius of a change | "What breaks if I change this?" |
detect_changes |
Risk-scored code review | "Review my last commit" |
get_review_context |
Token-efficient snippets | "Show me relevant code for review" |
get_affected_flows |
Execution path analysis | "Which flows does this change affect?" |
graphify MCP tools:
| Tool | What it does | Example |
|---|---|---|
query_graph |
Search the full graph | "How does auth relate to the API?" |
get_node |
Get node details | "Tell me about OfflineModelManager" |
get_neighbors |
Find connected nodes | "What's connected to LlmRouter?" |
get_community |
See a cluster | "Show me the memory subsystem" |
god_nodes |
Most connected nodes | "What are the core abstractions?" |
graph_stats |
Graph overview | "How big is the graph?" |
shortest_path |
Find path between concepts | "How does auth connect to database?" |
3c. Restart Claude Code
3d. Verify it works
In your new Claude Code session, ask:
"What are the most connected nodes in this codebase?"
If it uses MCP tools (you'll see tool calls like god_nodes or semantic_search_nodes) instead of running Grep/Read on your files โ it's working!
BEFORE MCP (what you DON'T want to see):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ Grep("class.*Router", **/*.kt) โ โ Reading files
โ ๐ Read(src/LlmRouter.kt) โ โ Reading files
โ ๐ Read(src/ProviderRouter.kt) โ โ Reading files
โ ๐ Read(src/WebChatServer.kt) โ โ More files...
โ โ
โ ๐ฐ Used: ~50,000 tokens โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
AFTER MCP (what you WANT to see):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ query_graph("callers_of", โ โ Graph lookup!
โ "LlmRouter") โ
โ โ
โ ๐ฐ Used: ~700 tokens โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ค Step 4 โ Automate Everything (Set and Forget) #
This is the magic part. After this, your graphs update themselves every time you commit code.
4a. Install the graphify git hook
graphify hook install
Output:
post-commit: appended to .git/hooks/post-commit
post-checkout: appended to .git/hooks/post-checkout
4b. Add code-review-graph to the same hook
Open .git/hooks/post-commit and add at the bottom:
if command -v code-review-graph >/dev/null 2>&1; then
code-review-graph update 2>/dev/null || true
fi
4c. What happens now on every commit
You type: git commit -m "add new feature"
โโโโโโโโโโโโโโโโ
โ git commit โ
โโโโโโโโฌโโโโโโโโ
โ
โโโโโโโโผโโโโโโโโ
โ post-commit โ
โ hook โ
โโโโโโโโฌโโโโโโโโ
โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโ
โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ
โ graphify โ โ code-review-graph โ
โ โ โ โ
โ Re-extracts only โ โ Re-parses only โ
โ CHANGED files โ โ CHANGED files โ
โ (AST, no LLM) โ โ (AST, no LLM) โ
โ โ โ โ
โ Updates: โ โ Updates: โ
โ graph.json โ โ internal graph โ
โ GRAPH_REPORT.md โ โ MCP serves new data โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ
โก Both take < 5 seconds for code-only changes
โก No LLM tokens consumed
โก No internet needed
โก Completely automatic
4d. What about docs and images?
Code changes auto-update (AST parsing, free). Docs/images need LLM โ run manually when you update docs:
/graphify . --update
This only re-extracts new/changed files (cached results are reused):
$ /graphify . --update
Cache: 165 files hit, 2 files need extraction
Semantic extraction: ~2 files โ 1 agent, estimated ~45s
...done!
4e. Manual update (no commit needed)
Don't want to commit just to update the graph? Run these anytime:
code-review-graph update
code-review-graph build
For graphify, in Claude Code:
/graphify . --update
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ HOW THE GRAPH STAYS FRESH โ
โ โ
โ Option 1: Automatic (git commit) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ git commit โ hook runs โ both graphs update โ
โ You do nothing. It just works. โ
โ โ
โ Option 2: Manual (anytime) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ code-review-graph update โ run in terminal โ
โ /graphify . --update โ run in Claude Code โ
โ No commit needed. Run after any edit. โ
โ โ
โ Option 3: Full rebuild (switch branch, big changes) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ code-review-graph build โ rebuild from scratch โ
โ /graphify . โ full rebuild in Claude Code โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Summary: What's automatic vs manual
| Change Type | Auto-updates? | Cost |
|---|---|---|
New .kt / .java / .py file |
โ On commit | Free (AST) |
| Modified code file | โ On commit | Free (AST) |
New/changed .md / .txt doc |
โ Manual: /graphify . --update |
LLM tokens |
| New screenshot / image | โ Manual: /graphify . --update |
LLM tokens |
๐ Step 5 โ See the Token Savings #
After graphify builds, it prints a benchmark:
graphify token reduction benchmark
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Corpus: 271,756 words โ ~362,341 tokens (naive)
Graph: 1,479 nodes, 1,326 edges
Avg query cost: ~706 tokens
Reduction: 513.2x fewer tokens per query
Per question:
[787.7x] how does authentication work
[469.4x] what is the main entry point
[332.1x] how are errors handled
[827.3x] what connects the data layer to the api
[469.4x] what are the core abstractions
What does 500x mean in practice?
Without graph:
10 questions ร 362,341 tokens = 3,623,410 tokens
๐ฐ ~$10-15 in API costs
With graph:
10 questions ร 706 tokens = 7,060 tokens
๐ฐ ~$0.02 in API costs
That's like paying $0.02 instead of $10.
For the SAME answers.
Actually BETTER answers (structural context).
๐ฏ Real Usage Examples #
Example 1: "What does LlmRouter do?"
WITHOUT graph:
AI reads LlmRouter.kt (500 lines)
AI reads every file that imports it (20+ files)
AI reads docs mentioning it
Total: ~50,000 tokens, 30 seconds
WITH graph:
AI calls: get_node("LlmRouter")
AI calls: get_neighbors("LlmRouter")
Gets back: 47 connections, callers, callees, related docs
Total: ~700 tokens, 2 seconds
Example 2: "What breaks if I change OfflineModelManager?"
WITHOUT graph:
AI greps for "OfflineModelManager" in all files
AI reads each file to understand the dependency
AI guesses at impact
Total: ~30,000 tokens, maybe misses indirect deps
WITH graph:
AI calls: get_impact_radius("OfflineModelManager")
Gets back: direct deps, transitive deps, affected flows, test coverage
Total: ~500 tokens, complete picture
Example 3: "Review my last commit"
WITHOUT graph:
AI reads the diff
AI reads surrounding code for context
AI reads test files
Total: ~40,000 tokens
WITH graph:
AI calls: detect_changes()
Gets back: risk score, affected communities, missing test coverage
AI calls: get_review_context() for only the risky parts
Total: ~2,000 tokens, better review
๐๏ธ Project Structure After Setup #
your-project/
โโโ .mcp.json โ MCP server config (commit this!)
โโโ .gitignore โ Add: graphify-out/
โโโ .git/hooks/post-commit โ Auto-update hook
โโโ graphify-out/ โ โ ๏ธ GITIGNORED
โ โโโ graph.json โ The knowledge graph
โ โโโ graph.html โ Interactive visualization
โ โโโ GRAPH_REPORT.md โ Audit report (god nodes, surprises)
โ โโโ cost.json โ Token usage tracker
โโโ src/
โ โโโ ... your code ...
โโโ README.md
What to commit, what to gitignore
| File | Commit? | Why |
|---|---|---|
.mcp.json |
โ Yes | Team members get MCP servers too |
graphify-out/ |
โ No | Generated, can be rebuilt |
.git/hooks/ |
โ No | Local only (each dev runs graphify hook install) |
Add to your .gitignore:
graphify-out/
๐ Quick Start โ Set Up ANY Project in 2 Minutes #
Copy-paste these commands in your project root:
pip install graphifyy code-review-graph
code-review-graph build
cat > .mcp.json << 'EOF'
{
"mcpServers": {
"code-review-graph": {
"command": "code-review-graph",
"args": ["serve"],
"type": "stdio"
},
"graphify": {
"command": "python",
"args": ["-m", "graphify.serve", "graphify-out/graph.json"],
"type": "stdio"
}
}
}
EOF
graphify hook install
cat >> .git/hooks/post-commit << 'HOOK'
if command -v code-review-graph >/dev/null 2>&1; then
code-review-graph update 2>/dev/null || true
fi
HOOK
echo -e "\n# Knowledge graph outputs\ngraphify-out/" >> .gitignore
graphify claude install # Claude Code
graphify cursor install # Cursor
graphify gemini install # Gemini CLI / Android Studio Gemini
graphify antigravity install # Google Antigravity
graphify codex install # OpenAI Codex
graphify copilot install # GitHub Copilot CLI
graphify opencode install # OpenCode
graphify aider install # Aider
graphify droid install # Factory Droid
graphify claw install # OpenClaw
graphify trae install # Trae
graphify trae-cn install # Trae CN
8. Build the graphify knowledge graph
In Claude Code, just type:
/graphify .
This is a Claude Code skill (slash command). It reads all your code, docs, and images, then builds the full knowledge graph.
Not using Claude Code? You can still build the code graph (no LLM needed):
code-review-graph build
This gives you the AST-based graph with MCP. The full graphify graph (with docs/images/semantic connections) requires /graphify . in Claude Code or another AI editor with the graphify skill installed.
9. Start a new session
Close and reopen your AI editor. The MCP servers load on startup. Done!
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ โ
code-review-graph MCP โ code lookups โ
โ โ
graphify MCP โ full knowledge graphโ
โ โ
git hook โ auto-updates โ
โ โ
CLAUDE.md / .cursorrules โ AI knows to use it โ
โ โ
โ Your AI is now 500x smarter. For every project. โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Setting Up Your NEXT Project #
Already did the Quick Start once? For each new project, it's even faster:
cd /path/to/new/project
code-review-graph build
graphify hook install
graphify claude install # or: cursor, gemini, antigravity, codex, copilot, etc.
cat > .mcp.json << 'EOF'
{
"mcpServers": {
"code-review-graph": {
"command": "code-review-graph",
"args": ["serve"],
"type": "stdio"
},
"graphify": {
"command": "python",
"args": ["-m", "graphify.serve", "graphify-out/graph.json"],
"type": "stdio"
}
}
}
EOF
echo -e "\ngraphify-out/" >> .gitignore
cat >> .git/hooks/post-commit << 'HOOK'
if command -v code-review-graph >/dev/null 2>&1; then
code-review-graph update 2>/dev/null || true
fi
HOOK
That's it โ 30 seconds per project after the first time.
๐ Multi-Project Setup โ Query ALL Your Projects From ONE Session #
<div align="center">
</div>
๐ก The Problem: You graphified Project A and Project B separately. But when you open Claude Code in Project A, it only sees Project A's graph. How do you query both?
โ The Solution: Set MCP servers globally so they're available in EVERY session, from ANY folder.
๐ค Local vs Global โ What's the Difference?
LOCAL (.mcp.json in project folder) GLOBAL (~/.claude.json in home folder)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Project-A/ ๐ ~/.claude.json
โ โโโ .mcp.json โ
โ โโโ graphify-A โ
โโโ graphify-A โ
โ โโโ graphify-B โ
๐ Project-B/ โโโ graphify-C โ
โ โโโ .mcp.json
โ โโโ graphify-B โ
Open Claude Code ANYWHERE:
โ โ ALL graphs available โ
Open Claude Code in Project-A:
โ Only sees graphify-A โ
โ Can't query Project-B โ
๐ Step 1 โ Graphify Each Project First
cd /path/to/project-A
code-review-graph build
cd /path/to/project-B
code-review-graph build
๐ Step 2 โ Register All Projects in code-review-graph
code-review-graph register "/path/to/project-A" --alias projectA
code-review-graph register "/path/to/project-B" --alias projectB
code-review-graph register "/path/to/project-C" --alias projectC
code-review-graph repos
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ $ code-review-graph repos โ
โ โ
โ โ
projectA โ /path/to/project-A (1,411 nodes) โ
โ โ
projectB โ /path/to/project-B (892 nodes) โ
โ โ
projectC โ /path/to/project-C (2,100 nodes) โ
โ โ
โ ONE MCP server. ALL projects. ๐ฅ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฏ That's it for code-review-graph! The single
code-review-graph serveMCP server now queries ALL registered repos automatically.
๐ง Step 3 โ Set graphify MCP Globally
For graphify, add each project's graph server to your global ~/.claude.json:
Tell your AI assistant:
"Set up global MCP servers for all my graphified projects"
Or manually add to ~/.claude.json:
{
"mcpServers": {
"code-review-graph": {
"command": "code-review-graph",
"args": ["serve"],
"type": "stdio"
},
"graphify-projectA": {
"command": "python",
"args": ["-m", "graphify.serve", "/path/to/project-A/graphify-out/graph.json"]
},
"graphify-projectB": {
"command": "python",
"args": ["-m", "graphify.serve", "/path/to/project-B/graphify-out/graph.json"]
},
"graphify-projectC": {
"command": "python",
"args": ["-m", "graphify.serve", "/path/to/project-C/graphify-out/graph.json"]
}
}
}
โ ๏ธ Important: Each graphify server needs a unique name (
graphify-projectA,graphify-projectB, etc.)
โ Result โ Everything Connected
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ ๐ OPEN CLAUDE CODE FROM ANY FOLDER โ
โ โ
โ โโโโโโโโโโโโโโโโโโโ โ
โ โ Claude Code โ โ
โ โ (any folder) โ โ
โ โโโโโโโโโโฌโโโโโโโโโ โ
โ โ โ
โ Global MCP Servers Load Automatically โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โผ โผ โผ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ ๐ฑ Project A โ โ ๐ Project B โ โ ๐ฎ Project C โ โ
โ โ โ โ โ โ โ โ
โ โ graphify-A โ โ graphify-B โ โ graphify-C โ โ
โ โ code-review โ โ code-review โ โ code-review โ โ
โ โ โ โ โ โ โ โ
โ โ 1,411 nodes โ โ 892 nodes โ โ 2,100 nodes โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ
โ ๐ "How does auth work in Project A?" โ queries graphify-A โ
โ ๐ "Compare Project B's DB to C's" โ queries both B and C โ
โ ๐ "Impact of changing this class?" โ queries code-review โ
โ โ
โ ALL PROJECTS. ANY SESSION. ZERO SETUP PER SESSION. โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Quick Reference
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Tool โ Multi-Project How? โ Where to Configure โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ โ โ
โ code-review-graph โ Built-in! โ code-review-graph โ
โ โ register command โ register <path> โ
โ โ 1 server = N repos โ โ
โ โ โ โ
โ graphify โ 1 server per โ ~/.claude.json โ
โ โ project โ (global mcpServers) โ
โ โ unique name each โ โ
โ โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ก Pro tip: After graphifying a new project, just add one more
graphify-newprojectentry to~/.claude.jsonand restart Claude Code. That's it โ the new project is connected to all your sessions.
โ FAQ #
Q: Does this work with Cursor / Windsurf / other AI editors?
Yes! graphify supports 12 AI editors/agents out of the box:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ EDITOR / AGENT INSTALL COMMAND WHAT IT WRITES โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โ
โ โ
โ Claude Code graphify claude install CLAUDE.md โ
โ Cursor graphify cursor install .cursorrules โ
โ Gemini CLI / Android Studio graphify gemini install GEMINI.md โ
โ Google Antigravity graphify antigravity install .agent/ โ
โ OpenAI Codex graphify codex install AGENTS.md โ
โ GitHub Copilot CLI graphify copilot install ~/.copilot/ โ
โ OpenCode graphify opencode install AGENTS.md โ
โ Aider graphify aider install AGENTS.md โ
โ Factory Droid graphify droid install AGENTS.md โ
โ OpenClaw graphify claw install AGENTS.md โ
โ Trae graphify trae install AGENTS.md โ
โ Trae CN graphify trae-cn install AGENTS.md โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
MCP is a standard protocol. The .mcp.json config works with any editor that supports MCP.
Android Studio users: If you use Gemini in Android Studio, run
graphify gemini install. The MCP config (.mcp.json) is project-level so thecode-review-graphserver is available too.
Q: What languages are supported?
code-review-graph: Kotlin, Java, Python, TypeScript, JavaScript, Go, Rust, C/C++, Ruby, Swift, Scala, PHP, Lua โ anything with AST parsing.
graphify: ALL files. Code via AST, docs/images via LLM semantic extraction.
Q: Does this cost money?
- code-review-graph: 100% free. Pure AST parsing, no LLM.
- graphify AST extraction: Free. No LLM needed for code files.
- graphify semantic extraction: Uses your AI tokens for docs/images only. One-time cost, then cached.
- Auto-updates on commit: Free (AST only for code changes).
Q: My graph is out of date after switching branches
code-review-graph build # rebuild from scratch (instant)
Q: Can I query the graph without Claude Code?
Yes! graphify has a built-in CLI:
graphify query "how does authentication work?"
graphify query "how does authentication work?" --dfs # depth-first trace
graphify query "how does authentication work?" --budget 1500 # limit tokens
And in Claude Code, you can use slash commands:
/graphify query "how does authentication work?"
/graphify path "AuthModule" "Database"
/graphify explain "LlmRouter"
Q: How big can the graph get?
Tested with 1,500+ nodes and 2,800+ edges without issues. The HTML visualization handles up to 5,000 nodes. Beyond that, use Obsidian vault (/graphify . --obsidian).
๐ง Troubleshooting #
| Problem | Fix |
|---|---|
graphify: command not found |
pip install graphifyy (two y's!) |
code-review-graph: command not found |
pip install code-review-graph |
| MCP tools not showing in Claude Code | Restart session (MCP loads at startup) |
| Graph out of date | Run code-review-graph build + in Claude Code: /graphify . --update |
UnicodeEncodeError on Windows |
Set PYTHONUTF8=1 environment variable |
| HTML viz won't open | Try: python -m http.server 8080 in graphify-out/, open localhost:8080/graph.html |
| Hook not running on commit | Check: ls -la .git/hooks/post-commit (must be executable) |
Graph was built on different branch |
Run code-review-graph build to rebuild |
๐ Bonus: The Full Picture #
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ YOUR DEVELOPMENT WORKFLOW โ
โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ Write โโโโโโบโ Commit โโโโโโบโ Hook โ โ
โ โ Code โ โ (git) โ โ Runs โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโฌโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโผโโโโโโโโโโโโโโ โ
โ โผ โผ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ graphify โ โ code-review- โ โ
โ โ updates โ โ graph updates โ โ
โ โ graph.json โ โ internal graph โ โ
โ โโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โ
โ โ โ โ
โ โผ โผ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ graphify โ โ code-review- โ โ
โ โ MCP server โ โ graph MCP โ โ
โ โ (full graph) โ โ server (fast) โ โ
โ โโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โ
โ โ โ โ
โ โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโ โ
โ โ Claude Code โ โ
โ โ / Cursor / โ โ
โ โ Any AI Editor โ โ
โ โโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโ โ
โ โ 500x FASTER โ โ
โ โ 500x CHEAPER โ โ
โ โ BETTER ANSWERSโ โ
โ โโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
<div align="center">
Made with ๐ง by Ashok Varma Matta
If this saved you time, star the gist and share it with your team!
</div>