MemoSaver

MemoSaver

Local-first MCP server that persists AI coding agent memory and session context, enabling seamless resume across sessions with searchable memories and checkpoints.

Category
访问服务器

README

<div align="center"> <img width="1942" height="809" alt="ChatGPT Image Aug 9, 2026, 12_03_41 AM" src="https://github.com/user-attachments/assets/e9349954-feea-4283-9567-5b7ebfad35b7" />

MemoSaver

Local-first, persistent memory & session continuity for AI coding agents.

Node License MCP

Never start your AI session from zero.

</div>

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 work

Why 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.

Features

📁 Project detection deterministic sha256(path) ids; same folder = same project
🧠 Sessions active / completed / interrupted, auto-close on re-open
⚡ 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 (memosaver visual)
🛡 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 doctor

Connect 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.js

OpenCode

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 the local shape above.

Any MCP client

Run the server binary directly over stdio:

node /path/to/memosaver/dist/mcp/entry.js

and 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
session_start open a project; returns resume context if a previous session exists
session_checkpoint record goal, current state, completed, pending, blockers, next
session_end close a session (completed/interrupted); auto final checkpoint
session_status inspect sessions
session_timeline chronological checkpoints + memories of a session
memory_insert explicitly persist a memory
memory_update edit content / type / importance of a memory
memory_recall top memories by importance
memory_search FTS5 BM25 keyword search
memory_search_hybrid BM25 + lexical token-overlap ranking
memory_delete remove a memory
memory_capture run extraction immediately on raw text
memory_export / memory_import portable JSON backup / restore
activity_log 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 doctor

Interactive visualization

<img width="1636" height="1005" alt="image" src="https://github.com/user-attachments/assets/4d132138-0ed6-4164-aea9-0015c32a4a19" />

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 browser
  • 3D 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
home / MEMOSAVER_HOME ~/.memosaver storage root
memory.min_importance 0.3 minimum score to keep extracted memory
memory.buffer_size 20 buffered activity_log entries before flush
memory.debounce_ms 20000 time window to auto-flush the buffer
memory.llm.* off optional LLM-backed extractor (see docs/memory.md)
resume.max_tokens 4000 resume-context budget
resume.max_memories 25 max memories in resume context
logger.level info 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.log

Backup 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 counts
  • Tools not showing in Claude Code? Restart Claude Code after claude mcp add.
  • Tools not showing in OpenCode? Verify the local shape above, then restart.
  • doctor fails 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 build

Working on the code? See docs/development.md.

Documentation

License

MIT © 2026 Fikri Nurhakim. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选