# Brain Memory [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/omelas-tech/brain  
**GitHub Stars:** 3  
**npm Downloads (last month):** 856  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/brain-memory

## Description
Persistent memory for AI agents: one brain shared across Claude, Cursor, Codex and more.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "brain-memory": {
    "command": "npx",
    "args": ["-y","-p","brain-memory","brain"]
  }
}
```

## Documentation

## 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:

```bash
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.

_Full upstream README: https://allmcps.com/mcp/brain-memory/readme_

