ZenBrain Memory
Local SQLite long-term memory for MCP clients, with five memory layers
- Pricing
- Open source
- Platforms
- CLI, self-hosted
- Runs
- Locally
- Version
- 0.3.1
- Listing updated
- 3 days ago
About ZenBrain Memory
ZenBrain Memory is an open-source MCP server for knowledge and memory. It runs locally on your machine and is started by your AI client.
ZenBrain gives an MCP client a memory that outlives the conversation, stored in one local SQLite file with no account and no network call. Storing is routed automatically: text that looks like steps becomes a procedure, an emotional weight above 0.5 an episode, a confidence above 0.9 a pinned core memory, and anything else a semantic fact.
Recall searches the episodic, semantic, procedural and core layers, and working memory only when named, returning scored results with the layer each came from. Forgetting removes a memory together with the facts or episodes consolidation linked to it. A consolidation pass turns emotionally weighted recent episodes into facts and decays working-memory slots.
Tools carry MCP annotations, so recall and health are read-only, store only adds, and forget and consolidate are marked destructive. The README calls this an early release whose tool surface may change before 1.0. It needs Node.js 22 or newer and a ZENBRAIN_DB path.
Install
Run in a terminal
claude mcp add zenbrain -- npx -y @zensation/mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"zenbrain": {
"command": "npx",
"args": [
"-y",
"@zensation/mcp"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"zenbrain": {
"command": "npx",
"args": [
"-y",
"@zensation/mcp"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"zenbrain": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@zensation/mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"zenbrain": {
"command": "npx",
"args": [
"-y",
"@zensation/mcp"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"zenbrain": {
"command": "npx",
"args": [
"-y",
"@zensation/mcp"
]
}
}
}Configuration
ZENBRAIN_DBPath to the SQLite file that holds the memory. A leading ~/ means your home directory; a relative path depends on where the client starts the server (some start it in /), so give an absolute or ~/ path. Use ':memory:' for a store that is discarded when the process exits.ZENBRAIN_CONTEXTSComma-separated context domains, passed to the cross-context layer. No tool uses that layer yet, so the value currently has no effect.
Tools this server provides (5)
Taken from the project documentation; the running server may differ.
- zenbrain_store
- Write something into long-term memory with automatic layer routing.
- zenbrain_recall
- Search the long-term layers for what is relevant to a query.
- zenbrain_forget
- Delete a memory and what consolidation linked to it.
- zenbrain_consolidate
- Run one maintenance pass that turns weighted episodes into facts.
- zenbrain_health
- Show how full each memory layer is.
What it does
- Layered memory
- Working, episodic, semantic, procedural and core layers behind one store.
- Automatic routing
- Chooses the layer on store from wording, emotional weight and confidence.
- Scored recall
- Returns results with a 0 to 1 score and the layer of origin.
- Linked forgetting
- Deleting a memory also removes what consolidation linked to it.
- Consolidation pass
- Turns weighted episodes into facts and clears decayed working slots.
- Tool annotations
- Marks read-only, additive and destructive tools for client prompts.
Good for
- Give Claude Code a memory of project decisions across sessions
- Keep personal preferences available in Cursor or Claude Desktop
- Store step-by-step procedures an agent should reuse
- Correct a wrong memory by forgetting and re-storing it
Pricing
Open source
Apache 2.0 per the site
Prices change. Check zensation.ai before you buy.
ZenBrain Memory FAQ
Does it send data anywhere?
No. It uses one local SQLite file and makes no network call.
Where is the memory stored?
At the path in ZENBRAIN_DB, which defaults to ./zenbrain.db; use an absolute or ~/ path since some clients start servers in /.
What Node version is required?
Node.js 22 or newer.
Is it stable?
The README calls it an early release whose tools may change before 1.0.
Is ZenBrain Memory free?
Yes. ZenBrain Memory is open source, so you can use and self-host it for free.
How do I add ZenBrain Memory to Claude Code?
Run this command in your terminal: claude mcp add zenbrain -- npx -y @zensation/mcp
What are the best alternatives to ZenBrain Memory?
The closest alternatives to ZenBrain Memory are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and note1.
Alternatives to ZenBrain Memory

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Claude Code Ultimate Guide
MCP serverMCP server for searching the Claude Code Ultimate Guide from any MCP client
Runs locally- Open source
- 6.5K GitHub stars
- AI models and LLM tooling

Nautilus Compass Memory
MCP serverLocal-first long-term memory layer for AI agents, served over MCP
Not checked yet- 5 tools
- Remote
- Open source
- 1.3K GitHub stars
- Knowledge and memory

note1
MCP serverMCP server giving AI assistants search and summaries across your note1 meetings
- 4 tools
- Remote
- Free trial
- 1 GitHub star
- Productivity
MedXpert 图书馆连接器(通用版)
MCP serverLocal MCP server that searches and answers questions over your own Markdown wiki
Runs locally- 4 tools
- Open source
- Knowledge and memory