MCP tools wired in: codegraph_context · codegraph_node · codegraph_trace
Turn time: 60.0s 14.8s −75%
codegraph · before/after

One codegraph_* tool call replaces a grep-and-read storm.

Three real questions a coding agent gets all the time on a mid-size repo — find the entry points, find the callers, estimate the blast radius — run twice against expressjs/express. Once as a naïve agent (Glob → Read → Grep). Once with @colbymchenry/codegraph indexed and wired into Claude Code over MCP. Tool calls, context tokens and turn time all collapse.

Baseline repo: expressjs/express @ dae209ae6559 (master, 2026-05-17) Indexed: 141 JS files · 990 nodes · 810 edges · 1.14 MB SQLite Tool: @colbymchenry/codegraph v0.9.7 (MIT) Mode: 100% local · zero API key
Tool calls (sum of 3 tasks)
Before15
After3
−80%  ·  12 calls saved
Context tokens fed to the model
Before29,812
After414
−98.6%  ·  29,398 tokens saved
Wall-clock turn time
Before60.0s
After14.8s
−75%  ·  45.2s saved

MCP tools wired in 3 demonstrated below; same server also exposes codegraph_search + codegraph_explore

codegraph_context Entry-point symbols + related symbols + (optional) code, for a task description. Replaces Glob + multiple Read to survey. Demonstrated in T1 · T3
codegraph_node One symbol's location, signature, callers / callees trail; optional verbatim body. Replaces Grep "name(" + Read. Demonstrated in T2
codegraph_trace The call path between two symbols, with each hop inlined. Replaces manually walking callers / callees by hand. Trace-a-flow use case (see SKILL §4)

The three tasks tool-call traces are expanded by default

T1 Find the HTTP-handling entry points— “where does an incoming request actually get processed?” 61 calls 13,313176 tok 24.0s4.9s

BEFORE naïve agent (no codegraph)

  1. 1Glob lib/**/*.jslist every file in lib/ to pick what to read
  2. 2Read lib/express.jsthe package entry — looking for the request path
  3. 3Read lib/application.jswhere handle() actually dispatches
  4. 4Read lib/request.jsto confirm the IncomingMessage augmentation
  5. 5Read lib/response.jsto confirm the ServerResponse augmentation
  6. 6Grep handle( in lib/to nail down the dispatcher signature
bytes ingested: 53,25213,313 tokens

AFTER with codegraph MCP

  1. 1codegraph_context "…HTTP entry points…"returns the entry-point symbols + the right lib/application.js:152 snippet
bytes ingested: 704176 tokens
T2 List the callers of Response#send— “who actually calls this thing inside express?” 41 calls 6,615109 tok 16.0s4.9s

BEFORE naïve agent (no codegraph)

  1. 1Grep \.send( in lib/noisy: 100+ hits, most of them send() the module, send() the option, etc.
  2. 2Read lib/response.jswhole file (~970 lines) to filter the false positives by eye
  3. 3Grep this.send( in lib/narrow to in-class callers
  4. 4Grep res.send( in lib/re-narrow to method-style callers
bytes ingested: 26,4586,615 tokens

AFTER with codegraph MCP

  1. 1codegraph_node sendone call returns the caller trail — exactly 5 callers: json · jsonp · sendStatus · sendFile · render (plus its callees and the disambiguation note for the homonym at response.js:31)
bytes ingested: 435109 tokens
T3 Estimate the blast radius of changing Response#send— “if I touch this signature, what breaks?” 51 calls 9,884129 tok 20.0s4.9s

BEFORE naïve agent (no codegraph)

  1. 1Glob lib/**survey lib/ before fanning out
  2. 2Read lib/response.jsto map the method itself + its in-file dependents
  3. 3Grep \.send( in lib/candidate dependents
  4. 4Grep send\. in lib/disambiguate from the send npm module
  5. 5Read test/res.send.jssanity-check that the test names match the dependents
bytes ingested: 39,5349,884 tokens

AFTER with codegraph MCP

  1. 1codegraph_context "…if I change Response.send signature, what breaks?"one call returns the affected surface — entry symbol send + related downstream symbols (json · jsonp · sendStatus · status · set) grouped by file, with the "small project, no follow-up explore needed" hint
bytes ingested: 517129 tokens

The pattern is obvious: the harder the question is to phrase as a substring (“who calls this?”, “what does this touch?”), the more grep-and-read the naïve agent burns through — and the bigger codegraph’s win. Entry-point and impact-analysis questions collapse from 5–6 tool calls to one; the context the model has to chew on shrinks from tens of thousands of tokens to a few hundred.

Translation: faster turns, cheaper turns, and the model spends its attention on the answer, not on filtering grep noise.

Take the course →