|
| 1 | +# codebase-memory-mcp |
| 2 | + |
| 3 | +[](https://www.npmjs.com/package/codebase-memory-mcp) |
| 4 | +[](https://github.com/DeusData/codebase-memory-mcp/releases/latest) |
| 5 | +[](https://github.com/DeusData/codebase-memory-mcp/blob/main/LICENSE) |
| 6 | +[](https://github.com/DeusData/codebase-memory-mcp/releases/latest) |
| 7 | + |
| 8 | +**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 single static binary — this package downloads and runs it automatically. |
| 9 | + |
| 10 | +High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-sitter/) AST analysis across 66 languages — producing a persistent knowledge graph of functions, classes, call chains, HTTP routes, and cross-service links. 14 MCP tools. Zero dependencies. Plug and play across 10 coding agents. |
| 11 | + |
| 12 | +## Installation |
| 13 | + |
| 14 | +```bash |
| 15 | +npm install -g codebase-memory-mcp |
| 16 | +``` |
| 17 | + |
| 18 | +The binary for your platform is downloaded automatically at install time. Then configure your coding agents: |
| 19 | + |
| 20 | +```bash |
| 21 | +codebase-memory-mcp install |
| 22 | +``` |
| 23 | + |
| 24 | +Restart your agent. Say **"Index this project"** — done. |
| 25 | + |
| 26 | +## Why codebase-memory-mcp |
| 27 | + |
| 28 | +- **Extreme indexing speed** — Linux kernel (28M LOC, 75K files) in 3 minutes. RAM-first pipeline with LZ4 compression and in-memory SQLite. |
| 29 | +- **Plug and play** — single static binary for macOS (arm64/amd64), Linux (arm64/amd64), and Windows (amd64). No Docker, no runtime dependencies, no API keys. |
| 30 | +- **66 languages** — vendored tree-sitter grammars compiled into the binary. Nothing to install, nothing that breaks. |
| 31 | +- **120x fewer tokens** — 5 structural queries: ~3,400 tokens vs ~412,000 via file-by-file search. |
| 32 | +- **10 agents, one command** — `install` auto-detects Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, and OpenClaw. |
| 33 | +- **14 MCP tools** — search, trace, architecture, impact analysis, Cypher queries, dead code detection, cross-service HTTP linking, ADR management, and more. |
| 34 | + |
| 35 | +## Supported Platforms |
| 36 | + |
| 37 | +| OS | Architecture | |
| 38 | +|---------|-------------| |
| 39 | +| macOS | arm64, amd64 | |
| 40 | +| Linux | arm64, amd64 | |
| 41 | +| Windows | amd64 | |
| 42 | + |
| 43 | +## Usage |
| 44 | + |
| 45 | +```bash |
| 46 | +codebase-memory-mcp install # configure all detected coding agents |
| 47 | +codebase-memory-mcp --version |
| 48 | +codebase-memory-mcp --help |
| 49 | +codebase-memory-mcp update # update to latest release |
| 50 | +codebase-memory-mcp uninstall # remove agent configs |
| 51 | +``` |
| 52 | + |
| 53 | +### CLI Mode |
| 54 | + |
| 55 | +Every MCP tool is also available directly from the command line: |
| 56 | + |
| 57 | +```bash |
| 58 | +codebase-memory-mcp cli index_repository '{"repo_path": "/path/to/repo"}' |
| 59 | +codebase-memory-mcp cli search_graph '{"name_pattern": ".*Handler.*", "label": "Function"}' |
| 60 | +codebase-memory-mcp cli trace_call_path '{"function_name": "main", "direction": "both"}' |
| 61 | +codebase-memory-mcp cli get_architecture '{}' |
| 62 | +``` |
| 63 | + |
| 64 | +## MCP Tools |
| 65 | + |
| 66 | +| Category | Tools | |
| 67 | +|----------|-------| |
| 68 | +| **Indexing** | `index_repository`, `list_projects`, `delete_project`, `index_status` | |
| 69 | +| **Querying** | `search_graph`, `trace_call_path`, `detect_changes`, `query_graph` | |
| 70 | +| **Analysis** | `get_architecture`, `get_graph_schema`, `get_code_snippet`, `search_code` | |
| 71 | +| **Advanced** | `manage_adr`, `ingest_traces` | |
| 72 | + |
| 73 | +## Performance |
| 74 | + |
| 75 | +Benchmarked on Apple M3 Pro: |
| 76 | + |
| 77 | +| Operation | Time | |
| 78 | +|-----------|------| |
| 79 | +| Linux kernel full index (28M LOC, 75K files) | 3 min | |
| 80 | +| Django full index | ~6s | |
| 81 | +| Cypher query | <1ms | |
| 82 | +| Trace call path (depth=5) | <10ms | |
| 83 | + |
| 84 | +## Full Documentation |
| 85 | + |
| 86 | +See [github.com/DeusData/codebase-memory-mcp](https://github.com/DeusData/codebase-memory-mcp) for the full README including all MCP tools, configuration options, graph data model, and language support details. |
| 87 | + |
| 88 | +## License |
| 89 | + |
| 90 | +MIT |
0 commit comments