Use when simple installation doesn’t meet your needs.

System Requirements

Minimum Requirements

  • Node.js 18.0.0 or higher
  • Claude Code desktop application
  • 100MB free disk space
  • Read/write access to home directory
  • Bun runtime (3x faster than npm)
  • macOS or Linux (better hook support)
  • Git for version control
  • SSD for optimal performance

Platform-Specific Installation

Standard Installation

npm install -g claude-mem && claude-mem install

With Homebrew (if Node via Homebrew)

brew install node  # if needed
npm install -g claude-mem
claude-mem install

Permission Issues

For EACCES errors:
sudo npm install -g claude-mem --unsafe-perm
claude-mem install

Apple Silicon (M1/M2/M3)

Native ARM64 support included. No Rosetta needed.

Building From Source

1

Clone the repository
2

git clone https://github.com/thedotmack/claude-mem.git
cd claude-mem
3

Install dependencies
4

bun install
npm install
5

Build the project
6

bun run build
# or: npm run build
7

Link globally
8

bun link
# or: npm link
9

Install integration
10

claude-mem install

Custom Installation Options

Custom Directory

Install to a non-default location:
claude-mem install --dir ~/my-custom-path
Then set environment variable:
export CLAUDE_MEM_HOME=~/my-custom-path

Save on Clear

Enable automatic memory compression on /clear:
claude-mem install --save-on-clear

Force Reinstall

Overwrite existing installation:
claude-mem install --force

Verbose Output

Debug installation process:
claude-mem install --verbose

Docker Installation

For containerized environments:
FROM node:18-alpine
RUN npm install -g claude-mem
RUN claude-mem install --dir /data/claude-mem
ENV CLAUDE_MEM_HOME=/data/claude-mem

Enterprise Installation

Behind Corporate Proxy

# Set proxy
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080

# Install with proxy
npm install -g claude-mem --proxy http://proxy.company.com:8080
claude-mem install

Custom NPM Registry

npm config set registry https://registry.company.com/
npm install -g claude-mem
claude-mem install

Shared Installation

For multi-user systems:
# Install as root
sudo npm install -g claude-mem

# Each user runs
claude-mem install --user

File Structure Details

Complete installation creates:
~/.claude-mem/
├── index/                  # Chroma vector database
│   ├── chroma.sqlite3     # Main database
│   └── collections/       # Memory collections
├── archives/              # Compressed conversations
│   └── YYYY-MM-DD/       # Date-organized
├── hooks/                 # Claude Code integration
│   ├── pre-compact.js    # Before /compact command
│   ├── session-start.js  # On session start
│   └── session-end.js    # On session end
├── trash/                 # Smart Trash system
│   ├── memories/         # Deleted memories
│   └── metadata.json     # Recovery metadata
├── logs/                  # System logs
│   ├── install.log       # Installation log
│   ├── hooks.log         # Hook execution log
│   └── errors.log        # Error tracking
├── settings.json         # User configuration
└── mcp-config.json      # MCP server config

MCP Server Configuration

Manual MCP Setup

If automatic setup fails, add to Claude Code settings:
{
  "mcpServers": {
    "chromadb-claude-mem": {
      "command": "npx",
      "args": [
        "@modelcontextprotocol/server-chromadb",
        "--collections",
        "claude_memories"
      ],
      "env": {
        "CHROMA_PATH": "~/.claude-mem/index"
      }
    }
  }
}

Alternative MCP Configuration

Using local installation:
{
  "mcpServers": {
    "chromadb-claude-mem": {
      "command": "node",
      "args": [
        "~/.claude-mem/node_modules/@modelcontextprotocol/server-chromadb/dist/index.js"
      ]
    }
  }
}

Hook Customization

Custom Hook Directory

claude-mem install --hooks-dir ~/my-hooks

Disable Specific Hooks

claude-mem install --skip-hooks session-end

Custom Hook Scripts

Create ~/.claude-mem/hooks/custom.js:
module.exports = async (context) => {
  // Your custom logic
  console.log('Custom hook triggered!');
};

Troubleshooting

Installation Failures

Performance Issues

Migration & Backup

Backup Your Memories

# Full backup
tar -czf claude-mem-backup.tar.gz ~/.claude-mem

# Selective backup
claude-mem export --output memories-backup.json

Restore From Backup

# Full restore
tar -xzf claude-mem-backup.tar.gz -C ~/

# Selective restore
claude-mem import --input memories-backup.json

Migrate Between Machines

# On old machine
claude-mem export --full --output claude-mem-export.zip

# On new machine
claude-mem import --full --input claude-mem-export.zip

Environment Variables

# Custom home directory
export CLAUDE_MEM_HOME=~/custom/path

# Debug mode
export CLAUDE_MEM_DEBUG=true

# Disable telemetry (already off by default)
export CLAUDE_MEM_NO_TELEMETRY=true

# Custom log level
export CLAUDE_MEM_LOG_LEVEL=debug

# Memory search limit
export CLAUDE_MEM_MAX_RESULTS=20

Uninstalling Completely

# Remove hooks and configuration
claude-mem uninstall

# Remove package
npm uninstall -g claude-mem

# Remove all data (WARNING: deletes all memories)
rm -rf ~/.claude-mem

# Remove from Claude Code settings
# Manually remove MCP server config from Claude Code settings.json

Getting Help


Most users never need this page. The simple installation just works. 🧠