# How to Install Codebase-Memory-MCP: Complete Setup Guide for macOS, Linux, and Windows

> Install Codebase-Memory-MCP easily on macOS, Linux, and Windows with our one-line installer. Get SHA-256 verified binaries and automatic AI agent configuration.

- Repository: [Martin Vogel/codebase-memory-mcp](https://github.com/DeusData/codebase-memory-mcp)
- Tags: getting-started
- Published: 2026-07-04

---

**Run the official one-line installer to download the SHA-256 verified binary to `~/.local/bin` and automatically configure detected AI coding agents including Claude Code, Codex CLI, and Gemini CLI.**

`codebase-memory-mcp` from the DeusData/codebase-memory-mcp repository is a single static binary that indexes your repository into a knowledge graph and exposes 14 MCP tools for AI coding agents. The installation process uses automated scripts that detect your operating system and architecture, verify cryptographic checksums, and optionally configure your development environment.

## One-Line Installation (Quick Start)

The fastest way to install Codebase-Memory-MCP uses the official installer scripts hosted in the repository.

### macOS and Linux

Run the Bash installer directly from GitHub:

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

```

This command downloads [`install.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh), detects your OS and CPU architecture, downloads the appropriate `.tar.gz` archive from the latest release, verifies the SHA-256 checksum, and extracts the binary to `~/.local/bin`.

### Windows PowerShell

For Windows systems, download and execute the PowerShell installer:

```powershell

# Download the installer

Invoke-WebRequest -Uri https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.ps1 -OutFile install.ps1

# Unblock and execute

Unblock-File .\install.ps1
.\install.ps1

```

The `install.ps1` script mirrors the Bash installer functionality, handling ZIP archives and installing to `%USERPROFILE%\AppData\Local\Programs\codebase-memory-mcp` by default.

## Installation Options and Customization

The installer supports several flags to customize the installation process.

### Install the UI Variant

To include the 3-D graph visualizer, add the `--ui` flag:

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

```

This downloads the `*_ui-*.tar.gz` archive instead of the standard binary, enabling the web-based visualization interface.

### Custom Installation Directory

Specify a custom installation path using the `--dir` flag:

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

```

This extracts the binary to `/opt/cbm` rather than the default `~/.local/bin`.

### Skip Automatic Agent Configuration

If you prefer manual configuration, use `--skip-config`:

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

```

The script still downloads and verifies the binary but does not modify any `*.mcp.json` configuration files.

## Manual Installation Method

If you prefer not to run the automated installer, manually download and extract the binary:

1. Navigate to the latest release page at `https://github.com/DeusData/codebase-memory-mcp/releases/latest`.
2. Download the appropriate archive for your platform (e.g., `codebase-memory-mcp-linux-amd64.tar.gz` or `codebase-memory-mcp-darwin-arm64.tar.gz`).
3. Extract the archive and run the embedded [`install.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh) (or `install.ps1` on Windows) to complete setup.

## How the Installer Works (Behind the Scenes)

The [`install.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh) script performs several safety checks and platform-specific operations.

**OS and Architecture Detection**

The `detect_os()` function in [`install.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh) maps `uname -s` output to platform identifiers (`darwin` for macOS, `linux` for Linux), while `detect_arch()` identifies `arm64`, `aarch64`, `x86_64`, and `amd64` architectures, including Rosetta detection on Mac systems.

**Checksum Verification**

Before extraction, the script downloads [`checksums.txt`](https://github.com/DeusData/codebase-memory-mcp/blob/main/checksums.txt) from the same GitHub release and validates the SHA-256 hash of the downloaded archive against the expected value. This prevents installation of corrupted or tampered binaries.

**macOS Code-Signing Fix**

On macOS, the installer automatically clears quarantine attributes and applies ad-hoc code signing:

```bash
xattr -d com.apple.quarantine /path/to/binary
codesign --sign - /path/to/binary

```

This step prevents "damaged binary" warnings on macOS Gatekeeper-protected systems.

**Agent Configuration**

The script calls the installed binary with `codebase-memory-mcp install -y` to auto-detect and configure Claude Code, Codex CLI, Gemini CLI, and VS Code MCP settings. Configuration failures are logged but do not halt the installation.

## Verify Your Installation

Confirm successful installation by checking the binary version:

```bash
codebase-memory-mcp --version

```

Expected output:

```

codebase-memory-mcp version 0.8.3 (2026-07-04)

```

If the installer reported that the target directory is not in your `$PATH`, add it to your shell configuration:

```bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc  # or ~/.zshrc

source ~/.bashrc

```

## Summary

- **Quick install**: Use `curl` with [`install.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh) (macOS/Linux) or `install.ps1` (Windows) for automated setup.
- **Safety first**: The installer verifies SHA-256 checksums and uses HTTPS for all downloads.
- **Customization**: Use `--ui` for the visualizer, `--dir` for custom paths, and `--skip-config` to disable agent setup.
- **macOS compatibility**: Automatic code-signing fixes prevent Gatekeeper issues.
- **Verification**: Run `codebase-memory-mcp --version` to confirm successful installation.

## Frequently Asked Questions

### Where does Codebase-Memory-MCP install by default?

On macOS and Linux, the binary installs to `~/.local/bin`. On Windows, it installs to `%USERPROFILE%\AppData\Local\Programs\codebase-memory-mcp`. You can override these locations using the `--dir` flag during installation.

### How do I install the UI variant with the 3-D graph visualizer?

Append the `--ui` flag to the installer command: `curl ... | bash -s -- --ui`. This downloads the UI-enabled archive containing the graph visualization interface, which you can launch with `codebase-memory-mcp --ui=true --port=9749`.

### What if the installer warns that the directory is not in PATH?

The [`install.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh) script checks whether the installation directory exists in your `$PATH` environment variable. If missing, add `export PATH="$HOME/.local/bin:$PATH"` to your shell's startup file (`.bashrc`, `.zshrc`, or `.profile`) and reload the configuration with `source ~/.bashrc`.

### Is the installer script safe to run?

Yes. The [`install.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh) script enforces HTTPS downloads, validates SHA-256 checksums against the official release, and runs the binary with `--version` before completing. Review the script at `https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh` before execution if desired.