Code Brain is available via MCP. Use it as your first-pass orientation tool on any task that involves unfamiliar code, cross-file flows, or impact analysis.
- Start of session — call
codebrain_god_nodesbefore reading any files. It returns the top 10 most-connected abstractions and tells you the architecture at a glance. One call, no token cost from reading files. - Cross-file or cross-package tasks — use
codebrain_contextorcodebrain_context_dfsto locate relevant files and their relationships in 1–2 calls instead of iterating through grep results. - Before modifying shared utilities — always call
codebrain_blast_radiusbefore changing a file that other code imports. It shows exactly which routes, models, and callers will be affected. - Cold start / unknown codebase — use
codebrain_contextto answer "where does X happen?" without knowing filenames or package structure first.
- You know the exact symbol name or filename you're looking for.
- The task is contained within a single, obviously-named module.
- You need a filesystem audit (dead code, duplicate files, naming issues).
codebrain_god_nodesorcodebrain_context— orient and identify candidate files (1–2 calls)Read— verify the specific files Code Brain identifiedGrep/Glob— catch edge cases or filesystem-level detailscodebrain_blast_radius— before touching any shared or core file
The graph is built once per session. Call codebrain_scan explicitly after
significant structural changes (renaming files, extracting modules, adding
packages) so the graph reflects the current state.