
Thread Mind
io.github.mahmoud-nb由 GitHub 帳號 mahmoud-nb 發布v0.5.0更新於 Oct 28, 2026
Git-friendly memory for AI coding: a tree of thread summaries with inherited context
發布方自己的服務:ThreadPage
概覽
為 AI 編碼工作階段提供 Git 友善的記憶:以 Markdown 執行緒摘要樹保存決策,子執行緒繼承祖先脈絡。
- 可以做什麼
- 建立、列出與切換專案,每個專案有一個 main 根執行緒
- 建立、切換、列出、rebase、合併、刪除執行緒,以及標記完成或放棄
- 依決策、限制、狀態、待解問題、下一步等分區寫入與更新執行緒摘要
- 取得目前執行緒的組裝脈絡,含 token 估算與可選預算
- 檢視摘要與工作階段大小統計,並為不讀取伺服器指示的代理產生指示檔
- 以資源形式提供目前脈絡、執行緒樹與單一摘要,並提供提示詞與 tm: 快捷指令
- 適用情境
- 適合在長時間 AI 編碼對話被壓縮或重開時保留關鍵決策,也適合在獨立分支嘗試不同做法並保留放棄原因。團隊希望把執行緒摘要隨程式碼提交並在拉取請求中審閱時同樣適用。
- 執行需求
- 以 npx 或全域 npm 安裝方式在本機執行的程序,需要 Node.js 18 或更新版本。Git 為選用,但啟用後才有分支關聯執行緒、作者辨識與摘要過期提醒。用戶端若在專案外啟動伺服器需設定 THREADMIND_ROOT;THREADMIND_AUTHOR 可覆寫推導出的作者 ID。資料存放在專案根目錄的 .threadmind 目錄。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Thread Mind,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
ThreadMind MCP
Branches for your AI's memory: a git-friendly tree of thread summaries.
ThreadMind is a Model Context Protocol (MCP) server that gives AI coding sessions a memory: a tree of threads, each holding a short summary of what was decided about one topic, stored as Markdown in your repository. Start a fresh session and the active thread's context — its decisions and those of its ancestors — replaces a history that had grown to tens of thousands of tokens.
Documentation | npm | GitHub
Why ThreadMind?
With AI coding assistants, conversations grow long: every request carries the whole history, until the client compacts it or you start over — and starting over loses what was decided. ThreadMind keeps what matters:
- Summaries in sections — Decisions, Constraints, State, Open questions, Next steps
- Inheritance through the tree — a thread's context is its summary plus its ancestors' decisions and constraints; sibling branches stay out
- Branching exploration — try approaches in separate threads, merge the winner's conclusions into the parent, keep the reason an approach was abandoned
- Git-aware — a thread created on a feature branch becomes active whenever that branch is checked out, and summaries warn when the code they describe has changed
- Team collaboration — thread files are committed with the code and reviewed in pull requests
Where the savings come from
ThreadMind can't shrink a conversation in progress: your client decides what it sends. The savings come when you start over:
With the Claude Code plugin, the context reloads automatically after /clear and after compaction, and stats_show measures both sizes on your own sessions.
Quick Start
Claude Code plugin (recommended)
The plugin installs the server and adds hooks that:
- load the active thread's context at startup, after
/clearand after compaction (nothing happens in repositories without a ThreadMind project) - remind Claude to save the summary as the conversation grows, and once more when the context window is nearly full
- recover the summary after a compaction that happened before it was saved, and tell you when
/cleardropped unsaved work - follow git branch changes, giving Claude the new active thread's context
- record the files Claude edits with the next summary, so it gets flagged when they change
- answer
tm:treeandtm:statsinstantly, without using tokens - measure how large conversations grow, read from their transcripts, for
stats_show
It also brings commands (/thread-mind:context, /thread-mind:tree, /thread-mind:create, /thread-mind:switch, /thread-mind:summary, /thread-mind:merge, /thread-mind:stats) and options in /config. A status line (thread-mind-mcp status-line) keeps the active thread and its unsaved work in view. See the plugin guide.
If you configured ThreadMind manually before, remove that configuration so Claude Code doesn't run two servers.
Installation
No installation required — run directly with npx:
Or install globally:
Configure with Claude Code (without the plugin)
Run from your project root. To share the server with your team, add it at project scope: Claude Code writes .mcp.json at the project root, which you commit.
The resulting .mcp.json (you can also write it by hand):
On Windows, use "command": "cmd" and "args": ["/c", "npx", "-y", "thread-mind-mcp"]. Each teammate approves the server the first time Claude Code starts it in the repository.
For yourself only, drop --scope project (default local scope: you, in this project) or use --scope user (you, in every project). Both are stored in ~/.claude.json, which Claude Code manages.
Claude Code doesn't read MCP servers from
~/.claude/settings.jsonor.claude/settings.json. Check the configuration withclaude mcp list, or/mcpinside a session.
Windows + Volta: if Claude Code can't resolve Volta's npx shim, delegate to volta run:
Configure with other MCP clients
ThreadMind uses the stdio transport, compatible with any MCP client. The command is always npx -y thread-mind-mcp; what changes is where each client declares it, and whether it reads the usage instructions the server sends:
Claude Code, VS Code and Copilot CLI share the .mcp.json file at the repository root. See Other AI Clients for each client's configuration.
Workspace location
ThreadMind stores its data in .threadmind/ at the root of your workspace, found in this order:
- The
THREADMIND_ROOTenvironment variable, if set - The workspace roots advertised by the MCP client (a root that already contains
.threadmind/wins). Claude Code advertises the directory you started it in, plus those added with--add-dir: start it from the project root - The directory the server was started from
A client that starts servers outside your project without advertising roots (for example a desktop chat app with no project folder) needs THREADMIND_ROOT:
Teach your AI client to use ThreadMind
The server sends its usage instructions when the client connects (MCP server instructions): Claude Code, VS Code (GitHub Copilot), Codex and Gemini CLI need no setup file. For agents that don't read them, such as Cursor, Copilot CLI or Windsurf, run threadmind_init to generate an AGENTS.md file.
How It Works
Core Concepts
Storage
ThreadMind stores everything in a .threadmind/ directory at your project root:
Thread files use YAML frontmatter. Each one records its parent: the tree is rebuilt from the files, with no index to keep in sync or to conflict in git.
status, branch, commit, paths and mergedInto only appear when set.
Context Assembly
When you request context, ThreadMind walks up from the active thread to the root. It keeps the whole summary of the active thread, and only the Decisions and Constraints of its ancestors:
- Only the direct ancestor chain is included — sibling branches are excluded
- Summaries written before code changes are flagged, using the commit and
pathsrecorded with them maxTokensleaves out the farthest ancestors first when the context would be too large
Available Tools
Each tool declares a title and MCP annotations (read-only, destructive, idempotent), which clients can use to decide when to ask for confirmation.
Project Management
project_create
Thread Management
thread_create
thread_status
thread_merge
thread_delete
thread_rebase
Summary & Context
summary_update
context_get
Setup
threadmind_init
Writes the same instructions the server sends to MCP clients:
Earlier versions wrote CLAUDE.md and .cursorrules. threadmind_init moves the ThreadMind section out of .cursorrules when it generates the Cursor rule, and reports any section left in either file.
Statistics
With the plugin, each session records the size its conversation reached (read from the Claude Code transcript) and the context loaded when the next one started. stats_show reports both:
Available Resources
Every thread of the active project is listed as a resource: in Claude Code, type @ to mention one and bring a sibling thread's summary into the conversation.
Available Prompts
tm-context, tm-tree and tm-stats embed their result directly, without a tool call. The other prompts ask the AI to call the matching tool, so your client's confirmation settings still apply to changes. Thread ID arguments support autocompletion.
In Claude Code, these appear as slash commands: /mcp__thread-mind__tm-help, /mcp__thread-mind__tm-create, etc.
Quick Shortcuts
The server instructions teach the AI short text commands you can type directly in chat:
Usage Examples
1. Start a new project
Claude Code needs no further setup. To let other agents (Codex, Cursor, Copilot…) use the project too, ask for threadmind_init, which generates an AGENTS.md file.
2. Work and summarize
3. Branch into a sub-topic, on its git branch
4. Start fresh when the conversation grows
Without the plugin, ask for tm:context in the new session.
5. Finish the thread
Team Mode
Team mode enables collaborative thread trees shared via git.
How it works
-
Create a project in team mode:
-
Each team member gets an author ID on their first write, derived from
git config user.nameand a short hash ofgit config user.email(stable across clones; override it with theTHREADMIND_AUTHORenvironment variable) -
Thread files (
.threadmind/threads/) are tracked by git. Each one records its parent, so two people creating threads never conflict, even under the same parent -
The local config (
.threadmind/config.json) is gitignored — each member has their own session state and measurements -
A teammate who checks out your feature branch starts on the thread linked to it
Rules
Ownership prevents accidental edits; it is not access control.
Upgrading from 0.4: the tree used to live in
.threadmind/trees/. ThreadMind now moves it into the thread files on first use and deletestrees/<project>.json— commit that change, and upgrade the whole team together..threadmind/stats/is no longer used and can be deleted.
Workflow
Development & Publishing
Development setup, tests, releases and publishing to the MCP Registry are described in SETUP.md.
Architecture
Design Decisions
- File-based storage over SQLite — git-friendly, human-readable, zero native dependencies
- Thread files as the single source of truth — each file records its parent; no tree index to drift or to conflict in git
- YAML frontmatter — thread metadata and content in a single
.mdfile, readable by both humans and tools - No external YAML parser — minimal hand-rolled parser for the simple flat frontmatter format
- Atomic writes — write to a temp file, flush it, then rename it over the target, so a crash never leaves a partial file
- Serialized updates — read-modify-write operations run one at a time, across sessions and hooks too, through a lock file
- Slugified IDs — thread IDs derived from titles (
"Auth System"→"auth-system"), collision-safe with auto-suffix, restricted toa-z,0-9and-(which also rules out path traversal) - One active thread per session — sessions don't move each other; new sessions start from the checked-out git branch
- Selective inheritance — ancestors pass on their decisions and constraints, not their state or next steps
- MCP Prompts — slash commands; read-only ones embed their result instead of asking for a tool call
- Server instructions — the server tells clients how to use it, so no instruction file is needed;
threadmind_initwrites the same text to AGENTS.md and other files for agents that don't read them - Workspace resolution —
THREADMIND_ROOT, then the client's roots, then the working directory - Measured, not estimated, savings — conversation sizes come from the Claude Code transcripts; context sizes are estimates (~3.5 characters per token)
Requirements
- Node.js >= 18.0.0
- Git (optional: team mode author detection, thread–branch links, outdated summary warnings)
License
來源:README.md,提交 cb8677e
工具
0版本歷史
1- v0.5.0最新Sep 27, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Thread 整合
ThreadPage
page.thread官方發布者
把助理連接到 ThreadPage 討論串,讓它能讀取、搜尋與新增筆記,並依 @名稱 接收請求並執行。

Mcp Reddit Search Thread Scraper
com.mambabuilt
依關鍵字或看板搜尋 Reddit,並讀取貼文及其留言,每則貼文與留言各回傳一列扁平資料。

MindThread
由 GitHub 帳號 ppcvote 發布
MindThread 讓助理透過 Meta 官方 Threads API 撰寫、排程與發佈 Threads 貼文、審核回覆草稿並查看帳號數據。

Eclipse Thread MCP
由 GitHub 帳號 CYAN-ECLIPSE-TECHNOLOGIES-LLC 發布
本機 stdio MCP 伺服器,為既有軟體工程工具鏈提供地端橋接,並附帶一個負責串接結果的「Evidence Weaver」。

Kairos Coordination Thread
由 GitHub 帳號 agentindexworld 發布
遠端 MCP 伺服器,用來驗證多代理協作執行緒輪次並取得其 schema 與範例,另提供按次付費的網頁與文字服務。