ZenBrain MCP

Memory for agents over MCP: five tools, one local SQLite file and layers modeled on human memory, no account

  • 27 ★ on the repository
  • Last commit
  • Apache-2.0
MCP serverOfficial

Extended access

Why this level

  • The server writes and deletes data in a local memory file, and zenbrain_forget erases a record together with linked ones
  • Agent session content accumulates in a file that stays on disk
All reasons and checks

zensation-ai/zenbrain

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/zenbrain

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The server writes and deletes data in a local memory file, and zenbrain_forget erases a record together with linked ones
  • Agent session content accumulates in a file that stays on disk

This is third-party code. Review the repository files before installing.

What it does

ZenBrain gives an agent a memory that persists across sessions. The @zensation/mcp server works in Claude Code, Claude Desktop and Cursor, keeps everything in one local SQLite file and makes no network calls. Five tools: zenbrain_store writes a memory, zenbrain_recall searches across layers, zenbrain_forget deletes a record together with linked ones, zenbrain_consolidate runs a maintenance pass, and zenbrain_health shows how full the layers are. Memory has seven layers: working, short-term, episodic, long-term semantic, procedural, core and cross-context. On write, the layer is chosen automatically: steps and phrases like "How to" make a procedure, an emotional weight above 0.5 makes an episode, confidence above 0.9 pins a fact into core, and anything else becomes a semantic fact. Consolidation turns heavily weighted episodes into facts. Underneath sits the @zensation/algorithms library with modules for spaced repetition, Hebbian strengthening, sleep replay and emotional tagging. It can be used in your own code on its own.

Who it is for. Developers whose agent starts from scratch every time and who want local memory with no cloud and no account.

Good fit when

  • An agent in Claude Code has to remember project decisions from session to session
  • Step-by-step instructions like "How to deploy" are saved as procedures and pulled up on request
  • Episodes with emotional weight above 0.5 are condensed into facts by a periodic consolidate pass
  • You want local memory for Cursor or Claude Desktop that sends data nowhere
  • A researcher reproduces the memory-mechanism ablations from the paper with npm run experiments

Not a fit when

  • You need memory shared across several users and servers: the MCP server uses one local file
  • You need vector search over embeddings out of the box: layer search is lexical
  • You expect the six proprietary components described in the paper: the packages do not include them
  • The review schedule for facts should advance: no tool reports a review

Example request

Remember that in this project we write migrations by hand only, and remind me of it next session when I work on the database.

MCP

Transport
stdio
Authentication
not required

Environment variables

ZENBRAIN_DB
SQLite file path, ./zenbrain.db by default; :memory: gives a store that lasts for the process.
ZENBRAIN_CONTEXTS
Comma-separated context domains, currently without effect on the five tools.

Limitations

The project is pre-1.0: the tool set is small and may change. The six Predictive Memory Architecture components from the paper are closed and not in the packages. The LongMemEval-500 comparison figures came from a Python test harness, per the correction notice, and not from this package. Node.js 22 or newer is required. Set the ZENBRAIN_DB file path absolute or with ~/, otherwise a client may start the server in a directory without write access. All layers live in one local file, and there is no shared store for a team.

How to disable. In Claude Code run claude mcp remove zenbrain or claude plugin uninstall zenbrain. The memory file sits at the ZENBRAIN_DB path, for example ~/.zenbrain/memory.db, and is deleted by hand.

FAQ

How do I connect ZenBrain to Claude Code?

Run claude mcp add --scope user zenbrain -e ZENBRAIN_DB=~/.zenbrain/memory.db -- npx -y @zensation/mcp. The same server installs as a plugin: claude plugin install zenbrain --marketplace zensation-ai/zenbrain.

Where is memory stored, and does data leave the machine?

Memory lives in one SQLite file at the ZENBRAIN_DB path, and the server makes no network calls. An embedding model or an LLM is optional, and ranking is lexical by default.

Which tools are marked as dangerous?

zenbrain_forget and zenbrain_consolidate carry MCP annotations as destructive, so a client that asks for confirmation will ask here too. zenbrain_recall and zenbrain_health only read.

How is ZenBrain different from Mem0?

ZenBrain keeps memory locally in SQLite and offers five tools with seven layers, as in the paper. Mem0 is built as a memory layer with plugins and an SDK for several agents.

Can the algorithms be used without MCP?

Yes. Install the library with npm install @zensation/algorithms; it is written in TypeScript with no third-party dependencies and needs Node.js 22 or newer.

Discussion

No questions or reviews yet.

Agent memory as a graph of linked facts: decisions and errors outlive the session, with no vector database or paid API calls

MCP serverExtended access243Repository stars

Local memory for an agent: hooks record facts from conversations and the MCP server brings them back in later sessions from one SQLite file

MCP serverBroad access384Repository stars

A long-term memory MCP server for AI agents: facts fade along a forgetting curve and related records are compressed into a summary

MCP serverExtended access271Repository stars

A self-hosted MCP server for long-term agent memory: structured records, versioned rollback and a visual dashboard

MCP serverExtended access1.4KRepository stars
Official

Membase keeps one shared memory for AI agents that Claude Code, Cursor and Codex read through MCP, an SDK or the membase command

MCP serverExtended access107Repository stars

A long-term memory MCP server for agents: one Rust binary that runs offline and never calls a language model

MCP serverBroad access322Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
ZenBrain (this card)yesnot required27
Mem0no68,514a memory layer with plugins and an SDK for several agents, not a local five-tool MCP server
Claude-Memno113,534a plugin that saves observations from sessions and injects context into new ones

README in short

The README splits into packages: the algorithms library, the MCP server, a Claude Code plugin and middleware for the Vercel AI SDK. The measurement section gives LongMemEval-500 results, a mechanism comparison with Mem0, Letta and Zep, and reproduction packages on Zenodo, with caveats on the figures stated alongside.

README badge

Report a problem

Foxx AIZenBrain
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.