memory-tree
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., "@memory-tree open a branch to test the auth fix, then merge the conclusion into mainline"
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.
dsh-memory-tree
给 DeepSeek Harness 保存本地项目记忆。主线记录约束、决策、成果和待解问题。用户确认后,将支线结论合并进主线,再用 Checkpoint 留下阶段快照。支线是记忆记录,DSH 会话与上下文压缩由宿主管理。
安装
DSH bundle
Bundle 的验证目标为 DSH 0.2.2-rc.3。在包含 MCP Manager 的 profile 中安装,例如:
dsh plugin --profile web add github:LeiTATng/dsh-memory-tree桌面端可用 Desktop profile。若已有手工接入的 memory-tree,先停用并移除该条注册,再使用 bundle。两种入口共用同一工具命名空间。重载后调用 mt_status 检查连接。
独立 MCP
通过 DSH 的 MCP 设置添加一个 stdio 服务,名称为 memory-tree,命令为 Node 18 或更高版本的可执行文件,参数为仓库中 src/server.js 的绝对路径。在 Windows 桌面端也使用 Node 的绝对路径。
将 system-instruction.md 放入 DSH 自定义指令,供 Agent 按需使用工具。
Related MCP server: MemoSaver
工作流
用
mt_set_project初始化项目。后续项目读取和写入都显式传project。mt_status可查看项目名。用
mt_branch开支线。完成试验后,用mt_merge提交entries。每项提供category、text、date(YYYY-MM-DD)、source和verification(user-confirmed、tool-verified或unverified)。类别可用constraints、decisions、results、openQuestions。未验证条目进入待解问题。兼容旧的结构化 Markdownsummary,其条目以待验证材料导入。若检测到疑似冲突,向用户展示新旧条目,通过
mt_merge_resolve带回预览的token,逐项提交keepBoth、replace或drop。主线或预览变化后重新确认。相似度用于筛出值得审阅的条目。用
mt_checkpoint冻结阶段状态,用mt_get_checkpoint读取快照的 Markdown。日常续接用mt_get_context或mt_search。检索使用中文字符、二元组与英文词的词频余弦。跨项目搜索需显式传scope: "all",查看历史需显式传includeHistorical: true。历史结果会标记被驳回、已替换、快照或旧版资料等状态。
存储与升级
默认使用 ~/.dsh/memory-tree。通过 bundle 加载时遵循 DSH 的 DSH_HOME,也可用 MEMORY_TREE_ROOT 指定独立存储。在需要与其他同类插件并用时设置不同的数据目录。
升级前备份整个记忆目录并停止旧服务。旧主线、支线、闲聊文件及 Markdown 快照仍保留。新版本读取旧主线、支线和快照,新项目更改写入项目的 .revisions/。旧主线文件保留为导入基线,当前主线请用 mt_get_context 读取。已归档的旧版摘要按历史参考资料检索。
合并的主线变化、冲突决议和归档状态在同一条修订中提交。存储目录需要支持硬链接(例如 NTFS 或 ext4)。两个进程基于同一修订写入时只有一个成功。状态变化时先重读再重试。备份和同步时包含隐藏的 .revisions/,请仅在服务停止后复制整个目录。
测试
运行 npm test,需要 Node 18+ 和 Python 3。测试在临时目录检查项目隔离、只读查询、合并决议、失败重试、并发写入检测、旧数据读取和两种 MCP stdio 帧格式。可用 DSH_TEST_NODE 选择不同的 Node 可执行文件。
Available Tools
13 toolsmt_branchC
为项目创建一条记忆支线
Inputs: project (required), title.
mt_chatB
显式保存一条闲聊到指定项目的独立记录,保留近期条目
Inputs: message (required), project (required), role.
mt_checkpointC
冻结项目状态为阶段快照,保留历史和会话
Inputs: project (required), title, review.
mt_get_checkpointBRead-only
按 ID 读取阶段快照 Markdown
Inputs: id (required), project (required).
mt_get_contextCRead-only
读取有长度上限的项目主线上下文
Inputs: project (required), maxRecent.
mt_helpBRead-only
显示记忆树使用说明
Inputs: no named parameters.
mt_list_branchesBRead-only
列出项目的活跃和已归档支线
Inputs: project (required).
mt_mergeB
提交结构化结论。entries 优先,旧 summary 作为待验证材料导入。冲突时先返回待确认决议
Inputs: project (required), branchId (required), entries, summary.
mt_merge_resolveC
使用预览 token 提交完整冲突决议
Inputs: token (required), project (required), branchId (required), resolutions (required).
mt_routeCRead-only
返回关键词路由建议。显式传 project 时可返回该项目主线
Inputs: message (required), project.
mt_searchBRead-only
本地词法检索。默认查当前条目。历史记录按需包含,跨项目需显式选择
Inputs: query (required), topK, scope, project, +1 more.
mt_set_projectB
显式初始化项目,返回规范项目名
Inputs: project (required).
mt_statusBRead-only
查看项目列表或指定项目的主线和支线状态
Inputs: project.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools target a distinct resource and action (branch vs list_branches, checkpoint vs get_checkpoint, merge vs merge_resolve). However, mt_route can return a project's mainline when a project is passed, overlapping with mt_get_context, and mt_status partly overlaps with mt_list_branches by showing branch state.
All names share the mt_ prefix and snake_case, but action conventions are mixed: some tools are bare verbs/nouns that imply creation (mt_checkpoint, mt_branch, mt_merge) while others use get_/list_/set_ prefixes. It remains readable but not a single predictable pattern.
13 tools fit comfortably within the 3-15 range for a memory-tree server. The set includes useful meta tools (mt_help, mt_status) and a couple of potentially redundant entry points, but none feel grossly unnecessary.
The surface covers the core lifecycle: project initialization, context retrieval, search, branch creation/listing, checkpoint create/read, merge/conflict resolution, chat saving, and status. Minor gaps remain, such as listing checkpoints, deleting or archiving branches, and updating or removing entries.
Related MCP Connectors
One memory, every AI. A shared, user-owned markdown memory your AI clients read and write over MCP.
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Team memory for AI coding agents and code reviews, reviewed by humans and served over MCP.
Cloud-hosted MCP server for durable AI memory
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceAn MCP server that lets multiple AI coding agents share state, preserve context across sessions, and coordinate via a knowledge graph, messaging, and branch-preserving checkpoint/resume with conflict handling.62 npm1Apache 2.0
- AlicenseNot gradedqualityBmaintenanceLocal-first MCP server that persists AI coding agent memory and session context, enabling seamless resume across sessions with searchable memories and checkpoints.5 npm1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server providing persistent, local-first memory for AI agents via Markdown files in a git repo, with search, branching, and auditability.6 npm2MIT
- AlicenseNot gradedqualityDmaintenanceA local-first MCP server providing persistent, layered memory (episodic, semantic, procedural, resource) for AI agents, with search, versioning, and session management via a single SQLite file.4MIT