MemoSaver
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., "@MemoSaverResume my last session for this project."
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.
MemoSaver
Local-first, persistent memory & session continuity for AI coding agents.
Never start your AI session from zero.
MemoSaver is an MCP server that lives outside Claude Code / OpenCode session lifecycles. It detects the project you open, captures the decisions, errors, solutions and progress that matter, stores them in a local SQLite database — and days later hands your agent a resume context so you can say "continue where we left off" without re-explaining anything.
Monday cd project-a && claude → session_start → work → memories + checkpoint → session_end
Friday cd project-a && claude → session_start → resume context → straight back to workWhy MemoSaver?
AI agents forget everything the moment a session ends. You end up re-explaining your architecture, your decisions, and what's still pending — every single time. MemoSaver keeps the knowledge that matters (not the transcript), bind to your project, on your own machine, independent of which agent you use.
Related MCP server: knitbrain
Features
📁 Project detection | deterministic |
🧠 Sessions |
|
⚡ Auto memory | 10-type classifier, importance scoring, dedupe, buffered extraction |
🔎 Search | FTS5 (BM25) keyword search + optional hybrid token-overlap ranking |
🧰 Checkpoints | manual + automatic; token-budgeted resume context (~2–5k tokens) |
🤖 Agent-agnostic | Claude Code, OpenCode, cursor, and any MCP-capable agent |
🔒 Local-first | zero cloud, zero network, zero native deps — your data is yours |
🖼 3D visualization | interactive WebGL memory network ( |
🛡 Graceful failure | MemoSaver enhances; it never blocks or crashes the agent |
Requirements
Node.js >= 22.5 (uses the built-in
node:sqlite— no native compilation, no install step)
Quick start
git clone <your-repo-url>/memosaver
cd memosaver
pnpm install && pnpm build
npm link # registers `memosaver` and `memosaver-mcp`Verify:
memosaver doctorConnect as MCP
Claude Code
The CLI command adds it to
~/.claude.json. Scope user to make it available in every project:
claude mcp add memosaver --scope user -- node /path/to/memosaver/dist/mcp/entry.jsOpenCode
Add to ~/.config/opencode/opencode.json:
{
"mcp": {
"memosaver": {
"type": "local",
"enabled": true,
"command": ["node", "/path/to/memosaver/dist/mcp/entry.js"]
}
}
}There used to be a
"type": "stdio"variant in older docs — OpenCode now expects thelocalshape above.
Any MCP client
Run the server binary directly over stdio:
node /path/to/memosaver/dist/mcp/entry.jsand point your client at it as a stdio/local server (most clients mirror either the Claude Code or OpenCode shape above).
Usage in chat
Start a session, work, checkpoint, close — then resume later:
● Start: "Start a MemoSaver session for this project."
● Capture: "Save this to MemoSaver: <decision/error/solution>"
● Checkpoint: "Checkpoint: completed=..., pending=..., next_action=..."
● Close: "Finish the MemoSaver session."
● Resume: "Continue from where we left off (use MemoSaver memory)."session_start automatically returns a resume context whenever the project has prior memory.
MCP tools
Tool | Purpose |
| open a project; returns resume context if a previous session exists |
| record goal, current state, completed, pending, blockers, next |
| close a session ( |
| inspect sessions |
| chronological checkpoints + memories of a session |
| explicitly persist a memory |
| edit content / type / importance of a memory |
| top memories by importance |
| FTS5 BM25 keyword search |
| BM25 + lexical token-overlap ranking |
| remove a memory |
| run extraction immediately on raw text |
| portable JSON backup / restore |
| buffer one raw event for automatic extraction |
CLI reference
memosaver status # storage + counts
memosaver projects # all known projects
memosaver sessions [project_path] # sessions
memosaver session <id> [--end|--interrupt|--timeline]
# memories
memosaver memory list --project <path>
memosaver memory search "jwt auth" --project <path>
memosaver memory search "jwt" --project <path> --hybrid
memosaver memory save "postgres chosen for JSONB" --project <path>
memosaver memory update <id> --type DECISION
memosaver memory recall --project <path>
memosaver memory delete <id>
memosaver memory export --project <path> --out memories.json
memosaver memory import memories.json
# diagnostics
memosaver doctorInteractive visualization
Explore your memory graph in 3D from the browser:
memosaver visual # serves on http://127.0.0.1:8888/visual
memosaver visual --port 9000 # custom port
memosaver visual --no-open # don't auto-open the browser3D network view — projects at the center, sessions in rings around them, memories & checkpoints orbiting their session. All rendered with WebGL (three.js), no backend chat required.
Group by project — pick a project from the header to focus only that network.
Interactive — drag any node, orbit / zoom / pan, hover for tooltips, auto-orbit toggle.
Graceful fallback — if WebGL is unavailable the UI shows a clear message instead of a blank screen.
Configuration
Key | Default | Description |
|
| storage root |
|
| minimum score to keep extracted memory |
|
| buffered |
|
| time window to auto-flush the buffer |
| off | optional LLM-backed extractor (see |
|
| resume-context budget |
|
| max memories in resume context |
|
| log verbosity |
// ~/.memosaver/config.json
{
"memory": { "min_importance": 0.3, "buffer_size": 20 },
"resume": { "max_tokens": 4000, "max_memories": 25 }
}Storage layout
~/.memosaver/
├── memosaver.db # SQLite (WAL mode, FTS5) — projects, sessions, memories, checkpoints
├── config.json # optional overrides
└── logs/memosaver.logBackup is simply copying memosaver.db, or use memory export. Everything lives on your machine.
Troubleshooting
memosaver doctor # db health, FTS5, config, storage, project detection, agent wiring
memosaver status # quick countsTools not showing in Claude Code? Restart Claude Code after
claude mcp add.Tools not showing in OpenCode? Verify the
localshape above, then restart.doctorfails on node:sqlite? Downgrade to Node >= 22.5 or upgrade.Never needed: cloud, database server, Docker, or a vector API.
Development
pnpm install
pnpm typecheck
pnpm lint
pnpm test # unit + integration + E2E (57 tests)
pnpm acceptance # real stdio MCP resume check end-to-end
pnpm buildWorking on the code? See docs/development.md.
Documentation
docs/architecture.md— layers, decisions, failure handlingdocs/mcp.md— full MCP interface & resume contractdocs/memory.md— classifier, scorer, hybrid search, optional LLM extractordocs/sessions.md— session state machine, auto-checkpoint, resumedocs/development.md— scripts, conventions, gotchasIMPLEMENTATION_PLAN.md— milestones & roadmapIMPLEMENTATION_STATUS.md— what's shipped vs pending
License
MIT © 2026 Fikri Nurhakim. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Cloud-hosted MCP server for durable AI memory
Persistent memory for AI agents — log and recall conversation context over MCP.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
- memnodeOAuthdev.memnode
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA local MCP server that provides semantic memory storage and retrieval for coding and AI agents, enabling durable context across chat sessions.83 npm4-
- AlicenseAqualityAmaintenanceLocal-first MCP server that gives any AI coding agent per-project memory, workflow intelligence, and always-on, lossless token & context optimization.3712 npm5MIT
- FlicenseNot gradedqualityFmaintenanceA local-first, team-ready MCP server providing durable memory for LLM-based coding workflows with multiple storage backends and fast search.4-
- AlicenseAqualityCmaintenanceA local-first MCP server that provides a shared Markdown-based memory for AI coding agents, enabling cross-agent context persistence via tools like memory_search and memory_capture.101MIT