ZenBrain Memory logo

ZenBrain Memory

Persistent, self-hosted agent memory over MCP using layered storage and local SQLite.

Install ZenBrain Memory

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "zenbrain-memory": {
      "command": "npx",
      "args": [
        "-y",
        "@zensation/mcp"
      ],
      "env": {
        "ZENBRAIN_DB": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Automated check passed— started and listed 5 tools correctly (4d ago).

Overview

ZenBrain Memory is an MCP server for retaining agent memory across conversations through seven memory layers, including episodic, semantic, procedural, and core memory. It stores data locally in SQLite by default, requires no account, and makes no network calls of its own. The project also includes 20 tested memory algorithm modules covering mechanisms such as spaced repetition, emotional tagging, forgetting curves, and sleep replay. Reach for it when an agent needs self-hosted, cross-session memory in Claude Code, Claude Desktop, or Cursor.

Use cases

  • Persist agent context across conversations
  • Store facts and procedures for later retrieval
  • Run self-hosted memory with a local SQLite database
  • Add layered memory to Claude Code or Cursor
  • Experiment with neuroscience-inspired memory algorithms

Key features

  • Seven-layer agent memory
  • SQLite-based local persistence
  • Episodic, semantic, procedural, and core memory
  • Lexical retrieval without embeddings
  • 20 TypeScript memory algorithm modules
  • Optional PostgreSQL storage in the broader project

Tools5

What ZenBrain Memory lets your agent do. Expand a tool for its parameters.

Verified live~1.7k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

7/7 checks healthy over the last 42d

What it can do

From the 5 tools this server returned when we ran it; 5 declare their own safety hints.

Can delete or modify data · 2Read-only tools · 3
Network at startup3 connections
Files written at startup3
Install scriptsNone
npm provenanceSigned build
Package age63 days
Maintainers1

Observed 2026-10-31 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 4d ago via OSV.dev · @zensation/mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars27Stargazers on the source repository.
npm downloads1.6kPackage downloads in the last 30 days.
Last commitTodayMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed5Callable tools this server registers over MCP.

How ZenBrain Memory works

What ZenBrain Memory does

ZenBrain Memory gives MCP-compatible agents memory that persists beyond a single conversation. Its architecture divides memory into seven layers, spanning short-lived working context and longer-lived facts and procedures. The exposed system is based on the ZenBrain project, whose broader implementation includes episodic, semantic, procedural, and core memory.

The package is designed for local, self-hosted use. Memory can be kept in SQLite, with PostgreSQL also supported by the underlying project. No user account is required, and the library makes no network calls of its own. An embedding model or an LLM can be added separately, but neither is required for the basic system.

How it works

Agents interact with the memory system through MCP. Stored information remains available across sessions instead of disappearing when a conversation ends. Retrieval works without an embedding provider through lexical ranking; an embedding provider such as nomic-embed-text can be added when semantic embeddings are wanted.

ZenBrain also contains 20 algorithm modules: 10 core algorithms and 10 advanced research modules. These implement memory-related mechanisms described by the project, including spaced repetition, Hebbian strengthening, emotional tagging, forgetting curves, and sleep replay. The algorithms and core are written in TypeScript without third-party dependencies.

Setup and configuration

The MCP package can be launched with npx and configured with the ZENBRAIN_DB environment variable. A Claude Code installation using a user-scoped server looks like this:

Terminal
claude mcp add --scope user zenbrain -e ZENBRAIN_DB=~/.zenbrain/memory.db -- npx -y @zensation/mcp

The value of ZENBRAIN_DB identifies the SQLite database used for memory. The underlying library targets Node.js 22 or newer. The same MCP server can be configured for Claude Desktop and Cursor.

Tools and capabilities

  • Persist agent memory across sessions
  • Organize memory across seven layers
  • Store episodic, semantic, procedural, and core information
  • Retrieve memories using lexical ranking without an embedding service
  • Apply memory algorithms such as spaced repetition and sleep replay
  • Use SQLite locally or operate memory storage through PostgreSQL in the broader project

Limitations and notes

ZenBrain is pre-1.0, so its public API may change before the 1.0 release. The open-source packages provide the algorithm library and hooks for the broader architecture; six Predictive Memory Architecture components used in the production ZenAI system are proprietary and are not included.

Embedding models and LLMs are optional rather than bundled requirements. Without an embedding provider, retrieval uses lexical ranking. The project’s published benchmark measurements were taken with a Python port in a test harness rather than directly with these packages, so those figures should not be treated as measurements of this MCP server.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about ZenBrain Memory

ZenBrain Memory is an MCP server that connects AI agents to persistent, self-hosted memory stored in SQLite or PostgreSQL. Its main tools provide cross-session memory storage and retrieval across seven layers, including episodic, semantic, procedural, and core memory, with lexical ranking available without an embedding provider.

Install it with `npx` and set `ZENBRAIN_DB` to a SQLite database path. For Claude Code, run `claude mcp add --scope user zenbrain -e ZENBRAIN_DB=~/.zenbrain/memory.db -- npx -y @zensation/mcp`.

Yes, ZenBrain Memory runs in Cursor through the same MCP server. Configure the server using the package’s MCP configuration and provide `ZENBRAIN_DB` for the database location.

No, it does not require an API key or embedding provider for basic use. The system makes no network calls of its own and can retrieve memories with lexical ranking; an embedding model is optional.

ZenBrain Memory stores data in a database you operate, with SQLite available for local use and PostgreSQL supported by the broader project. Set `ZENBRAIN_DB` to configure the SQLite database path.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewZenBrain Memory AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/zenbrain-memory?style=directory)](https://allmcps.com/mcp/zenbrain-memory)
HTML Embed
<a href="https://allmcps.com/mcp/zenbrain-memory"><img src="https://allmcps.com/api/badge/zenbrain-memory?style=directory" alt="ZenBrain Memory on AllMCPs" /></a>