# Brain Memory

> Brain Memory is an open-source MCP server for knowledge and memory. Long-term Markdown memory for AI agents, shared across Claude, Cursor, Codex and more. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, macOS, Linux, Windows
- **Website:** https://brainmemory.ai
- **Repository:** https://github.com/omelas-tech/brain/tree/HEAD/connector
- **MCP Registry name:** ai.brainmemory/brain
- **Categories:** knowledge and memory
- **Listing updated:** 2026-11-14

## About

Brain Memory stores each decision, convention or preference as a Markdown file with YAML frontmatter in `~/.brain/`, with no database. Recall is computed from the files without embeddings or model calls, using keyword relevance, strength after decay, links between memories and the current project, so every agent gets the same ranking.

Memories follow published models: strength falls with an Ebbinghaus-style decay, recall strengthens a memory and surfaces linked ones, and a sleep cycle consolidates and prunes. Eight memory types decay at different rates, newer facts can supersede older ones, and procedures can be stored as SKILL.md files. Content from tools or the web waits for your approval before recall.

The hosted connector at mcp.brainmemory.ai uses OAuth and, per the connector README, serves the brain of the Google identity that signs in. Tools are brain_recall, brain_status, brain_use, brain_memorize, brain_pin, brain_unpin, brain_forget and brain_verify. The npm plugin is MIT licensed and runs locally with no account.

## Features

- **Markdown memories:** One file per memory with no database.
- **Model-free recall:** Ranked by keyword, decayed strength, links and project.
- **Decay and consolidation:** Unused memories fade and a sleep cycle prunes.
- **Memory types:** Eight types with their own decay rates.
- **Approval for external content:** Tool and web content waits for your approval.
- **Sync options:** Git, encrypted export, synced folder or Brain Cloud.

## Good for

- Keep project conventions across coding sessions
- Share one memory between Claude and Codex
- Record decisions and look them up later
- Store reusable procedures as skills
- Review which memories an agent has saved

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http brain https://mcp.brainmemory.ai/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://mcp.brainmemory.ai/mcp
```

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

```json
{
  "mcpServers": {
    "brain": {
      "url": "https://mcp.brainmemory.ai/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "brain": {
      "type": "http",
      "url": "https://mcp.brainmemory.ai/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "brain": {
      "serverUrl": "https://mcp.brainmemory.ai/mcp"
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "brain": {
      "type": "http",
      "url": "https://mcp.brainmemory.ai/mcp"
    }
  }
}
```

## Tools

- `brain_recall`: Ranked recall for a query.
- `brain_status`: Memory count and last-updated for the brain.
- `brain_use`: Switch between the account's brains.
- `brain_memorize`: Save a memory.
- `brain_pin`: Pin a memory.
- `brain_unpin`: Unpin a memory.
- `brain_forget`: Remove a memory.
- `brain_verify`: Verify a memory.

## FAQ

### Is it free?

Yes, the plugin is MIT-licensed on npm as brain-memory; Brain Cloud sync is optional.

### Where are memories stored?

In ~/.brain/ on your machine, or via the hosted connector tied to your sign-in.

### Does it use a vector database?

No, recall is computed from the files without embeddings.

### Which agents work?

Claude Code, Codex CLI, OpenCode, Copilot CLI, the Claude apps, ChatGPT and others.

### Is Brain Memory free?

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

### How do I add Brain Memory to Claude Code?

Run this command in your terminal: claude mcp add --transport http brain https://mcp.brainmemory.ai/mcp

### What are the best alternatives to Brain Memory?

The closest alternatives to Brain Memory are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and note1.

## 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.
- [note1](https://ai-powered.com/mcp/note1): note1 is an MCP server for productivity.
- [MedXpert 图书馆连接器（通用版）](https://ai-powered.com/mcp/medxpert): MedXpert 图书馆连接器（通用版） is an open-source MCP server for knowledge and memory.
- [Context Nest](https://ai-powered.com/mcp/context-nest): Context Nest is a freemium MCP server for knowledge and memory.
- [Tulsa Ecosystem Map](https://ai-powered.com/mcp/tulsa-ecosystem-map): Tulsa Ecosystem Map is a free MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/brain-memory
