
Thread Mind
io.github.mahmoud-nbPublished by GitHub account mahmoud-nbv0.5.0Updated Oct 28, 2026
Git-friendly memory for AI coding: a tree of thread summaries with inherited context
The publisher's own server: ThreadPage
Overview
Git-friendly memory for AI coding sessions: a tree of Markdown thread summaries whose context is inherited by descendant threads.
- What you can do
- Create, list and switch projects, each with a root main thread
- Create, switch, list, rebase, merge, delete and mark threads done or abandoned
- Write and update thread summaries in sections such as decisions, constraints, state, open questions and next steps
- Load the assembled context of the active thread with token estimation and an optional budget
- Show summary and conversation size statistics, and generate instruction files for agents that ignore server instructions
- Expose the active context, thread tree and individual summaries as resources, plus prompts and short tm: chat commands
- When to use it
- Useful when long AI coding conversations get compacted or restarted and you want decisions to survive, and when you want to explore approaches in separate branches while keeping the reason an approach was dropped. Also fits teams that want thread summaries committed and reviewed with the code.
- Requirements
- Local process run with npx or a global npm install; Node.js 18 or newer. Git is optional but enables branch-linked threads, author detection and outdated-summary warnings. THREADMIND_ROOT must be set for clients that start servers outside the project; THREADMIND_AUTHOR overrides the derived author ID. Data is stored in a .threadmind directory at the project root.
Installation
In SourceWeft
- Open Thread Mind in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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
Source: README.md at commit cb8677e
Tools
0Version history
1- v0.5.0LatestSep 27, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Other Thread integrations
ThreadPage
page.threadOfficial publisher
Connects an assistant to ThreadPage threads so it can read, search and add notes, and be asked to act by its @name.

Mcp Reddit Search Thread Scraper
com.mambabuilt
Searches Reddit by keyword or subreddit and reads threads with their comments, returning one flat row per post and comment.

MindThread
Published by GitHub account ppcvote
MindThread lets an assistant write, schedule and publish Threads posts, review drafted replies and read account insights through Meta's official Threads API.

Eclipse Thread MCP
Published by GitHub account CYAN-ECLIPSE-TECHNOLOGIES-LLC
Local stdio MCP server offering on-prem bridges to a legacy software-engineering toolchain, plus an "Evidence Weaver" that joins results.

Kairos Coordination Thread
Published by GitHub account agentindexworld
Remote MCP server for validating multi-agent coordination thread turns and fetching their schemas and samples, with additional paid per-use web and text…