Memory
Decisions, preferences, how-tos — saved with rationale. Hybrid search:
FTS5 BM25 + sqlite-vec vector KNN, merged with
Reciprocal Rank Fusion. Importance multiplier × time decay scoring.
███╗ ███╗ ███╗ ██╗ ███████╗ ███╗ ███╗ █████╗ ████╗ ████║ ████╗ ██║ ██╔════╝ ████╗ ████║ ██╔══██╗ ██╔████╔██║ ██╔██╗ ██║ █████╗ ██╔████╔██║ ███████║ ██║╚██╔╝██║ ██║╚██╗██║ ██╔══╝ ██║╚██╔╝██║ ██╔══██║ ██║ ╚═╝ ██║ ██║ ╚████║ ███████╗ ██║ ╚═╝ ██║ ██║ ██║ ╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝
Claude Code, Cursor, opencode, Codex CLI — each forgets when the session ends. Mnema is a small self-hosted server that gives them all one common brain: structured memory, hybrid RAG, project maps and auto-recall. One SQLite file, one protocol (MCP), your own hardware.
No vector-DB cluster. No message queue. No Docker layer. Just enough infrastructure to make memory persistent and searchable across tools and devices.
Decisions, preferences, how-tos — saved with rationale. Hybrid search:
FTS5 BM25 + sqlite-vec vector KNN, merged with
Reciprocal Rank Fusion. Importance multiplier × time decay scoring.
Ingest notes, READMEs, research write-ups. Markdown-aware chunking, Gemini embeddings, hybrid retrieval with source references. Falls back to keyword-only search without an API key.
rag_add / rag_searchHooks inject relevant memory into every message and project context (bridge) at session start — gated by a semantic-evidence precision filter. Few results, high signal.
recall / recall_feedbackOne structured record per project: architecture, module map,
decisions, current focus, next steps. Agents stop re-discovering
your codebase — project_get("name") and go.
24 MCP tools over Streamable HTTP for agents; a mirror REST API for scripts and the web UI. One implementation, two doors. Works with Claude Code, Cursor, opencode, Codex CLI, ChatGPT…
/mcp · /api/*Route bulk text work to LM Studio / Ollama at zero API cost, and image / video generation to ComfyUI — all from one API, callable by any connected agent.
local_llm / media_generateMemories, projects, documents and tags form a network. Explore it as an infinitely expanding interactive graph — follow any node outward.
web ui / graphLocal-first, last-write-wins: millisecond timestamps with a deterministic content-hash tie-break. Every replica converges to the same winner — write anywhere, read everywhere.
LWW · private meshA 1-bit / bitmap-aesthetic dashboard for browsing memory, RAG documents, projects and prompts — from any browser, including your phone (installable PWA).
react · dashboard■ embeddings are computed on the hub only — clients send raw text, the API key lives in exactly one place · drag sideways to pan the diagram
Every capability is an MCP tool. Point any MCP client at
/mcp and the full set is callable — same tools, every agent, every device.
total running time: 24 tools · all in daily use · REST mirrors every track
# macOS / Linux $ curl -fsSL https://raw.githubusercontent.com/fthsrbst/mnema/master/scripts/install.sh | bash # Windows (PowerShell) > irm https://raw.githubusercontent.com/fthsrbst/mnema/master/scripts/install.ps1 | iex
$ git clone https://github.com/fthsrbst/mnema.git $ cd mnema $ npm ci $ npm run build $ cp .env.example .env # set HUB_TOKEN $ npm run dev → http://127.0.0.1:8033
$ curl -fsSL https://raw.githubusercontent.com/\ fthsrbst/mnema/master/deploy/setup-pi.sh | bash # installs Node 22, builds server + web UI, # generates .env with a random HUB_TOKEN, # installs a systemd unit + nightly backup cron
$ claude mcp add --transport http --scope user hub <HUB-URL>/mcp \ --header "Authorization: Bearer <TOKEN>" # Cursor / Windsurf / opencode / Codex CLI: same endpoint, see README
No GEMINI_API_KEY? The server still runs — it falls back to
keyword-only (FTS) search instead of hybrid. Nothing crashes; you lose semantic recall until
you add a key. Embeddings are only ever computed server-side.