Mnemo
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mnemo Remember that I prefer dark mode in all apps."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mnemo
A portable, user-level memory layer for AI agents — shared across agents, exposed over MCP, with no embeddings required by default.
Named after Mnemosyne, the goddess of memory. Mnemo is a single-file, portable memory layer that any MCP-capable host can mount. Migrating it is as simple as copying one database file.
Features
User-level, cross-agent memory — different agents remember the same you.
MCP stdio server — mountable by any Model Context Protocol host.
No embeddings by default — a deterministic, auditable, portable blend of SQLite + FTS5 (BM25 full-text) + a lightweight relations table.
Optional vectors —
sqlite-vec+ a localbge-smallmodel available as an opt-in (disabled by default) enhancement.Web admin UI — a zero-build local React app to browse, search, edit, delete, inspect audit chains and relation graphs, and run consolidation.
Chinese full-text search — write-time segmentation via the built-in
Intl.Segmenter(zero dependencies) makes even two-character terms recallable.
Related MCP server: nigrty
Design principles
Hybrid architecture (full-text + relations, vectors optional).
Facts carry a validity period rather than being destructively overwritten.
Agent-generated facts are first-class and stored.
Background consolidation (dedup / conflict expiry / aging).
Everything is readable, editable, and deletable.
Quick start
npm install
npm run build # tsc -> dist/
npm test # node --experimental-strip-types --testWeb admin UI
npm run build
npm run ui # serves http://127.0.0.1:4173 (alias: mnemo-ui)From the browser you can browse/filter (by scope / kind / subject / tag), run full-text search (two-character CJK terms are recallable), create / edit / soft-delete / hard-delete facts, inspect audit chains (the superseded_by lineage), view the relation graph (SVG), and run consolidation manually (dry-run preview → commit).
Backend (
src/web.ts): a zero-dependency Node HTTP server (node:http) that reusesstore.ts/consolidate.tsto read and write the SQLite database directly, with a REST surface under/api/*. Configurable viaMNEMO_UI_PORT(default 4173),MNEMO_UI_HOST(default 127.0.0.1), andMNEMO_DB.Frontend (
public/): React 18 loaded from a CDN via importmap, with JSX compiled in the browser by Babel-standalone — no npm dependencies and no build step.The UI and any mounted stdio MCP server share the same database file safely (SQLite WAL, multiple connections).
MCP tools
Seven MCP tools are exposed:
Tool | Purpose |
| Store a fact (with scope / kind / source / validity). |
| BM25 full-text search (CJK-aware). |
| List / filter facts. |
| Edit a fact (keeps the old version as superseded). |
| Soft or hard delete. |
| Create a typed relation between two facts. |
| Deterministic housekeeping (dedup, conflict expiry, aging). |
Tool prefix: mcp__mnemo__*.
Storage & runtime
Storage:
better-sqlite3(prebuilt binary, no compilation) + FTS5 (unicode61) + afact_tagstable + arelationstable; opened with WAL,busy_timeout, andforeign_keyson.Chinese retrieval: write-time segmentation with
Intl.Segmenter(zero dependencies) so two-character words are recallable.The five principles in practice:
source ∈ {user, agent};valid_from/valid_until/superseded_by(old facts are marked invalid, never dropped); soft and hard delete;dedup_key-based conflict expiry; UTC timestamps throughout.The runtime database defaults to
~/.dsh/mnemo.dband is independent of the code location; override it with theMNEMO_DBenvironment variable.
Mounting in an MCP host (stdio)
mnemo:
command: node
args: ["<path-to>/Mnemo/dist/index.js"]
env:
MNEMO_DB: "~/.dsh/mnemo.db" # shared database; this is also the defaultBuild first (npm install && npm run build to produce dist/index.js), then point your host's MCP configuration at it. The stdio transport ships with the MCP SDK, so mounting works out of the box.
Documentation
docs/design.md— full design document (storage schema, MCP tool interface, consolidation, injection strategy, milestones).
License
MIT
Available Tools
7 toolsconsolidateA
Phase A 机械整理记忆(无 LLM,确定性):去重(内容重复合并,保留 user/高 confidence/新)、过期清理(episodic 超保留期软删;user 明示永不清)。默认 dry_run=true 只报告计划不落库。LLM 蒸馏(Phase B)由宿主 agent 另行编排。
Inputs: dedup, scope, dry_run, episodic_retention_days.
forget_memoryA
遗忘事实。hard=false(默认)软删除;hard=true 物理删除(GDPR,级联清理关系/标签)。
Inputs: id (required), hard.
link_memoriesC
在两条事实间建立关系(轻量图)。
Inputs: to_id (required), from_id (required), rel_type (required).
list_memoriesA
按条件列出记忆(结构化,可读/审计),不做全文匹配。默认只列当前有效事实。
Inputs: tag, kind, limit, scope, +2 more.
save_memoryA
写入一条记忆事实。content 为明文(人可读)。给定 dedup_key 时,同 (scope,subject,kind,dedup_key) 的旧事实会被自动标记失效(保留审计链)。
Inputs: content (required), kind, tags, scope, +5 more.
search_memoryA
BM25 全文检索记忆(中文经 Intl.Segmenter 分词,2 字词可召回)。默认只返回当前有效事实。
Inputs: query (required), tag, kind, limit, +3 more.
update_memoryA
修改事实。改 content 会保留旧版本(标失效+superseded_by)并创建新版本(审计链);只改 tags/confidence/subject 则原地更新。
Inputs: id (required), tags, content, subject, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool maps to a distinct memory operation: create, search, list, update, delete, link, and maintain. The overlap between search_memory and list_memories is clearly resolved by describing full-text vs structured filtering, and update_memory is distinct from save_memory due to versioning semantics.
Most tools follow a clear verb_noun snake_case pattern: save_memory, search_memory, update_memory, forget_memory, link_memories. Minor deviations include the plural 'memories' for list/link while others use singular 'memory', and consolidates is a bare verb without a noun object.
Seven tools is well-scoped for a memory server: it covers ingestion, retrieval, structured listing, mutation, deletion, relationships, and maintenance. Each tool has a clear role and none feels redundant or unnecessary.
The core memory lifecycle is well covered: save, search, list, update, soft/hard delete, link, and consolidation. The main gap is that relationships can be created via link_memories but there is no explicit unlink or relationship-query tool, and there is no dedicated get_memory_by_id, though list_memories likely fills that role.
Maintenance
Related MCP Connectors
Hosted agent memory: store, search, and recall facts across sessions from any MCP client.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
Hosted memory for AI agents over MCP. One memory shared by all your agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceLocal-first AI memory layer with hybrid retrieval and brain-inspired namespaces. Enables agents to save, search, and manage memories directly via MCP tools.6 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to store, recall, link, and manage durable local memories using ranked fuzzy search and optional graph context through a compact MCP interface.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to persist and retrieve structured memory across sessions and models via MCP tools for cataloging, searching, and saving facts, with automatic supersession and scope filtering.MIT
- AlicenseNot gradedqualityBmaintenanceEnables multiple MCP agents to read and write a single user-controlled, local-first fact layer under one user identity with explicit scopes, preserving sources, versions, permissions, and audit history. Supports structured memories such as preferences, facts, task state, and decisions, plus structured handoff capsules so one agent can resume another's work by task ID.MIT