# How to Install Dependencies for DeusData Codebase-Memory-MCP

> Install dependencies for DeusData codebase-memory-mcp. Learn to build from source with a C compiler, Make, zlib, and Node.js for the UI variant.

- Repository: [Martin Vogel/codebase-memory-mcp](https://github.com/DeusData/codebase-memory-mcp)
- Tags: how-to-guide
- Published: 2026-07-25

---

**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](https://github.com/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:

```bash
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:

```bash
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash -s -- --ui

```

The [`install.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh) script automatically detects your operating system and architecture, verifies SHA-256 checksums against [`checksums.txt`](https://github.com/DeusData/codebase-memory-mcp/blob/main/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`](https://github.com/DeusData/codebase-memory-mcp/blob/main/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:

```bash

# 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:

```bash

# 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`](https://github.com/DeusData/codebase-memory-mcp/blob/main/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:

```bash
./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:

```bash
codebase-memory-mcp update

```

**Uninstall** the binary and remove agent configuration entries:

```bash
codebase-memory-mcp uninstall

```

These commands respect environment variables defined in the [README.md](https://github.com/DeusData/codebase-memory-mcp/blob/main/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.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh) in seconds.
- **Source builds** require a C compiler (GCC or Clang), Make, and `zlib` development headers.
- **UI builds** additionally require Node.js ≥22 only during compilation, not at runtime.
- The [`scripts/build.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/scripts/build.sh) file 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`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh) script automatically verifies SHA-256 checksums against the [`checksums.txt`](https://github.com/DeusData/codebase-memory-mcp/blob/main/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.