RecallVault
RecallVault is a local MCP memory server for storing, retrieving, and managing persistent context across sessions and projects.
Store episodic session context or semantic permanent knowledge as Markdown memories with tags, priority, project/shared scope, related files, and supersession links.
Retrieve memories using hybrid search (
recall) with filters for project, session, type, tags, agent, reviewed status, shared/archived/superseded inclusion, sorting, limits, and context-window adaptation.Manage memory lifecycle: append, update content/frontmatter, set priority, mark reviewed, archive/unarchive, delete permanently, and list/inspect inventory.
Initialize the vault idempotently (
memory_setup) and bulk-import existingdocs/or.trae/documents/content as semantic memories.Check server health/vault status and get a suggested session-start context bundle via
health_check.
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., "@RecallVault Remember that this project uses pnpm and Postgres 16."
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.
recall-vault-mcp
跨会话、跨项目的本地记忆 MCP server。flexsearch BM25 + TF-IDF 三路混合检索,双时钟事实管理,自动 Hook 链路。
为什么需要 recall-vault-mcp?
痛点 | recall-vault 怎么解决 |
开新对话 agent 忘了之前说过什么 | SessionStart Hook 自动 recall 上下文 |
技术决策、踩坑经验下次又踩 | remember 存成 Markdown 记忆,带 tags 和 priority |
旧记忆过时了不知道该信哪个 | 双时钟 frontmatter(valid_from/to)+ staleness 信号 |
跨项目知识无法共享 | 一个 vault( |
Related MCP server: kepta
快速安装
方式 1:npx 零安装(推荐)
在你的 IDE MCP 配置里加:
{
"mcpServers": {
"recall-vault": {
"type": "stdio",
"command": "npx",
"args": ["-y", "recall-vault-mcp"]
}
}
}方式 2:全局安装
npm i -g recall-vault-mcp{
"mcpServers": {
"recall-vault": {
"type": "stdio",
"command": "recall-vault-mcp"
}
}
}方式 3:Smithery 一行多 client
npx @smithery/cli install recall-vault-mcp --client codebuddy --scope user
npx @smithery/cli install recall-vault-mcp --client claude --scope user
npx @smithery/cli install recall-vault-mcp --client codex --scope user
npx @smithery/cli install recall-vault-mcp --client trae --scope user一键安装所有 IDE(推荐)
npx recall-vault-mcp install-skills跑一次,自动写入用户级全局配置:MCP + Hooks + Skill 全装,永久生效,所有项目自动继承。
只装某个 IDE:
npx recall-vault-mcp install-skills codebuddy
npx recall-vault-mcp install-skills trae-cn支持的 IDE(全部用户级全局配置)
IDE | MCP 用户级路径 | Hooks | Skill |
Trae CN |
| ✅ SessionStart / Stop / PostToolUse | ✅ |
Trae 国际版 |
| ✅ SessionStart / Stop / PostToolUse | ✅ |
CodeBuddy / WorkBuddy |
| ✅ SessionStart / Stop / PostToolUse | ✅ |
Claude Code |
| ✅ SessionStart / Stop / PostToolUse | ✅ |
Cursor |
| ✅ SessionStart / Stop / PostToolUse | ✅ |
Codex |
| — | ✅ |
Windsurf |
| ✅ pre_user_prompt(替代 SessionStart) | ✅ |
OpenCode |
| —(AGENTS.md 规则注入) | ✅ |
核心功能
1. 三路混合检索 → RRF 融合
flexsearch BM25 + TF-IDF + legacy countOccurrences → RRF(k=60)
→ priority × reviewed × recencyScore(双曲衰减) → 最终排序2. 双时钟事实管理
---
valid_from: 2026-10-28T10:00:00Z
valid_to: null # null = 当前有效
supersedes: mem_phase1_fts_engine # 我取代了谁
superseded_by: null # 谁取代了我(replaces 自动填)
priority: 3 # 1=低 2=正常 3=踩坑经验
tags: [fts, flexsearch, windows]
---remember replaces=<old_id> 自动关闭旧记忆(valid_to=now + superseded_by 填新 id)。
3. 自动 Hook 链路
Hook | 触发时机 | 效果 |
SessionStart | 新建对话 | 注入 recall 指令 → agent 主动拉回上下文 |
Stop | agent 准备结束 | 检测有产出但没 remember → 阻断,强制沉淀 |
PostToolUse | npm test/build 成功 | 注入 remember 建议 |
4. WrapHandler Eyes 层
所有 MCP tool 自动 capture:
{ "ts": "...", "tool": "remember", "args": {"content": "前100字符..."}, "status": "ok", "ms": 23 }存到 ~/.recall-vault/journal/*.jsonl,backlog ≥ 50 时 recall 返回提醒。
10 个 MCP 工具
工具 | 用途 |
| 健康检查 + vault 状态 |
| 存一条记忆(content + tags + priority + replaces) |
| 检索(query + limit + filters + include_superseded) |
| 列出 vault 里所有记忆 |
| 更新记忆内容 |
| 删除记忆 |
| 归档到 archived/ |
| 改 priority |
| 首次使用初始化(幂等 fence block) |
| 从 docs/ 或 .trae/documents/ 批量导入 |
Vault 结构
~/.recall-vault/
├── projects/ # 每个项目一个目录
│ ├── recall-vault/ # 自动从 cwd basename 推断
│ │ ├── semantic/ # 项目级决策/约定
│ │ │ └── mem_phase1_fts_engine.md
│ │ └── episodic/ # 会话级摘要
│ └── some-other-project/
├── shared/ # 跨项目通用记忆
│ └── semantic/
│ └── mem_npm_publish_flow.md
└── journal/ # Eyes 自动 capture
└── 2026-10-29.jsonl本地开发
git clone https://github.com/robinz1001/recall-vault-mcp.git
cd recall-vault-mcp
npm install
npm run build
# 测试
node scripts/test-batch1.mjs # 15 tests
node scripts/test-batch2.mjs # 12 tests
node scripts/test-phase2.mjs # 14 tests
# CLI
node bin/recall-vault-mcp.mjs doctor
node bin/recall-vault-mcp.mcp list技术栈
组件 | 选择 | 原因 |
FTS 引擎 | flexsearch(纯 JS) | better-sqlite3 在 Windows Node 22 下 Access Violation crash |
打包 | tsc → dist/ | npm publish 时已编译,用户不需要 build |
存储 | Markdown + YAML frontmatter | 可手动编辑、git 友好、零锁 |
Hook 脚本 | Node ESM | 跨 IDE Shell 兼容(PowerShell + Git Bash) |
零 native 依赖 | ✅ | 不用 rebuild,Windows/Mac/Linux 开箱即用 |
路线图
Phase | 功能 | 状态 |
1 | 三路混合检索(flexsearch + TF-IDF + legacy → RRF) | ✅ 完成 |
2 | Staleness 信号 + 双时钟 frontmatter(valid_from/to + replaces) | ✅ 完成 |
3 | WrapHandler Eyes + est_tokens 中英文差异 + memory_setup | ✅ 完成 |
4 | memory_import 追溯索引(2 driver + 幂等) | ✅ 完成 |
5 | GitHub Actions publish workflow | 🔜 |
6 | Eyes 自动 distill(backlog → LLM 提炼摘要) | 🔜 |
7 | flexsearch 持久化(vault >5000 条时 export/import) | 🔜 |
许可
MIT © robinz1001
Available Tools
10 toolsarchive_memoryA
Archive or unarchive a memory. Archived memories are excluded from recall by default.
Inputs: memory_id (required), scope, unarchive, project_id.
delete_memoryA
Permanently deletes a memory file. NO RECOVERY — be sure. Use archive_memory if you may need it back.
Inputs: memory_id (required), scope, project_id.
health_checkA
Check RecallVault server health, configuration, and return a suggested context bundle for session start.
Inputs: no named parameters.
list_memoriesB
List memory entries with metadata overview. Useful for inventory and inspection.
Inputs: limit, offset, sort_by, project_id, +3 more.
memory_importA
Phase 4: Import existing project docs (.trae/documents/ and docs/) as semantic memories. Idempotent — skips already-imported files.
Inputs: scope, from_docs, project_id, from_trae_documents.
memory_setupB
Phase 3: Initialize vault with fence block and optional starter memories. Safe to call multiple times (idempotent).
Inputs: agent, generate_starters.
recallC
Search and retrieve relevant memories. Keyword match + filters + sort + window-size adaptation.
Inputs: query (required), tags, agent, limit, +9 more.
rememberB
Write memory (session context or permanent knowledge) to RecallVault. Creates new entry or appends to existing.
Inputs: content (required), memory_type (required), tags, agent, +7 more.
set_memory_priorityA
Quickly set memory priority (1=low, 2=normal, 3=high). Higher priority memories rank higher in recall.
Inputs: priority (required), memory_id (required), scope, project_id.
update_memoryB
Update memory content or frontmatter fields. Replaces body/tags/related_files or sets reviewed/priority/archived.
Inputs: memory_id (required), tags, scope, content, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools have clearly distinct purposes, but update_memory explicitly sets archived and priority fields, overlapping archive_memory and set_memory_priority. remember versus update_memory also requires care, though the descriptions distinguish create/append from replacement.
The set mixes verb_noun names like list_memories, archive_memory, and delete_memory with bare verbs like remember and recall, plus noun-first names like health_check, memory_setup, and memory_import. It remains readable, but there is no single predictable convention.
Ten tools are well-scoped for a memory vault: CRUD/search, archive, priority, setup/import, and health check. Each tool has a plausible place in the lifecycle, with no obvious bloat.
The surface covers create/append, search/retrieve, list, update, delete, archive, priority, setup/import, and health. There is no dedicated get-by-id or bulk operation, but recall and list_memories cover retrieval and inspection well enough for core workflows.
Maintenance
Related MCP Connectors
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Persistent memory for AI agents. Search, store, and recall across sessions.
Persistent memory for AI agents, for code, research and everyday life. Stale facts retire.
Persistent personal memory for AI assistants: search what you told it before and save new facts.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides AI assistants a local, hybrid semantic+keyword memory vault to save research findings, notes, and project context, and recall them across sessions with session boot/save tools.9 npm2MIT
- AlicenseNot gradedqualityBmaintenanceLocal memory for AI agents in one SQLite file on your own machine. Facts carry a validity window and a confidence score, so an outdated one is superseded and downweighted rather than deleted, and retrieval fuses BM25, vector similarity and a knowledge graph.4Business Source 1.1
- AlicenseAqualityBmaintenanceEnables AI agents to persist facts with tags, sources, and importance in a local SQLite database, retrieve them through hybrid BM25 plus embedding search weighted by retention decay, link or supersede related entries, and review everything in a read-only visual dashboard showing the memory graph and timeline.6MIT
- AlicenseAqualityBmaintenanceLocal memory for AI agents over plain Markdown files: hybrid vector + BM25 recall (RRF), one isolated memory per agent directory, fully offline with no LLM in the loop. Tools: cogvault_recall and cogvault_record.253 PyPI1MIT