You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0e91b3d
Browse filesBrowse the repository at this point in the historyBrowse files
**The fastest and most efficient code intelligence engine for AI coding agents.** Full-indexes an average repository in milliseconds, the Linux kernel (28M LOC, 75K files) in 3 minutes. Answers structural queries in under 1ms. Ships as a native executable with a small verified runtime-asset set for macOS, Linux, and Windows — download, run `install`, done.
18
18
19
-
High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-sitter/) AST analysis across all 158 languages, enhanced with [**Hybrid LSP** semantic type resolution](#hybrid-lsp) for Python, TypeScript / JavaScript / JSX / TSX, PHP, C#, Go, C, C++, Java, Kotlin, Rust, and Perl — producing a persistent knowledge graph of functions, classes, call chains, HTTP routes, and cross-service links. 15 MCP tools. No language runtime, hosted service, or API key. Plug and play across 43 supported automatic/conditional client surfaces.
19
+
High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-sitter/) AST analysis across all 161 languages, enhanced with [**Hybrid LSP** semantic type resolution](#hybrid-lsp) for Python, TypeScript / JavaScript / JSX / TSX, PHP, C#, Go, C, C++, Java, Kotlin, Rust, and Perl — producing a persistent knowledge graph of functions, classes, call chains, HTTP routes, and cross-service links. 15 MCP tools. No language runtime, hosted service, or API key. Plug and play across 45 supported automatic/conditional client surfaces.
20
20
21
21
> **Research** — The design and benchmarks behind this project are described in the preprint [*Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCP*](https://arxiv.org/abs/2603.27277) (arXiv:2603.27277). Evaluated across 31 real-world repositories: 83% answer quality, 10× fewer tokens, 2.1× fewer tool calls vs. file-by-file exploration.
22
22
@@ -32,9 +32,9 @@ High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-si
32
32
33
33
-**Extreme indexing speed** — Linux kernel (28M LOC, 75K files) in 3 minutes. RAM-first pipeline: LZ4 compression, in-memory SQLite, fused Aho-Corasick pattern matching. Memory released after indexing.
34
34
-**Plug and play** — native executable plus authenticated release-owned assets for macOS (arm64/amd64), Linux (arm64/amd64), and Windows (amd64). The native install needs no Docker, language runtime, or API keys. Download → `install` → restart agent → done.
35
-
-**158 languages** — vendored tree-sitter grammars compiled into the binary. Nothing to install, nothing that breaks.
35
+
-**161 languages** — vendored tree-sitter grammars compiled into the binary. Nothing to install, nothing that breaks.
36
36
-**120x fewer tokens** — 5 structural queries: ~3,400 tokens vs ~412,000 via file-by-file search. One graph query replaces dozens of grep/read cycles.
37
-
-**43 supported automatic/conditional client surfaces** — `install` configures detected clients and safely activates conditional clients only when their documented platform, marker, or explicit existing config path is present. See [Multi-Agent Support](#multi-agent-support) for the complete matrix and manual/UI-only boundaries.
37
+
-**45 supported automatic/conditional client surfaces** — `install` configures detected clients and safely activates conditional clients only when their documented platform, marker, or explicit existing config path is present. See [Multi-Agent Support](#multi-agent-support) for the complete matrix and manual/UI-only boundaries.
38
38
-**Built-in graph visualization** — 3D interactive UI at `localhost:9749`, served from the binary itself.
39
39
-**Infrastructure-as-code indexing** — Dockerfiles, Kubernetes manifests, and Kustomize overlays indexed as graph nodes with cross-references. `Resource` nodes for K8s kinds, `Module` nodes for Kustomize overlays with `IMPORTS` edges to referenced resources.
40
40
-**15 MCP tools** — search, trace, architecture, impact analysis, targeted index-coverage checks, Cypher queries, dead code detection, cross-service HTTP linking, ADR management, and more.
@@ -153,6 +153,8 @@ When enabled, new projects are indexed automatically on first connection. Previo
153
153
154
154
Watcher registration is controlled separately by `auto_watch` (default `true`). Set `config set auto_watch false` to keep a session from registering its project with the background watcher — useful when working across many projects and you want each session contained to explicit indexing.
155
155
156
+
To turn the watcher off entirely, set `config set watcher_enabled false` (default `true`): the background poll thread never starts and no project is registered, while `auto_index` and manual `index_repository` keep working. Unlike `auto_watch` — which is consulted per session — `watcher_enabled` is read once when the background daemon starts, so run `codebase-memory-mcp daemon stop` after changing it; reconnecting your MCP client alone will not restart the daemon. See [docs/CONFIGURATION.md](docs/CONFIGURATION.md#2-cli-managed-runtime-settings).
157
+
156
158
### Keeping Up to Date
157
159
158
160
**Updates run from the install script on every platform, not from inside the running binary.**`codebase-memory-mcp update` validates your flags and then prints the exact command to run:
The `codebase-memory-mcp-bin` package is available at: https://aur.archlinux.org/packages/codebase-memory-mcp-bin
355
357
358
+
### Nix (flake)
359
+
360
+
The flake exposes two server packages plus the standalone frontend:
361
+
362
+
| Package | Contents |
363
+
|---------|----------|
364
+
|`default` (`codebase-memory-mcp`) | Standard server, no UI |
365
+
|`codebase-memory-mcp-ui`| Server with the graph UI embedded (`--ui=true` works) |
366
+
|`graph-ui`| Just the built frontend assets (`dist/`) |
367
+
368
+
Run directly without installing:
369
+
370
+
```bash
371
+
# Standard server
372
+
nix run github:DeusData/codebase-memory-mcp
373
+
374
+
# Server with the embedded graph UI
375
+
nix run github:DeusData/codebase-memory-mcp#codebase-memory-mcp-ui -- --ui=true --port=9749
376
+
# then open http://127.0.0.1:9749
377
+
```
378
+
379
+
Or build a binary into `./result/bin/codebase-memory-mcp`:
380
+
381
+
```bash
382
+
nix build github:DeusData/codebase-memory-mcp # standard
383
+
nix build github:DeusData/codebase-memory-mcp#codebase-memory-mcp-ui # with UI
384
+
```
385
+
386
+
Working in a clone? Use `.` in place of the flake URL, e.g. `nix run .#codebase-memory-mcp-ui -- --ui=true`, or drop into a shell that puts the binary on `PATH` with `nix shell .#codebase-memory-mcp-ui`.
387
+
388
+
> **Note:** launched by hand (not from an MCP client) the server exits as soon as `stdin` closes — that's normal MCP behaviour. Keep `stdin` open while testing the UI, e.g. `sleep infinity | codebase-memory-mcp --ui=true --port=9749`. The `codebase-memory-mcp-ui` package embeds the UI at build time; `nix run`'ing the standard `default` package with `--ui=true` will refuse to start the HTTP server.
389
+
356
390
### Install via Claude Code
357
391
358
392
```
@@ -425,7 +459,7 @@ Restart your agent. Verify with `/mcp` — you should see `codebase-memory-mcp`
425
459
426
460
## Multi-Agent Support
427
461
428
-
`install` configures 43 client surfaces: 37 detected automatically and 6
462
+
`install` configures 45 client surfaces: 39 detected automatically and 6
429
463
conditional or explicit. “Conditional” means the installer writes only when the
430
464
documented platform or an explicit, already-existing config path proves the
431
465
target is active. It never flips experimental feature flags, enables plugins,
| Mistral Vibe | Detected |`$VIBE_HOME/config.toml`|`AGENTS.md`, skill, and three matched agent/prompt pairs with explicit read-only graph-tool allowlists |
510
+
| Grok Build | Detected |`$GROK_HOME/config.toml`| Owned `rules/codebase-memory.md`, skill, three graph agents with named-server `mcpInheritance` and exact `server__tool` dispatcher ids; context hooks withheld because its passive hook events discard stdout |
476
511
| Qoder CLI | Detected |`~/.qoder/settings.json`| Skill, three directly MCP-attached agents with named-server scoping and exact per-tier graph-tool lists; `SessionStart`, `SubagentStart`, and post-`Read` coverage, including documented PowerShell execution on Windows |
477
512
| Kimi Code CLI | Detected |`$KIMI_CODE_HOME/mcp.json` (default `~/.kimi-code`) | Same-root `AGENTS.md` + skill; fail-open `UserPromptSubmit` hook in `config.toml`|
478
513
| GitLab Duo CLI | Detected |`$GLAB_CONFIG_DIR/duo/mcp.json` or platform fallback | Fail-open user `SessionStart` on macOS/Linux; hook withheld on Windows; no experimental global skill enablement |
codebase-memory-mcp config set watcher_enabled false# stop the watcher thread entirely (default: true)
670
712
codebase-memory-mcp config reset auto_index # reset to default
671
713
```
672
714
@@ -754,14 +796,14 @@ codebase-memory-mcp ships a **lightweight C implementation of language type-reso
754
796
755
797
**Two-layer architecture:**
756
798
757
-
1.**Tree-sitter pass** — fast, syntactic, runs for every one of the 158 languages. Extracts definitions, calls, imports.
799
+
1.**Tree-sitter pass** — fast, syntactic, runs for every one of the 161 languages. Extracts definitions, calls, imports.
758
800
2.**Hybrid LSP pass** — type-aware, runs above the tree-sitter pass per-language. Refines call edges using the import graph plus a per-file or pre-built cross-file definition registry. Languages without a Hybrid LSP pass yet fall back to textual resolution, so you always get *some* answer.
759
801
760
802
The result is a knowledge graph accurate enough to drive `trace_path` across packages, inheritance hierarchies, and stdlib calls — without paying for a language server process per project.
761
803
762
804
## Language Support
763
805
764
-
158 languages, all parsed via vendored tree-sitter grammars compiled into the binary. Benchmarked against 64 real open-source repositories (78 to 49K nodes):
806
+
161 languages, all parsed via vendored tree-sitter grammars compiled into the binary. Benchmarked against 64 real open-source repositories (78 to 49K nodes):
765
807
766
808
| Tier | Score | Languages |
767
809
|------|-------|-----------|
@@ -778,7 +820,7 @@ src/
778
820
main.c Entry point (MCP stdio server + CLI + install/update/config)
0 commit comments