How to Install Dependencies for DeusData Codebase-Memory-MCP
DeusData codebase-memory-mcp requires no runtime dependencies when using pre-built binaries, but building from source requires a C compiler, Make, zlib headers, and optionally Node.js ≥22 for the UI variant.
Codebase-Memory-MCP (CBM) is a high-performance code indexing tool written in C that ships as a statically linked binary. While the pre-built distributions available in the DeusData/codebase-memory-mcp repository include all 158 vendored Tree-Sitter grammars and require no external libraries, compiling the project yourself demands specific development toolchains and system libraries.
Pre-Built Binaries: Zero Dependencies Required
The fastest way to install codebase-memory-mcp without managing dependencies is to use the official installer script. The project distributes statically linked binaries for macOS, Linux, and Windows that bundle all required components, including the SQLite engine and LZ4 compression pipeline.
Run the one-liner installation command to download and install the headless binary:
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
To install the UI variant (which includes the 3-D graph visualization interface), append the --ui flag:
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash -s -- --ui
The install.sh script automatically detects your operating system and architecture, verifies SHA-256 checksums against checksums.txt, and places the binary in $HOME/.local/bin (or an equivalent location on Windows).
Build Dependencies for Source Compilation
If you need to compile a custom build with experimental flags or contribute to development, you must install the following dependencies before running scripts/build.sh.
C Compiler and Build Tools
CBM is written in C and requires either GCC or Clang to compile the native binary. You also need Make to drive the build process.
Install the build toolchain for your platform:
- Debian/Ubuntu:
sudo apt-get install build-essential - Fedora:
sudo dnf install @development-tools - macOS:
xcode-select --install
Compression Library (zlib)
The project uses zlib for compressing in-memory SQLite dumps and for the bundled LZ4 pipeline. You must install the development headers (not just the runtime library) before compilation.
Install zlib development packages:
- Debian/Ubuntu:
sudo apt-get install zlib1g-dev - Fedora:
sudo dnf install zlib-devel - macOS: Included with Xcode Command Line Tools
Optional UI Dependencies (Node.js)
Building the UI variant (codebase-memory-mcp-ui) requires Node.js ≥22 to compile the bundled JavaScript/React assets. This dependency is only required during the build step; the resulting binary has no runtime Node.js dependency.
Install Node.js using the official repositories:
# Debian/Ubuntu
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt-get install -y nodejs
# macOS
brew install node@22
Building from Source
Once you have installed the required dependencies, clone the repository and execute the build script:
# Clone the repository
git clone https://github.com/DeusData/codebase-memory-mcp.git
cd codebase-memory-mcp
# Build the standard headless binary
./scripts/build.sh
The scripts/build.sh wrapper detects your host compiler, links against the system zlib library, and invokes make with appropriate flags for static linking. The output binary appears at build/c/codebase-memory-mcp.
To build the UI variant, pass the --with-ui flag:
./scripts/build.sh --with-ui
This command compiles the native binary while also processing the React frontend assets, producing a single executable that contains both the MCP server and the 3-D graph interface.
Updating and Uninstallation
CBM provides self-contained commands for lifecycle management that do not require package managers or additional tools.
Update the binary to the latest release:
codebase-memory-mcp update
Uninstall the binary and remove agent configuration entries:
codebase-memory-mcp uninstall
These commands respect environment variables defined in the README.md, such as CBM_CACHE_DIR and CBM_LOG_LEVEL, but function independently of external libraries.
Summary
- Pre-built binaries require zero dependencies and install via
install.shin seconds. - Source builds require a C compiler (GCC or Clang), Make, and
zlibdevelopment headers. - UI builds additionally require Node.js ≥22 only during compilation, not at runtime.
- The
scripts/build.shfile automates the compilation process and handles static linking. - Self-update and uninstall commands are built into the binary and require no external package managers.
Frequently Asked Questions
Do I need Node.js to run codebase-memory-mcp?
No. Node.js ≥22 is only required if you build the UI variant from source using ./scripts/build.sh --with-ui. Pre-built binaries, including the UI version installed via install.sh --ui, are self-contained and do not require a Node.js runtime.
Can I install codebase-memory-mcp without a C compiler?
Yes. Use the pre-built binary installation method, which requires only curl and bash. The statically linked binary includes all 158 Tree-Sitter grammars and compression libraries, eliminating the need for system compilers or zlib headers.
What is the difference between the headless and UI variants?
The headless variant provides the core MCP server functionality for AI agents via stdio. The UI variant, built with the --with-ui flag or installed via install.sh --ui, includes an embedded 3-D graph visualization interface for exploring code structure. Both variants are single binaries with no external runtime dependencies.
How do I verify the integrity of downloaded binaries?
The install.sh script automatically verifies SHA-256 checksums against the checksums.txt file hosted in the repository. If you manually download a release archive, compare its hash against the values published in the release assets to ensure the binary has not been tampered with.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →