Brain Memory logo

Brain Memory

Persistent, file-based memory for AI agents with deterministic recall, associative links, decay, provenance, and hosted MCP access.

Install Brain Memory

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "brain-memory": {
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "brain-memory",
        "brain"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio brain-memory -- npx -y -p brain-memory brain

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y -p brain-memory brain

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Brain Memory gives AI coding agents persistent memory organized as a hierarchical file tree rather than a flat vector database. Its hosted streamable-HTTP MCP connector provides recall, memorization, pinning, and status capabilities across supported agent and chat clients, while local integrations store the brain under `~/.brain/`. Deterministic file-based ranking, memory decay, provenance tracking, temporal validity, and associative links make it useful when agents need consistent knowledge across sessions and tools.

Use cases

  • Share coding conventions across Claude Code, Cursor, and Codex
  • Recall project decisions across separate agent sessions
  • Pin preferences that every connected agent should load
  • Inspect and version agent memory as ordinary files
  • Query what a fact meant at a specific date

Key features

  • Hierarchical file-system memory
  • Deterministic BM25 and TF-IDF recall
  • Associative links and spreading activation
  • Memory strength, decay, and spaced reinforcement
  • Provenance tracking with recall receipts
  • Bitemporal fact history

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 53d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · brain-memory (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3Stargazers on the source repository.
npm downloads856Package downloads in the last 30 days.
Last commit19d agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.

How Brain Memory works

What Brain Memory does

Brain Memory provides persistent memory for AI agents through a hierarchical file system. Memories live in nested categories such as professional, personal, social, or family domains, with deeper folders created as needed. The directory structure itself supplies context, so the stored knowledge can be inspected with ordinary file tools and tracked with Git.

The system supports episodic, semantic, and procedural memory types. Recalled memories gain strength, while unused memories decay according to their type. Related memories can be connected in an associative network, and weak related entries can be consolidated into combined knowledge. Critical preferences and conventions can be pinned so they remain available in every session without decaying.

How it works

The hosted option exposes one remote MCP endpoint at https://mcp.brainmemory.ai/mcp. It uses streamable HTTP and OAuth, allowing an MCP-capable host to connect without installing the memory engine locally. A cloud brain associated with the user's account can then be shared across connected clients.

The local-first option keeps memory files in ~/.brain/ and is intended for supported command-line agents and native integrations. Both approaches use the same memory concepts, while the hosted connector is suited to clients that cannot run a local plugin, including web and mobile chat applications.

Recall is calculated offline from file data using factors including TF-IDF/BM25 relevance, memory strength, decay, spreading activation, context similarity, and salience. Identical brain contents and queries therefore produce consistent rankings across agents. Recall receipts identify memories that influenced an answer. Each memory also records provenance, such as user input, agent inference, tool output, or external content; lower-trust sources are down-ranked and marked accordingly.

Valid time is separate from record time. A memory can record when the brain learned a fact and the period during which that fact was true. Queries can therefore distinguish what was true at a point in time from what the brain knew at that point. Expired facts are demoted rather than silently presented as current.

Setup and configuration

For the hosted connector, register the remote server with the MCP client using its HTTP URL and complete the OAuth sign-in with the Google account that owns the cloud brain. Examples include:

Terminal
claude mcp add --transport http brain https://mcp.brainmemory.ai/mcp
codex mcp add brain --url https://mcp.brainmemory.ai/mcp

Other documented configuration targets include OpenCode, Claude.ai, ChatGPT, Google Antigravity, GitHub Copilot CLI, OpenClaw, Hermes Agent, Goose, and Kilo. ChatGPT requires a paid plan or Developer Mode for this connector. OpenClaw and NVIDIA NemoClaw use additional integration configuration, while Hermes Agent has a native memory-provider integration.

The local-first path uses ~/.brain/ on the machine and is available through native integrations for Claude Code, Codex CLI, OpenCode, GitHub Copilot CLI, Kilo, and Antigravity. OpenClaw and Hermes can also use the same local brain through dedicated integrations.

Tools and capabilities

  • Recall memories using relevance, strength, decay, associations, context, and salience.
  • Memorize new information in the hierarchical file-based brain.
  • Pin conventions and preferences for always-present access.
  • Check brain or connector status from an MCP client.
  • Inspect attributable recall receipts showing which memories affected an answer.
  • Audit memory provenance and SHA-256 write-time baselines to detect altered files.
  • Query historical knowledge with valid-time and known-at-time boundaries.
  • Build procedural skills from repeated experience and export them to native agent skills.

Limitations and notes

The hosted connector stores the brain in Brain Cloud and requires an account with OAuth authentication. The local-first mode is free and keeps files on the user's machine, but its native integrations cover a different set of clients than the hosted connector. Memory ranking is deterministic and file-based; it does not depend on a database, embedding model, or model call for retrieval.

The system distinguishes source provenance but cannot make low-trust information outrank directly supplied user information. Expired facts remain available for historical queries while being demoted in current recall. ChatGPT access has the plan or Developer Mode requirement described above.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Brain Memory

Brain Memory is an MCP server that connects AI agents and chat clients to a persistent hierarchical memory stored in Brain Cloud or local `~/.brain/` files. Its main tools let agents recall memories, memorize information, pin critical knowledge, and check status, with provenance-aware and time-aware retrieval.

Add `https://mcp.brainmemory.ai/mcp` as a remote MCP server and complete OAuth sign-in. Claude Code and Codex CLI can use the documented `claude mcp add` and `codex mcp add` commands; other clients use their MCP configuration files.

Yes, Brain Memory is described as sharing one persistent brain across Cursor and other agents. Connect Cursor to the hosted MCP endpoint if its MCP configuration supports the streamable-HTTP connector, then authenticate the account that holds the cloud brain.

Local memories are stored under `~/.brain/` as ordinary files arranged in a hierarchical directory tree. This makes them inspectable in a file explorer and suitable for Git version history. Hosted MCP connections instead use the Brain Cloud storage associated with the authenticated account.

Yes, Brain Memory separates when it learned a fact from when that fact was valid. Its recall model supports historical questions with valid-time and known-at-time boundaries, while facts that are no longer current are demoted and marked as expired.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewBrain Memory AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/brain-memory?style=directory)](https://allmcps.com/mcp/brain-memory)
HTML Embed
<a href="https://allmcps.com/mcp/brain-memory"><img src="https://allmcps.com/api/badge/brain-memory?style=directory" alt="Brain Memory on AllMCPs" /></a>