Repository navigation
Any MCP client
codegraph-index init --client <names>writes the server's config for other assistants.copilotcovers every
GitHub Copilot that reads a project's servers: the CLI (.mcp.json), VS Code (.vscode/mcp.json), Visual
Studio (.vs/mcp.jsonbeside the solution) and JetBrains IDEs (.github/mcp.json); each also has its own name.
The others:cursor(.cursor/mcp.json),gemini(.gemini/settings.json),codex(its global config,
throughcodex mcp add, keeping hand-added env), and the AI extensionsroo(.roo/mcp.json),kilo
(.kilo/kilo.json, in opencode 1.x's shape) andcontinue(.continue/mcpServers/codegraph.json).
claude(.mcp.json) stays the default;allwrites every one. Other servers and settings in those files are
kept; a re-run with nothing new changes nothing.install.sh --clientandinstall.ps1 -Clientpass it on.codegraph-mcp --root DIR(orCODEGRAPH_ROOT) finds the graph fromDIRinstead of the working directory,
for IDEs that do not start servers in the project. VS Code and Cursor get--root ${workspaceFolder}; Visual
Studio and JetBrains, which neither start servers in the project nor expand variables, get the absolute
worktree root. A placeholder left unexpanded, as the Cursor CLI does, is ignored.- Checked with real tool calls from the Cursor IDE 3.29 (
${workspaceFolder}expanded), Copilot in VS Code 1.146 (agent mode,${workspaceFolder}expanded), the Codex
VS Code extension 26.1111 (it starts servers in the workspace, so the global entry needs no root), the Codex CLI
and the GitHub Copilot CLI, and the Cursor CLI (headless runs needMcp(codegraph:*)allowed in
.cursor/cli.json; the docs say how). Where each client starts its servers and which variables it expands was
read from the Roo Code, Kilo Code and Continue sources, and the Visual Studio and Copilot for JetBrains docs and
issue tracker. - Tests guard what their framework runs around them. In C#, a test now calls its class's constructors (instance
and static),Dispose/DisposeAsync,IAsyncLifetime.InitializeAsync, and methods marked[SetUp],
[TearDown],[OneTimeSetUp],[OneTimeTearDown](NUnit),[TestInitialize],[TestCleanup],
[ClassInitialize],[ClassCleanup](MSTest), on the class and its base classes. A run-time check found the
gap: on release 1.1.0, 44 tests executeGraphStore.Replaceandimpact_ofnamed 37 (all real); 5 of the
missing ones reach it only throughIndexFreshnessTests' constructor. With this change it names 42 of the 44.
The other 2 run the indexer as a child process, which a static graph cannot see. - A damaged graph file no longer crashes the indexer. An incremental run that cannot read the old graph rebuilds
it from source;--full(which read the old file to keep other languages' rows) skips what it cannot read. Both
say so. Before, both aborted, and the only cure was deleting the file. - A tool call that fails says why. A missing or mistyped argument gets the problem and the tool's parameters
("impact_of takes: id (string, required), depth (integer, default 5)"); a damaged graph file gets the command
that rebuilds it. Before, every one was "An error occurred invoking 'x'". - BENCHMARKS.md round 13: a full index of this repo took 16.7–17.6 s against round 12's 16.2–16.3 s, which the
round puts down to the graph's growth; Jellyfin's took 44.9–45.0 s by the indexer's own figure (round 12's 44.3–45.3 s did not record which figure); parity clean; and a resilience battery
(tools/CodeGraph.Bench/resilience.py, 12 of 12 after the two fixes above). It found the graph file creeping
under the live daemon, about 3 MB over the last 50 of 100 saves; fixed below. A later Linux run of the battery
(round 15) passed 11 of 12: R4 had 8 errors, and their cause is open. The Windows re-test passed 12 of 12, and so
did the first macOS run (round 16). R4 run on its own 26 more times, on Linux, Windows and macOS, idle and under CPU
load, had no error (round 16). - An incremental pass writes only the rows that changed. Before, it deleted and re-inserted every row of each
re-walked file and project file, and all the stamps and meta. DuckDB rewrites every row group and index those
touch, so under--watchthe file grew with each pass and kept creeping. Over 150 saves on this repo: 1.1.0
went from 32.3 to 51.0 MB, still rising; this build stays at 30–38 MB, with no trend. A no-op pass on Jellyfin
now adds 2 MB instead of 47. After the passes, the graph equals a fresh full index in every table, on both
repos. BENCHMARKS.md round 14 has the figures;tools/CodeGraph.Bench/file-growth.shrepeats them. - Windows 11, checked by a Claude Code session there (BENCHMARKS.md round 15): 425 tests passed, 3 skipped; graph
swaps under a reading server, a from-source install and the uninstall in PowerShell 7 and 5.1, and the live
daemon all worked.
It found four things, now fixed:- With only a newer SDK installed (.NET 11), the indexer died with an unhandled MSBuildLocator exception. It now
says to install the .NET 10 SDK, or to setDOTNET_ROLL_FORWARD=LatestMajorfor a build from source. - A project whose NuGet packages were never restored, such as a fresh clone, indexed incompletely with no clear
warning when the framework still resolved. It now gets a note saying to rundotnet restore. A pass that
walks no file keeps the last walk's compile errors and notes instead of writing zeros over them. resilience.pyruns on Windows (noSIGKILLthere), and reads the node count after a stale-index warning.uninstall.ps1under Windows PowerShell 5.1 keeps the 2-space layoutinitwrites, rather than rewriting
every line in 5.1's own layout.
A second run there, atd3350b3, confirmed the restore note, the kept compile errors, the 5.1 layout and the
battery (12 of 12 with no shim). It found two more:- The live TypeScript test failed on Windows: it read the daemon's log while the daemon held it open for
writing. It now opens the log sharing read and write. The next Windows CI run got past the log and failed on
the references: each had no enclosing member. The language server sendsfile:///d%3A/…(drive letter
lower-case, colon encoded), which .NET read asD:\d:\…, and the graph's paths areD:\…. On Windows the
live tools now drop the slash before the drive, upper-case it, and compare paths without case. The same
mismatch hid every diagnostic fromcheck_changeanddiagnosticson Windows and made the language server's
start-up wait run out (66.6 s); diagnostics are now stored under the same URI form they are looked up by.
The live TypeScript test then passed in Windows CI (run 43702208790).
A third run there, ataf1eab5, passed the suite (440, 1 skipped) and the battery (12 of 12), and found two more: install.ps1read an unknown option, such as the retired-ObsidianVault, as a repo, and installed into the
default folder. It now stops with "unknown option" before it downloads or writes anything.- The daemon's
--logfile held its progress spinner (322 of 513 lines).--lognow turns the spinner off.
A fourth run there, atef202fe, confirmed both: unknown options stop the install in pwsh 7 and 5.1, and the
daemon's log had no spinner frame in 47 lines. uninstall.ps1anduninstall.shname each file and folder they remove, not just "entry removed".
- With only a newer SDK installed (.NET 11), the indexer died with an unhandled MSBuildLocator exception. It now
- The server accepts the id under the names models guess for it (
symbolId,nodeId,memberId, and their
snake-case forms, oridfor the tools that takesymbol). A Cursor agent passedsymbolIdto every tool, got
only "An error occurred invoking", and answered without the graph. - tools/eval: four assistants (Claude Code, Codex CLI, Copilot CLI, Cursor CLI), three runs
each with and without CodeGraph, on a copy of this repo without its docs, scored against a run-time answer key.
With CodeGraph 7 of 12 answers gave a test total (each 42, the graph's count; 44 tests execute the method);
without it none did. Claude Code was faster and cheaper with it; Codex and the Copilot CLI were not, and
Cursor's runs varied too much to call. Summary in
Why it saves tokens. - The server accepts an id with the brackets its answers print around ids (
[M:App.Run]): a Cursor agent
copied them and got "no node with id". The server's instructions now say to drop them. find_symbolwithnameMatch: Exactalso takes a qualified tail of the full name without its parameter list:
GraphStore.ReplacefindsCodeGraph.Core.GraphStore.Replace(bool, …). A Cursor agent tried exactly that,
found nothing, and fell back to two broader searches. The in-memory and SQL paths agree (parity tests).- The uninstall scripts remove the entry from every config
initcan write, and from Codex. - The README and docs say "your AI coding assistant" rather than Claude Code alone; the usage page lists each
assistant's instructions file. Tested with lists the assistants that
answered with real tool calls, and docs/client-tests has the configuration, tool
calls and answer of each run. - The promo video (118.6 s) says "your AI coding assistant", and a new card lists the assistants it was tested with.
The on/off sessions are still Claude Code. Its token figures are now the two measured sessions (180,134 against
459,907 input tokens), not the README's example week or the size of the matching files. - Why it saves tokens adds the measured sessions: 42 s against
87 s, 4 model calls against 9, and a context that grew by about the same amount. The README no longer says "one
tool call instead of twenty file reads".
Obsidian, retired for now
- The Obsidian plugin and export are retired for now. Releases no longer include
codegraph-obsidian.zip,
install.shandinstall.ps1no longer take--obsidian-vault/-ObsidianVault, CI no longer runs the
plugin's tests, the CLI help no longer listsexport obsidian, and no product page links to it. The code stays in
the repo:codegraph-index export obsidianstill runs, its .NET tests still run with the suite, the corpus still
checks the export, and its pages are kept, marked retired.
Build from a path through a symlink
- A checkout reached through a symlink builds once. The OS reports the working directory of a process with symlinks
resolved, and on macOS/tmpis a symlink to/private/tmp. MSBuild tasks resolve a relative item against that
directory, sodotnet build /tmp/.../CodeGraph.slnxrestored and builtCodeGraph.CoreandCodeGraph.Indexer
twice, once per spelling, andinstall.sh --from-sourcefailed at random (CS0006, CS0103). The same build put
the test fixtures in the output root instead ofFixtures/and embedded the web UI asCodeGraph.Mcp.index.html
instead ofCodeGraph.Mcp.wwwroot.index.html. Found by the first macOS run (BENCHMARKS round 16), and shown on
Linux too: through a symlink, the suite ata3150ecran 421 of 441 tests and 331 failed; with the fix, 439 passed
and 2 skipped. A second Mac run at1a9ee1cinstalled from source through/tmp3 times in 3.
Directory.Build.targetsnow makes each project reference, embedded resource and
copied None or Content item absolute, with the spelling of the solution;install.shand
tools/release/package.shresolve their root withpwd -P; andtests/install-through-symlink.shruns restore,
a Release build and the install through a symlink, in the macOS and Linux CI jobs.
Install
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/nerdcules/CodeGraph/main/codegraph/install.sh | bash -s -- ~/dev/YourApp --add-to-pathWindows (PowerShell):
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/nerdcules/CodeGraph/main/codegraph/install.ps1))) C:\dev\YourApp -AddToPathOr download the archive for your platform below, unpack it anywhere, and run codegraph-index init in a repository.
SHA256SUMS holds the checksum of each file. The executables are not code-signed; on macOS, run
xattr -dr com.apple.quarantine <folder> on a folder unpacked from a browser download.