Submit

Mnemon — Persistent Layered Memory for AI Agents

@nikitacometa

Persistent 4-layer memory (episodic, semantic, procedural, resource) backed by SQLite FTS5. Fact versioning, Snowball stemming (EN+RU), BM25 ranking. Zero-cloud, single-file database. 7 MCP tools.
Overview

Your AI agent forgets everything after each session. Mnemon fixes that.

It gives any MCP-compatible client — Claude Code, Cursor, Windsurf, or your own — a structured long-term memory backed by a single SQLite database on your machine. No API keys, no cloud, no telemetry.

Why Layered Memory?

Flat key-value stores treat "what happened yesterday" the same as "never commit without tests." Different kinds of knowledge have different lifetimes and access patterns.

LayerWhat it storesLifetime
EpisodicEvents, sessions, journal entriesDecays (30-day half-life)
SemanticFacts, preferences, relationshipsStable
ProceduralRules, workflows, conventionsRarely changes
ResourceReference material, book notesDecays slowly (90 days)

7 MCP Tools

  • memory_add — Store a memory with layer, entity, confidence, importance, and optional TTL
  • memory_search — Full-text or exact search with filters by layer, entity, date, scope, confidence
  • memory_update — Update in-place or create a versioned replacement (superseding chain)
  • memory_delete — Delete a memory; re-activates predecessor if any
  • memory_inspect — Get layer statistics or trace a single memory's version history
  • memory_export — Export to JSON, Markdown, or Claude-md format
  • memory_health — Run diagnostics and optionally garbage-collect expired entries

FTS5 with BM25 ranking. Multi-word queries use AND with progressive OR fallback. Snowball stemmer for English and Russian morphology.

Scoring: bm25 × (0.3 + 0.7 × importance) × decay(layer)

Optional vector search via OpenAI or Ollama embeddings (hybrid mode with Reciprocal Rank Fusion).

Fact Versioning

Knowledge evolves. Mnemon chains versions — search always returns the latest, memory_inspect reveals full history.

Install

npm install -g mnemon-mcp

Requirements

Node.js ≥22. No external services, no API keys, no cloud.

Server Config

{
  "mcpServers": {
    "mnemon-mcp": {
      "command": "mnemon-mcp"
    }
  }
}
© 2025 MCP.so. All rights reserved.

Build with ShipAny.