# Al Buddy Memory

> Al Buddy Memory is an open-source MCP server for knowledge and memory. Governed local memory for AI agents: facts are retired not overwritten, calls are audited. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/flytomoon/al-buddy-memory
- **MCP Registry name:** io.github.flytomoon/al-buddy-memory
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory)
- **Listing updated:** 2026-11-23

## About

Al Buddy Memory stores an agent's memory in a local SQLite file shared across clients. Its distinguishing rule is that facts are never edited. When something stops being true, it is invalidated, and the old fact stays queryable with provenance showing who asserted it: user input, AI inference, guardian or system. Raw text is the source of truth and embeddings are a disposable, model-tagged cache.

The design supports two time questions: what was true at a point in time, and what the store believed at a point in time. Erasure runs through a policy and is audited, with an optional HMAC key for the audit chain. Everything exports to one documented, versioned JSON format, so the memory can move between runtimes.

Run npx -y al-buddy-memory init and it creates the database and wires Claude Code, Codex and Cursor. Quick start uses keyword recall, while optional semantic recall downloads a roughly 90 MB on-device model once. No account, API key or metered service is needed. The README compares itself with Letta, Mem0, Zep and others, which is the author's own reading.

## Features

- **Invalidate, don't overwrite:** Superseded facts are retired and remain queryable.
- **Provenance:** Every node and edge records who asserted it.
- **Time travel:** Ask what was true at one time or believed at another.
- **Audited calls:** Every call is logged, with an optional HMAC-keyed audit chain.
- **Portable export:** One versioned JSON export with a published schema.
- **Local and keyless:** SQLite on disk with optional on-device embeddings.

## Good for

- Keep one agent memory shared by Claude Code, Codex and Cursor
- Record that a past fact is no longer true while keeping history
- Audit what an agent remembered and why
- Export memory to move between runtimes

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add al-buddy-memory --env AL_BUDDY_MEMORY_AUDIT_KEY='<AL_BUDDY_MEMORY_AUDIT_KEY>' -- npx -y al-buddy-memory
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "al-buddy-memory": {
      "command": "npx",
      "args": [
        "-y",
        "al-buddy-memory"
      ],
      "env": {
        "AL_BUDDY_MEMORY_AUDIT_KEY": "<AL_BUDDY_MEMORY_AUDIT_KEY>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "al-buddy-memory": {
      "command": "npx",
      "args": [
        "-y",
        "al-buddy-memory"
      ],
      "env": {
        "AL_BUDDY_MEMORY_AUDIT_KEY": "<AL_BUDDY_MEMORY_AUDIT_KEY>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "al-buddy-memory": {
      "command": "npx",
      "args": [
        "-y",
        "al-buddy-memory"
      ],
      "env": {
        "AL_BUDDY_MEMORY_AUDIT_KEY": "<AL_BUDDY_MEMORY_AUDIT_KEY>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "al-buddy-memory": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "al-buddy-memory"
      ],
      "env": {
        "AL_BUDDY_MEMORY_AUDIT_KEY": "<AL_BUDDY_MEMORY_AUDIT_KEY>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add al-buddy-memory --env AL_BUDDY_MEMORY_AUDIT_KEY='<AL_BUDDY_MEMORY_AUDIT_KEY>' -- npx -y al-buddy-memory
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.al-buddy-memory]
command = "npx"
args = ["-y", "al-buddy-memory"]
env = { AL_BUDDY_MEMORY_AUDIT_KEY = "<AL_BUDDY_MEMORY_AUDIT_KEY>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "al-buddy-memory": {
      "command": "npx",
      "args": [
        "-y",
        "al-buddy-memory"
      ],
      "env": {
        "AL_BUDDY_MEMORY_AUDIT_KEY": "<AL_BUDDY_MEMORY_AUDIT_KEY>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e AL_BUDDY_MEMORY_AUDIT_KEY='<AL_BUDDY_MEMORY_AUDIT_KEY>' al-buddy-memory npx -- -y al-buddy-memory

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "al-buddy-memory": {
      "command": "npx",
      "args": [
        "-y",
        "al-buddy-memory"
      ],
      "env": {
        "AL_BUDDY_MEMORY_AUDIT_KEY": "<AL_BUDDY_MEMORY_AUDIT_KEY>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "al-buddy-memory": {
      "command": "npx",
      "args": [
        "-y",
        "al-buddy-memory"
      ],
      "env": {
        "AL_BUDDY_MEMORY_AUDIT_KEY": "<AL_BUDDY_MEMORY_AUDIT_KEY>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "al-buddy-memory": {
      "command": "npx",
      "args": [
        "-y",
        "al-buddy-memory"
      ],
      "env": {
        "AL_BUDDY_MEMORY_AUDIT_KEY": "<AL_BUDDY_MEMORY_AUDIT_KEY>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "al-buddy-memory": {
      "command": "npx",
      "args": [
        "-y",
        "al-buddy-memory"
      ],
      "env": {
        "AL_BUDDY_MEMORY_AUDIT_KEY": "<AL_BUDDY_MEMORY_AUDIT_KEY>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "al-buddy-memory": {
      "command": "npx",
      "args": [
        "-y",
        "al-buddy-memory"
      ],
      "env": {
        "AL_BUDDY_MEMORY_AUDIT_KEY": "<AL_BUDDY_MEMORY_AUDIT_KEY>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "al-buddy-memory": {
      "command": "npx",
      "args": [
        "-y",
        "al-buddy-memory"
      ],
      "env": {
        "AL_BUDDY_MEMORY_AUDIT_KEY": "<AL_BUDDY_MEMORY_AUDIT_KEY>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "al-buddy-memory": {
      "command": "npx",
      "args": [
        "-y",
        "al-buddy-memory"
      ],
      "env": {
        "AL_BUDDY_MEMORY_AUDIT_KEY": "<AL_BUDDY_MEMORY_AUDIT_KEY>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "al-buddy-memory": {
      "command": "npx",
      "args": [
        "-y",
        "al-buddy-memory"
      ],
      "env": {
        "AL_BUDDY_MEMORY_AUDIT_KEY": "<AL_BUDDY_MEMORY_AUDIT_KEY>"
      }
    }
  }
}
```

## FAQ

### Does Al Buddy Memory need an account or API key?

No. The memory is a local SQLite file.

### Does Al Buddy Memory download a model?

Only if semantic recall is on; it downloads about 90 MB once, and keyword-only mode avoids it.

### Where is the data stored?

By default in ~/.al-buddy-memory/brain.db, configurable with AL_BUDDY_MEMORY_DB.

### How do I set Al Buddy Memory up?

Run npx -y al-buddy-memory init with Node.js 22 or later.

### Is Al Buddy Memory free?

Yes. Al Buddy Memory is open source, so you can use and self-host it for free.

### How do I add Al Buddy Memory to Claude Code?

Run this command in your terminal: claude mcp add al-buddy-memory --env AL_BUDDY_MEMORY_AUDIT_KEY='<AL_BUDDY_MEMORY_AUDIT_KEY>' -- npx -y al-buddy-memory

### What are the best alternatives to Al Buddy Memory?

The closest alternatives to Al Buddy Memory are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and Myco: Agent-First Cognitive Substrate.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Nautilus Compass Memory](https://ai-powered.com/mcp/nautilus-compass-memory): Nautilus Compass Memory is an open-source MCP server for knowledge and memory.
- [Myco: Agent-First Cognitive Substrate](https://ai-powered.com/mcp/myco-agent-first-cognitive-substrate): Myco: Agent-First Cognitive Substrate is an open-source MCP server for knowledge and memory.
- [Source Library](https://ai-powered.com/mcp/source-library): Source Library is an open-source MCP server for knowledge and memory.
- [NeuroDock Cognitive Graph](https://ai-powered.com/mcp/neurodock-cognitive-graph): NeuroDock Cognitive Graph is an open-source MCP server for knowledge and memory.
- [Second Brain](https://ai-powered.com/mcp/second-brain-2): Second Brain is a freemium MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/al-buddy-memory
