A Code Knowledge Graph Cut Claude Code’s Token Use 25%. Here’s How to Build One A builder at FalkorDB's Graph Hacks hackathon (October 15–18, 2026, $20K in prizes, 7,899 developers and 1,213 projects) connected Claude Code to a FalkorDB code knowledge graph of a real repository and cut input token use by 25% and tool calls by 29% across 72 runs. A second builder used the same graph approach to select about 36 of click's 2,209 tests per change, catching 30 of 31 planted bugs. The tutorial walks through loading a Python repo into a free FalkorDB Cloud instance in about 80 lines of Python, ranking load-bearing functions with algo.pageRank, and connecting Claude Code through the FalkorDB MCP server in strict read-only mode. Coding agents spend a lot of their time searching: grepping for callers, opening files to find the right tests, rereading code they already saw. At Graph Hacks, FalkorDB's online hackathon October 15 to 18, 2026, $20K in prizes , which drew 7,899 developers and 1,213 projects, one builder gave Claude Code a FalkorDB map of a real repo. Across 72 runs it used 25% fewer input tokens and 29% fewer tool calls. Another builder used the same kind of graph to pick about 36 of click's 2,209 tests per change and still caught 30 of 31 planted bugs. Here's how to build a code knowledge graph on a free FalkorDB Cloud instance and connect it to Claude Code, in six steps. Key takeaways. A code knowledge graph lets an agent ask what a change touches before it edits. In six steps you load a real Python repo into FalkorDB with about 80 lines of Python, ask three read-only questions, rank load-bearing functions with algo.pageRank , and connect Claude Code through the FalkorDB MCP server in strict read-only mode. Every snippet was run against FalkorDB, and the output shown is real. Follow along for free. Every step runs on a free FalkorDB Cloud instance, with no credit card. Start free on FalkorDB Cloud https://app.falkordb.cloud/signup?cta=cta-top and keep the tab open for step 1. What is a code knowledge graph? A code knowledge graph stores a repository's files, functions and tests as nodes, and calls, test coverage and co-changes as edges, so an agent can ask what a change touches. Claude Code is great at reading and editing files, but files don't show the structure between them. In 83 of Graph Hacks builder Manoj Shetty's own Claude Code sessions, 31% of 32,713 tool calls were spent searching or navigating. A graph answers those questions with one query each. | Question before an edit | Text search | Code graph on FalkorDB | |---|---|---| | What calls this function? | Grep, then read every hit | One CALLS 1..3 query | | Which tests reach it? | Guess from file names | Walk back from the function | | What changes with this file? | Read git log by hand | CO CHANGED edges | | Which code is load-bearing? | No direct answer | algo.pageRank | What you'll need. Python 3, git, Node.js for npx , Claude Code, and a free FalkorDB Cloud account. The six steps. 1. Create a free Cloud instance step-1 · 2. Pick a repo step-2 · 3. Load the graph step-3 · 4. Ask questions step-4 · 5. Rank with PageRank step-5 · 6. Connect Claude Code step-6 Step 1. Create a free FalkorDB Cloud instance Create your free FalkorDB Cloud instance https://app.falkordb.cloud/signup?cta=tutorial-step1 No credit card needed. In the console, open Deployments, then Instances, and select Create. Pick the FalkorDB Free plan, a provider and a region, and set a password. When the instance shows Running, copy the host and port from its Connectivity tab. The port is often not 6379, and the username is falkordb . A Free instance stops after 1 day without use and is deleted after 7 days, so re-run load.py if your graph is gone. export FALKORDB HOST="