BrainLayer
Your AI has amnesia. BrainLayer fixes that.

Every architecture decision, every debugging session, every preference you've expressed — gone between sessions. You repeat yourself constantly. Your agents rediscover bugs they already fixed, and re-make choices the team already reasoned through.
BrainLayer gives any MCP-compatible AI agent persistent memory across conversations — and gives a whole fleet of agents a shared organizational memory: what one agent learns (a fix, a decision, what eroded and why) becomes experience the others inherit before they repeat the mistake. One SQLite file. No cloud. No Docker. Just pip install.
"What approach did I use for auth last month?" → brain_search
"Remember this decision for later" → brain_store
"What was I working on yesterday?" → brain_recall
"Ingest this meeting transcript" → brain_digest
"What do we know about this person?" → brain_get_person
Quick Start
pip install brainlayer
MCP examples require the Homebrew BrainLayer bridge. On Intel, replace
/opt/homebrew/opt/brainlayer with /usr/local/opt/brainlayer.
Add to your MCP config (~/.claude.json for Claude Code):
{
"mcpServers": {
"brainlayer": {
"command": "/opt/homebrew/opt/brainlayer/bin/brainlayer-mcp-stdio-bridge"
}
}
}
That's it. Your agent now remembers everything. BrainBar must be running and
owning /tmp/brainbar.sock; brainlayer-mcp-stdio-bridge ships with the package,
reconnects if BrainBar restarts, and uses an absolute path. Raw
socat wiring, {"command": "socat", "args": ["STDIO", "UNIX-CONNECT:/tmp/brainbar.sock"]}
exits on BrainBar restart and leaves persistent clients disconnected. Use brainlayer setup --migrate-mcp
to back up and upgrade owned legacy configs.
See docs/mcp-config.md.
Other editors (Cursor, Zed, VS Code)
Cursor (MCP settings):
{
"mcpServers": {
"brainlayer": {
"command": "/opt/homebrew/opt/brainlayer/bin/brainlayer-mcp-stdio-bridge"
}
}
}
Zed (settings.json):
{
"context_servers": {
"brainlayer": {
"command": { "path": "/opt/homebrew/opt/brainlayer/bin/brainlayer-mcp-stdio-bridge", "args": [] }
}
}
}
VS Code (.vscode/mcp.json):
{
"servers": {
"brainlayer": {
"command": "/opt/homebrew/opt/brainlayer/bin/brainlayer-mcp-stdio-bridge"
}
}
}
MCP Tools (16)
The agent-facing MCP server is BrainBar on /tmp/brainbar.sock. It defines 16 tools, and
every definition carries ToolAnnotations
so agents know which calls are safe to run without confirmation.
Sessions boot into a core palette of 5. By default tools/list returns brain_search,
brain_store, brain_recall, brain_expand, and expand_palette — with short descriptions, to
keep the boot payload small. Call expand_palette (or set BRAINLAYER_MCP_PROFILE=full on the
server) to get all 16 with their full descriptions. Calling a gated tool before expanding returns
an error that tells you to expand.