Skip to content

Instantly share code, notes, and snippets.

@ideadude
Created February 5, 2026 00:56
Show Gist options
  • Select an option

  • Save ideadude/82f246e2080c5b7124fb58fce8366352 to your computer and use it in GitHub Desktop.

Select an option

Save ideadude/82f246e2080c5b7124fb58fce8366352 to your computer and use it in GitHub Desktop.
Claude Skill to Install AutoMem how Jason did on his local Mac and Ubuntu machines.

Install AutoMem for Claude Code

Install and configure AutoMem - a long-term memory system for Claude Code that persists across sessions.

What This Does

AutoMem gives Claude Code persistent memory using:

  • FalkorDB (graph database) for relationship tracking
  • Qdrant (vector database) for semantic search
  • MCP integration for seamless Claude Code access

Prerequisites

Before starting, verify these are installed:

# Check Docker is running
docker info > /dev/null 2>&1 && echo "Docker: OK" || echo "Docker: NOT RUNNING"

# Check Node.js version (need 18+)
node --version

# Check Python version (need 3.10+)
python3 --version

If any prerequisites are missing, install them first.


Step 1: Clone the Repository

cd ~
git clone https://github.com/verygoodplugins/automem.git
cd automem

Step 2: Generate API Tokens

Generate two secure random tokens:

AUTOMEM_TOKEN=$(openssl rand -hex 32)
ADMIN_TOKEN=$(openssl rand -hex 32)
echo "=== SAVE THESE TOKENS ==="
echo "AUTOMEM_API_TOKEN=$AUTOMEM_TOKEN"
echo "ADMIN_API_TOKEN=$ADMIN_TOKEN"
echo "========================="

Important: Save the AUTOMEM_API_TOKEN value - you'll need it in Steps 3 and 5.


Step 3: Create Environment File

Create ~/automem/.env:

cat > ~/automem/.env << 'EOF'
FALKORDB_HOST=localhost
FALKORDB_PORT=6379
FALKORDB_GRAPH=memories
QDRANT_URL=http://localhost:6333
QDRANT_COLLECTION=memories
PORT=8001
AUTOMEM_API_TOKEN=PASTE_YOUR_TOKEN_HERE
ADMIN_API_TOKEN=PASTE_YOUR_ADMIN_TOKEN_HERE
EOF

Then edit the file to paste your actual tokens:

nano ~/automem/.env
# Or: code ~/automem/.env

Step 4: Start Docker Services

cd ~/automem
make dev

Wait for services to start (usually 30-60 seconds), then verify:

curl http://127.0.0.1:8001/health

Expected response:

{"status": "healthy", "falkordb": "connected", "qdrant": "connected"}

If you get "connection refused", wait a bit longer and retry.


Step 5: Configure Claude Code MCP Server

Edit ~/.claude.json to add the MCP server configuration.

If the file doesn't exist or is empty, create it:

cat > ~/.claude.json << 'EOF'
{
  "mcpServers": {
    "memory": {
      "type": "stdio",
      "command": "npx",
      "args": ["@verygoodplugins/mcp-automem"],
      "env": {
        "AUTOMEM_ENDPOINT": "http://127.0.0.1:8001",
        "AUTOMEM_API_KEY": "PASTE_YOUR_AUTOMEM_API_TOKEN_HERE"
      }
    }
  }
}
EOF

If the file already exists, add the mcpServers block at the top level, being careful to merge with existing content. The key part to add:

{
  "mcpServers": {
    "memory": {
      "type": "stdio",
      "command": "npx",
      "args": ["@verygoodplugins/mcp-automem"],
      "env": {
        "AUTOMEM_ENDPOINT": "http://127.0.0.1:8001",
        "AUTOMEM_API_KEY": "PASTE_YOUR_AUTOMEM_API_TOKEN_HERE"
      }
    }
  }
}

Important: Replace PASTE_YOUR_AUTOMEM_API_TOKEN_HERE with your actual token from Step 2.


Step 6: Configure Global CLAUDE.md

Create the global instructions file:

mkdir -p ~/.claude
cat > ~/.claude/CLAUDE.md << 'EOF'
# Claude Code Global Configuration

## Memory System (CLI-based)

To recall memories:
```bash
npx @verygoodplugins/mcp-automem recall --query "<search terms>" --limit 10

To store memories:

npx @verygoodplugins/mcp-automem store --content "<memory content>"

The CLI connects to the AutoMem service at http://127.0.0.1:8001 EOF


---

## Step 7: Restart Claude Code

**Completely quit Claude Code** (not just close the window):
- macOS: Cmd+Q or right-click dock icon > Quit
- Windows/Linux: Close all windows and ensure process is terminated

Then relaunch Claude Code.

---

## Step 8: Verify Installation

Test the memory system:

```bash
# Store a test memory
npx @verygoodplugins/mcp-automem store --content "AutoMem installation test on $(hostname) at $(date)"

# Recall it
npx @verygoodplugins/mcp-automem recall --query "installation test" --limit 1

If you see your test memory returned, installation is complete!


Daily Usage

The Docker services need to be running for AutoMem to work. Before using Claude Code:

cd ~/automem && make dev

Optional: Auto-start on Login

Add to your shell profile (~/.zshrc or ~/.bashrc):

# Start AutoMem services if not running
if ! curl -s http://127.0.0.1:8001/health > /dev/null 2>&1; then
  echo "Starting AutoMem services..."
  (cd ~/automem && make dev > /dev/null 2>&1 &)
fi

Troubleshooting

"Connection refused" on health check

  • Docker services aren't running. Run cd ~/automem && make dev
  • Wait 30-60 seconds for services to fully start

Memory tools don't appear in Claude Code

  1. Check backend: curl http://127.0.0.1:8001/health
  2. Verify ~/.claude.json has correct MCP config
  3. Ensure API key matches in both .env and ~/.claude.json
  4. Restart Claude Code completely (Cmd+Q, not just close window)

"401 Unauthorized" errors

  • API token mismatch between .env and ~/.claude.json
  • Double-check both files have the same AUTOMEM_API_TOKEN value

Port conflicts

If ports 6379, 6333, or 8001 are in use:

# Check what's using a port
lsof -i :8001

Stopping Services

cd ~/automem
make stop
# Or: docker-compose down

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment