Self-hosted Β· Local-first Β· MCP

One memory,
every AI.

Membrain is a memory ledger that runs on your own machine. You write to it from the web UI. Your agents write to it over MCP: Claude, Cursor, anything that speaks the protocol. What one remembers, all of them know.

$ npm i -g membrain-mcp Connect your agents
Membrain logo: half brain, half database
One SQLite file No accounts No cloud Works offline No telemetry, ever
The ledger

Everything a shared brain needs

Every entry records who wrote it: you, an agent, or an import. The whole store is one file on your disk. Copy it and that's a backup. Delete it and it's gone.

01

Shared memory over MCPagents read & write

One config line connects Claude Code, Claude Desktop, Cursor, or any other MCP client, over Streamable HTTP or stdio. Eight tools, including a single memory_context call that briefs an agent at the start of a session.

02

Recall that actually finds ithybrid search

Semantic vectors (sqlite-vec) and keyword match (FTS5) fused with reciprocal rank fusion, plus a gentle recency boost. Embeddings run locally by default, so search needs no API key and no network.

03

The clerkyour local LLM, put to work

Your local model organizes the store into topics with live progress, drafts titles one entry at a time, summarizes whatever you select, and flags duplicates so you can strike them in one click. No GPU? Paste an API key for OpenAI, Claude, OpenRouter, or any compatible endpoint.

04

Nothing inked unreviewedproposal queue

Every change Membrain's own AI wants to make is staged for your review, with the old value struck through and the new one beside it. Imports work the same way. Dropped PDFs and docs become candidate entries that you edit, untick, and file yourself.

05

The atlasknowledge map

An interactive constellation of the people, projects, tools, and preferences in your store, and how they connect. It is pure visualization. Retrieval never depends on it.

06

Skills & agent memorymanage the whole setup

Edit your agents' SKILL.md files with markdown preview, and pull the memory your agents already keep on disk into the ledger. Content hashes track what came in, so nothing gets imported twice.

07

Backups you don't think aboutsnapshot on boot

A consistent SQLite snapshot on every start, keeping the last five. One-click snapshot downloads, and portable JSON export and import for memories and skills, full or selective.

Five minutes

How it works

From fresh install to a memory saved by your agent and sitting in the ledger.

STEP 01

Run it

Install once, then one word brings up the web ledger, the REST API, and a live MCP endpoint together. The ledger opens in your browser by itself.

npm install -g membrain-mcp
membrain
# ledger  http://127.0.0.1:7777
# mcp     http://127.0.0.1:7777/mcp
STEP 02

Connect an agent

Any MCP client. Claude Code is one line:

claude mcp add --transport http \
  membrain http://127.0.0.1:7777/mcp
STEP 03

Everything remembers

Tell one agent a fact; ask another tomorrow. Watch entries appear in the ledger, stamped with whoever wrote them.

"remember my favorite editor
 is neovim"
β†’ saved Β· source: mcp:claude-code
The contract

MCP tools

Small surface, written so models reach for them unprompted.

memory_context(query?)one-call session-start digest
save_memory(content, tags?)store a durable fact
save_memories(memories[])several facts, one call
search_memory(query, top_k?)hybrid semantic + keyword recall
get_memory(id)one entry in full
update_memory(id, …)correct the record
delete_memory(id)strike an entry
list_memories(limit?, tag?)recent entries
Principles

Built on four refusals

β€œThe memory is a file.”

Everything lives in one SQLite database on your disk. No hidden state, no second datastore, nothing you can't copy, inspect, or delete.

β€œMCP is the front door for AIs.”

Any MCP-compatible tool connects with one config entry and gets full read and write access. Same code path as the UI, so an agent's entry looks exactly like yours.

β€œNo accounts, by design.”

It runs on your machine or your private network. Security is the network boundary: localhost, Tailscale, or WireGuard. Not passwords.

β€œHuman-inspectable.”

The ledger shows exactly what's stored. Nothing an agent writes is invisible to you, and nothing the AI wants to change is applied without your review.

Read before deploying

There is no auth. Anywhere. The default bind is 127.0.0.1 and exposing anything else requires the explicit flag pair --host … --i-understand-no-auth. Never put Membrain on a public interface. Anyone who can reach the port owns your memory.

Give your AIs a memory
that belongs to you.

$ npm i -g membrain-mcp Built by DevLune