Kaynak kodu, dokümantasyon ve altyapıyı birbirine bağlayarak yapay zeka ajanlarına yapısal bağlam sağlayan yerel bir bilgi grafiği sunar.
Ayrıca bilinen adı DeusData/codebase-memory-mcp, codebase-memory-mcp
- Yıldızlar
- 48.609
- Araçlar
- 17
- İndirmeler, 30 gün
- 7.001
- En son sürüm
- 0.12.1
- Son commit
- 13 Kas 2026
- Lisans
- MIT
Codebase Memory MCP nedir?
Codebase Memory bir MCP sunucusudur. Kaynak kodu, dokümantasyon ve altyapıyı birbirine bağlayarak yapay zeka ajanlarına yapısal bağlam sağlayan yerel bir bilgi grafiği sunar. 17 araç sunar; örneğin index_repository, list_projects, delete_project.
Özet, projenin README dosyasından oluşturuldu
Codebase Memory MCP sunucusu hakkında
Codebase Memory; kaynak kodu, dokümantasyon ve altyapıyı birbirine bağlayarak yapay zeka ajanlarına yapısal bağlam sağlamak için tasarlanmış yerel bir bilgi grafiği sunar. Tamamen kendi makinenizde çalışan, indeksleme ve grafik sorguları için barındırılan bir servis veya API anahtarı gerektirmeyen, C backend tabanlı yerel bir MCP server olarak işlev görür. Sunucu, çeşitli dilleri ve dosya formatlarını ayrıştırmak için yerleşik gramerler kullanır ve anlama kapasitesini artırmak için Hybrid LSP tipi çözümleme özelliğine sahiptir.
Geliştiriciler, sistemle 17 MCP aracı veya bir komut satırı arayüzü üzerinden etkileşime girebilirler. Kurulum süreci 46 farklı istemci entegrasyonunu destekler; Scout, Verify ve Auditor gibi ajan profillerini otomatik olarak yapılandırır. Görsel keşif yapmak isteyenler için CBM Lens yardımcı aracı; mimari haritalar, 3D Galaxy grafik görünümü ve yerel kod sohbeti imkanı sunar. Bu kurulum, ajanların geleneksel kaynak dosyalarının yanı sıra Docker, Kubernetes, Terraform ve Ansible yapılandırmaları arasındaki ilişkileri takip etmesine olanak tanır.
Neler yapabilirsiniz
- 1Servisler arası bağımlılıkları takip edinBir yapay zeka ajanı, farklı servisler veya altyapı bileşenleri arasındaki bir fonksiyon çağrısını izleyebilir.
- 2Kod değişikliği etkisini değerlendirinBir geliştirici, belirli bir değişikliğin bir projenin hangi kısımlarını etkileyebileceğini belirlemek için grafiği kullanabilir.
- 3Dokümantasyonu kod ile bağlayınSistem, bir ajanın belirli kod sembollerinin yanında ilgili mimari kararları veya PDF metinlerini bulmasına olanak tanır.
- 4Sistem mimarisini görselleştirinKullanıcılar, dosyalar ve semboller arasındaki ilişkileri 3D bir arayüz üzerinden keşfedebilirler.
Projenin README dosyasından alınmıştır. Her kullanım durumu, oradaki bir alıntı ile kontrol edilir.
Codebase Memory MCP nasıl yüklenir
Biçimler 10 Kas 2026 tarihinde doğrulandıCodebase Memory MCP'yi Claude Code içine yükleyin
$ claude mcp add codebase-memory-mcp -- npx -y codebase-memory-mcpCodebase Memory MCP'yi Cursor içine yükleyin
~/.cursor/mcp.json
{
"mcpServers": {
"codebase-memory-mcp": {
"command": "npx",
"args": [
"-y",
"codebase-memory-mcp"
]
}
}
}Codebase Memory MCP'yi VS Code içine yükleyin
.vscode/mcp.json
{
"servers": {
"codebase-memory-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"codebase-memory-mcp"
]
}
}
}Codebase Memory MCP'yi Claude Desktop içine yükleyin
claude_desktop_config.json
{
"mcpServers": {
"codebase-memory-mcp": {
"command": "npx",
"args": [
"-y",
"codebase-memory-mcp"
]
}
}
}Codebase Memory MCP'yi Codex içine yükleyin
~/.codex/config.toml
[mcp_servers.codebase-memory-mcp] command = "npx" args = ["-y", "codebase-memory-mcp"]
Codebase Memory MCP'yi Gemini CLI içine yükleyin
~/.gemini/settings.json
{
"mcpServers": {
"codebase-memory-mcp": {
"command": "npx",
"args": [
"-y",
"codebase-memory-mcp"
]
}
}
}Codebase Memory MCP araçları 17
README dosyasından algılandıindex_repositorylist_projectsdelete_projectindex_statuscheck_index_coveragesearch_graphtrace_pathdetect_changesquery_graphget_graph_schemacompare_graphsget_code_snippet
| index_repository | — | |
| list_projects | — | |
| delete_project | — | |
| index_status | — | |
| check_index_coverage | — | |
| search_graph | — | |
| trace_path | — | |
| detect_changes | — | |
| query_graph | — | |
| get_graph_schema | — | |
| compare_graphs | — | |
| get_code_snippet | — |
17 aracın tümünü gösterDaha az araç göster
get_file_outlineget_architecturesearch_codemanage_adringest_traces
| get_file_outline | — | |
| get_architecture | — | |
| search_code | — | |
| manage_adr | — | |
| ingest_traces | — |
Yapılandırma
CBM_CACHE_DIRVITE_EXPERIMENTAL_AGENTS
| Ad | Açıklama | Sunucu |
|---|---|---|
| CBM_CACHE_DIR | — | |
| VITE_EXPERIMENTAL_AGENTS | — |
Otomatik kontroller
Çalıştırıldı 12 Kas 2026Tam rapor →Otomatik kontrollerimizden geçti. Bu bir güvenlik denetimi değildir: kodu okuyun ve sunucuya ihtiyaç duyduğu en dar erişimi verin. Kontroller nasıl çalışır
- Kaynak deposu bağlantılı ve erişilebilirGeçti
- Açık kaynak lisansı (OSI)Geçti
- Son bir yıl içinde commit veya sürüm mevcutGeçti
- Paket adı popüler bir pakete yakın değilGeçti
- Uzak uç nokta HTTPS kullanıyorKontrol edilmedi
- Yıkıcı araçlar etiketlenmişKontrol edilmedi
- Modele yönelik gizli talimat yokGeçti
- Pakette ve bağımlılıklarında kritik uyarı yokGeçti
codebase-memory-mcp: local code intelligence for AI agents via MCP
Understand your repository, from source code to the systems around it. codebase-memory-mcp is an MCP server that connects code, documentation, configuration, and infrastructure in a persistent local knowledge graph. Use it to find an unfamiliar feature, follow a call across services, trace a deployment back to its source, or assess which parts of a project a change could affect.
Give your coding agent structural context through Model Context Protocol (MCP), or query the graph directly from the CLI. The MCP server is the core of the project. Its optional visual companion, CBM Lens, is in open beta (v0.0.1), with a source reader, architecture maps, the Galaxy graph, coverage diagnostics, architecture decisions, and local code chat.
The native C backend exposes 17 MCP tools, parses languages and file formats with vendored grammars, and adds Hybrid LSP type resolution for supported languages. The installer supports 46 automatic or conditional client integrations, including client configuration, skills, agent profiles, and applicable hooks. Indexing and graph queries need no hosted service or API key. Focused graph queries can reduce repeated file reads and token use; see the measured results.
Quick start · Capabilities · Documentation · Infrastructure · Smart CI · Explore CBM Lens · Agent setup · MCP tools
Local processing: Source analysis and graph storage run on your machine. CBM Lens can optionally download a model for browser AI after you enable it; inference stays on the device. The installer writes agent configuration for the clients you select. See Security for release verification and SECURITY.md for reporting issues.
See the graph with CBM Lens (open beta v0.0.1). Folders become nested platforms, files and symbols become selectable blocks, and arrows show indexed relationships. The recording opens src/foundation in the map of this repository, selects arena.c and opens its source. Height can show source size; hotspot gravity reflects static fan-in. Still image.
Galaxy. Explore the code knowledge graph in 3D. The recording follows the outgoing relationships of cbm_arena_alloc one layer further, switches to the hierarchy and shows the two-hop call path to cbm_alloc. Edge pulses show relationship direction; they do not represent live execution. Still: two dependency layers around cbm_max_file_bytes.
Explore. Browse files in an IDE-style workspace, read syntax-highlighted source in Monaco, and keep the code graph alongside it. File impact shows what depends on the open file, and Code details shows the callers and calls of the symbol under the caret. Select code to ask the local chat about it.
The high-resolution GIFs show CBM Lens Beta on 20 October 2026; the still images were captured on 12–13 October. All show public source from this repository. See capture details for each capture's build, indexed scope and recording setup.
Why codebase-memory-mcp
- Find the right code with context: combine symbol, text, and semantic search with callers, dependencies, source snippets, and file outlines. Targeted queries and compact, paged results can reduce token use and repeated file reads; see Performance for scoped measurements.
- Connect documentation to implementation: index document sections, PDF text pages, architecture decisions, and supported references into code. Find the explanation alongside the symbol.
- Follow the system beyond source files: trace supported relationships through Docker, Kubernetes, Helm, Kustomize, Terraform/OpenTofu, Terragrunt, Ansible, scripts, Make, and CI configuration.
- Understand a change before running it: inspect affected symbols, compare indexed snapshots, and find related tests. Experimental Smart CI combines static relationships and per-test coverage for supported C/C++ test harnesses, falling back to broader runs when evidence is insufficient.
- Explore visually with CBM Lens Beta: read source, follow call paths, inspect architecture and coverage gaps, manage architecture decisions, and ask a local model about selected code.
- Equip your coding agents:
installsets up supported client configuration, durable guidance, skills, Scout/Verify/Auditor profiles, and applicable context hooks. Support varies by client; see the integration matrix. - Keep context local and reusable: indexes persist between sessions, eligible active MCP sessions can keep them synchronized, and optional graph artifacts let a team share a baseline.
- Run a native tool on your machine: standard releases include CBM Lens for macOS, Linux, and Windows. The native runtime needs no Docker or language runtime; parser grammars are included.
Quick Start
Install the latest release (macOS / Linux):
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
The standard native release includes CBM Lens. Start it after installation with codebase-memory-mcp daemon start --open --port=9749. The Nix packages and source builds also offer builds without the UI.
Windows (PowerShell):
# 1. Download the installer
Invoke-WebRequest -Uri https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.ps1 -OutFile install.ps1
# 2. (Optional but recommended) Inspect the script
notepad install.ps1
# 3. Unblock the downloaded file (removes Mark-of-the-Web restriction added by browsers/Invoke-WebRequest)
Unblock-File .\install.ps1
# 4. Run it
.\install.ps1
Note: If you see a script execution policy error, run
Set-ExecutionPolicy -Scope Process Bypassfirst, or invoke withPowerShell -ExecutionPolicy Bypass -File .\install.ps1.
Options: --skip-config (binary only, no agent setup), --dir=<path> (custom location).
Antivirus note: Microsoft Defender may flag a release binary as
Trojan:Script/Wacatac.B!ml. This is a known false positive; typically 61 of ~62 engines return clean, and the same detection family hitsgh, llama.cpp, Godot and Microsoft's own Go toolchain. See Antivirus False Positives for the evidence, how to verify the artifacts yourself, and how to report it if you think we are wrong.
Restart your coding agent. Say "Index this project": done.
-
Download the archive for your platform from the latest release:
codebase-memory-mcp-<os>-<arch>.tar.gz(macOS/Linux) or.zip(Windows)
-
Extract and install (each archive includes
install.shorinstall.ps1):macOS / Linux:
tar xzf codebase-memory-mcp-*.tar.gz ./install.shWindows (PowerShell):
Expand-Archive codebase-memory-mcp-windows-amd64.zip -DestinationPath . Unblock-File .\install.ps1 .\install.ps1 -
Restart your coding agent.
The install command automatically strips macOS quarantine attributes and ad-hoc signs the binary; no manual xattr/codesign needed.
Agent setup: skills, profiles, and hooks
Installation also equips supported coding agents to use the graph in daily work. The native install command detects clients and installs the integration pieces their documented formats support:
| Component | What it adds |
|---|---|
| MCP configuration | Connects the client to the local server and its tools. |
| Instructions and skills | Explains graph-first exploration, index freshness, coverage checks, and when to read source. |
| Scout, Verify, and Auditor profiles | Offers fast provisional lookup, task-directed verification, or bounded full verification, where custom agents are supported. |
| Session and compaction hooks | Restores graph context at supported lifecycle events. |
| Search and read hooks | Adds relevant graph context to supported searches and flags recorded coverage gaps after supported file reads. |
Hook augmentation is context-only and fail-open: it does not replace or block the requested tool call. Features vary by client and platform; some clients use durable instructions or a parent-agent handoff instead of hooks or direct subagent MCP access. Codex users review and trust installed hooks through /hooks. See Multi-Agent Support and Sessions, compaction, and subagents for exact support and activation requirements.
Hooks are enabled by default. Run codebase-memory-mcp install --no-hooks to remove CBM-managed hooks while keeping MCP registration and other integration files; the choice persists for later installs and updates. Run codebase-memory-mcp install --hooks to re-enable them, or inspect the current preference with codebase-memory-mcp config get install_hooks.
Session Coordination Daemon
CBM automatically shares one per-account coordination daemon across Claude Code, Codex, OpenCode, and every other configured client. There is no opt-in setting for MCP servers or hook clients: the first daemon-backed CBM session starts it, each session registers its own work, and a session-managed daemon stops after the final session. A daemon started with daemon start remains running until stopped. The daemon owns long-lived background services such as watchers, shared indexing jobs, and the optional UI. Closing one session cancels work owned only by that session, while work still needed by another session continues.
The detached daemon does not depend on an MCP frontend's stderr. It keeps owner-only durable records under the canonical ${CBM_CACHE_DIR}/logs directory (default ~/.cache/codebase-memory-mcp/logs):
| File | Contents |
|---|---|
cbm-daemon.log |
Daemon lifecycle, watcher/indexing, UI, resource, and error events. |
daemon-conflicts.ndjson |
Exact-build, coordination-ABI, and cache-root admission conflicts. |
activation-events.ndjson |
Install/update/uninstall activation progress and outcomes. |
Thin frontends still write immediate startup and session-specific errors to their own stderr; MCP JSON-RPC stdout remains clean.
All active CBM processes must run the exact same version, executable build, coordination ABI, and canonical cache root. Equivalent CBM_CACHE_DIR aliases resolve to the same root; a genuinely different root is rejected while any CBM process is active. MCP servers, hooks, one-shot CLI commands, temporary index workers, and the daemon share a crash-safe OS admission barrier; starting an ordinary conflicting process fails before doing work and records an explicit conflict in ${CBM_CACHE_DIR}/logs/daemon-conflicts.ndjson.
The native install and uninstall commands are the deliberate exception to that conflict rule. For installation, download, verification, and private same-filesystem staging finish before activation so a bad candidate never disrupts active work. The native update command prints the installer command that performs the update. Activation then publishes account-wide maintenance intent, asks the daemon and every temporary local operation to cancel, and waits to a finite deadline for all coordinated CBM processes to exit. It holds the admission and lifetime barriers exclusively while changing the active binary, configuration, PATH, or indexes. New CBM work cannot enter during this window. Activation progress and results are recorded in ${CBM_CACHE_DIR}/logs/activation-events.ndjson, and a successful command tells you to restart open coding-agent sessions so they launch the activated build.
Package-manager setup (npm, PyPI, or Go) verifies and caches the native executable for that package. It does not replace the active native installation and therefore does not stop running CBM sessions. When that cached binary is executed, it still enters the same exact-build admission barrier. The shell and PowerShell installers invoke the verified candidate's native install command, so they do receive the full account-wide activation guarantee.
The ordinary cli mode runs one command locally, but it is not disconnected from the daemon above: it connects to the shared coordination daemon (starting one if none is already running) for that same admission barrier plus per-project locks on graph mutations. Its connection is a cli_session: it does not register a project watcher or open a browser, and it holds the admission lease only for the command's lifetime. The shared daemon may serve Lens according to its UI configuration and available assets. If the command's own connection is what started the daemon, that daemon exits again once the command closes and no other session is attached; if a daemon was already running, the command simply joins and leaves it exactly as found. While the command is running, a temporary monitor separately lets activation cancel that operation and its supervised worker safely; the monitor exits with the command and never becomes a standing daemon. See CLI Mode for details.
CBM Lens Beta: code visualization and source navigation
CBM Lens is an optional visual companion to the MCP server, currently in open beta (v0.0.1). Standard native releases include its browser interface, so you can launch Lens directly after installation; UI-enabled source builds include it too. It builds on CodeAtlasWeb by Bernhard Jackiewicz (design and tracking in #1964). Lens is served on loopback. Browser AI downloads its optional model only after you enable it; inference stays on-device. Each panel names where its facts come from, and what the index did not record is shown as a gap. Start the local server:
codebase-memory-mcp daemon start --open --port=9749
The browser opens at http://127.0.0.1:9749. A permanent daemon keeps the UI available after the command exits. Use daemon status to inspect it and daemon stop when you are finished. For an MCP session, --ui=true --port=9749 enables the same shared UI. Active clients must use the same executable build and cache directory.
Open your first repository
- Open the project menu and choose Add project index. You can also use
Alt+P. - Choose a local repository folder and name the index. Files stay in place.
- Start indexing and follow its reported status. You can close the dialog while it runs and reopen its activity from the project menu.
- Open the indexed project. Start with Architecture for an overview or Explore to read a file.
To bookmark a view, use ?project=<name>&workspace=architecture. Other workspace values are explore, galaxy, adr, coverage, and system.
| Workspace | What you can do |
|---|---|
| Explore | Navigate the indexed file tree and read source in Monaco. File impact shows what depends on the open file; Code details shows the callers, calls, references and related tests of the symbol under the caret. |
| Galaxy | Search and focus graph nodes, load their neighbors layer by layer, switch to hierarchy, follow a path, and open source. Back and Forward return to earlier views. The coverage shadow marks known gaps around the loaded graph. |
| Architecture | Explore the folder map, entry points, routes, hotspots, system structure, and behavior paths. Select a node or connection to inspect its evidence. |
| ADR | Read and edit the project's architecture decision record. Save explicitly; the document is stored with the index and shared with manage_adr. |
| Coverage | Check indexed, partially parsed, skipped, and excluded paths, together with available freshness information. |
| System | Inspect daemon activity, indexes, and logs. Filter logs by project, severity, or text. |
Architecture views
- Overview: move through source folders and files on a 3D map. Choose source-size or uniform height, language or kind colors, and relationship filters. Switch to Entry points to follow a static call graph from a starting symbol.
- Routes: switch between the service map and endpoint connections. Deployment metadata and indexed route evidence are shown separately; unresolved registrations remain visible.
- Hotspots: inspect symbols using measured signals such as fan-in and complexity. Gravity wells help locate frequently referenced areas. They are not a code-quality score.
- System structure: inspect component dependencies, expand groups, isolate cycles, and follow connections back to source evidence.
- Behavior: choose a source and a reachable destination to inspect static call paths and their source statements. These paths show possible relationships, not a recorded execution order. Runtime observations require separately ingested traces.
Drag a 3D view to orbit, scroll to zoom, and select a node or edge to inspect it. Edge colors distinguish relationships, and pulses indicate their direction. Reduced-motion preferences pause the pulses. Large views show their limits and omitted counts. A missing edge can reflect an indexing or display limit, so check Coverage and the source before drawing conclusions.
Chat with your codebase locally
Open Chat with the panel button at the top right to ask about the code you are looking at. In Explore it uses the open file or the exact text you have selected; in Galaxy it uses the selected node and its loaded neighbors. You can also attach graph evidence through Add context.
- Click the robot icon at the top right to open the agent configuration.
- Choose a local model. The default Qwen2.5 Coder 0.5B downloads about 567 MB; Qwen3 0.6B, LFM2.5 1.2B and Qwen3.5 2B are larger options. All need WebGPU with
shader-f16support. - Click Download & load. Model files come from Hugging Face; inference runs in your browser, with no hosted chat API or API key. A model that is already in the browser cache loads with Load model (cached, no download).
- Ask a question. The composer shows the file or selection that will accompany it. Select a smaller range when you want to focus the answer.
Questions about callers and callees, such as "Who calls cbm_pipeline_run?", are answered from the loaded graph without the model, and the answer says so. When you select a symbol, the chat lists its indexed facts and the lines of its code, and the model adds one sentence; that sentence is left out when it claims something the source does not show. Text written by the model is labelled as such.
The recording asks who calls arena_grow and what it calls, with both answers listed directly from the indexed graph beside the selected symbol. Still image of a model explanation and graph answer.
The chat history is kept for 24 hours in this browser, per project. Each new message uses the source currently open in the reader; earlier source snapshots are not silently accumulated, and messages about another file or selection are not sent along. If a prompt is too long for the model, older messages are left out first; if it still does not fit, CBM Lens asks you to select less code instead of cutting the code. This chat explains the context you give it; it cannot edit files or run tools. Check its answers against the source. The small default model words things loosely, especially in languages other than English.
Codebase Memory MCP soruları
Codebase Memory MCP'yi Claude Code'a nasıl eklerim?
Terminalinizde claude mcp add codebase-memory-mcp -- npx -y codebase-memory-mcp komutunu çalıştırın. Her projede kullanılabilir olması için --scope user ekleyin.
Codebase Memory MCP'yi Cursor'a nasıl eklerim?
~/.cursor/mcp.json dosyasını açın ve yukarıdaki yükleme bölümünde gösterilen Cursor yapılandırmasını kullanarak sunucuyu mcpServers altına ekleyin.
Codebase Memory MCP hangi araçları sunar?
17 araç sunar; bunlar arasında index_repository, list_projects, delete_project, index_status, check_index_coverage yer alır.
Bir API anahtarı veya barındırılan bir servis gerektiriyor mu?
Hayır, indeksleme ve grafik sorguları için herhangi bir barındırılan servis veya API anahtarı gerekmez.
Veriler nerede işleniyor?
Tüm kaynak analizi ve grafik depolama işlemleri doğrudan kendi makinenizde yerel olarak gerçekleştirilir.
Ne tür altyapı ilişkilerini takip edebilir?
Docker, Kubernetes, Helm, Kustomize, Terraform/OpenTofu, Terragrunt, Ansible, scriptler, Make ve CI yapılandırmaları üzerinden ilişkileri takip edebilir.