
ThoughtDAG
io.github.chenxiachan由 GitHub 账号 chenxiachan 发布v0.2.2更新于 Oct 24, 2026
Search local AI conversations by file or phrase and recall source turns. Four read-only tools.
概览
只读 MCP 服务器,索引本机 AI 编程会话,让助手查出哪些历史轮次读取、写入或编辑过某个文件,或按短语检索。
- 可以做什么
- 检查某个文件是否存在会话历史记录
- 列出读取、写入或编辑过该文件的轮次,含时间、改动与当时的提问
- 在提问、回答或附件中检索精确短语
- 回看某个会话中指定轮次的完整内容
- 适用场景
- 适合让助手解释代码为何是现在这样,或在修改文件前先确认是否有相关历史讨论,数据来自同一台机器上已有的智能体会话。
- 运行要求
- 通过 npx 以 stdio 在本机运行;需要 Node.js 20 或更高版本,以及本机受支持的会话日志(Claude Code、Codex、DeepSeek Harness、Pi)。请在相关项目目录中启动,以便文件查询对应正确的工作区。无需账号或 API 密钥。
安装
在 SourceWeft 中
- 打开 控制台中的 ThoughtDAG,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
thoughtdag
Find the conversations that shaped a file.
Indexes the agent sessions already on your machine (Claude Code, Codex, DeepSeek Harness, Pi) by the files each turn read, wrote or edited, and lists those turns: when, what changed, what was asked, what the answer said about the file. Every hit links back to the conversation.
- Facts come straight off tool calls, never from free text or a model.
- Session files are read, never written. The index lives in
~/.thoughtdag(0700/0600) and can be deleted withthoughtdag purge. Δlines are observed changes;≈lines are read from the answer and are candidate explanations, not verified reasons.
Let the agent ask on its own
thoughtdag setup mcp registers the server for Claude Code in this project's .mcp.json and for Codex in the user-level ~/.codex/config.toml; the agent then has why_check, why_file, find and recall_turn as tools. thoughtdag setup rules adds two lines to this project's CLAUDE.md and AGENTS.md — check for history before editing a file; query before explaining why code is the way it is — as a marked block, --remove takes it out. Rule changes are per project and explicit; nothing is written unless you ask.
MCP clients and directories
The server's MCP Registry name is io.github.chenxiachan/thoughtdag. A client that supports local stdio servers can start it with:
Requires Node.js 20 or newer and supported session logs on the machine running the server. Start it in the relevant project directory so file queries use the intended workspace. Clients use different configuration formats; the example above is for clients that accept mcpServers JSON.
The four tools search and recall history; they cannot edit a canvas, modify source sessions, or replace the client's conversation. Derived indexes and caches are written under ~/.thoughtdag. Retrieved text is returned to the calling agent and may enter that agent's model context; review the client's provider settings before using private history.
Container and directory checks
The Dockerfile installs the published CLI version as a non-root stdio server. It does not copy the repository or any session data into the image. From the repository root:
An empty container answers MCP initialization and tools/list; history queries have no results until you explicitly provide local data. No model key, private session, or hosted endpoint is needed for the directory check.
Glama generates its own Dockerfile from the listing's Admin → Dockerfile form. Use Node.js 22 and these build steps:
Use these CMD arguments (Glama adds its own mcp-proxy wrapper):
Leave placeholder credentials empty, then build and release. The repository root builds the web frontend; it does not produce dist/thoughtdag.mjs. Keep the pinned CLI version in this configuration aligned with the version you intend to list. Glama's generated image is separate from the non-root image above.
For actual local use, mount only the history directories you choose, read-only, at /data/sessions and optionally /data/canvases. The derived index is stored separately at /home/node/.thoughtdag. Query absolute artifact paths recorded in those sessions; the container's default working directory is not your host project's path. The native npx configuration above is the simpler option for project-relative queries. A cloud-hosted copy cannot see the history on your computer.
Optional Codex skill
The repository also contains a Codex skill for opening a session in the desktop app or running CLI history queries:
This installs a skill in the current project. Opening a session needs the ThoughtDAG desktop app or its local bridge; CLI queries use the npm package. It is separate from MCP registration and does not provide a canvas-writing MCP tool.
来源:cli/README.md,提交 53585b4
工具
0版本历史
1- v0.2.2最新Sep 27, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分

