Git-friendly memory for AI coding: a tree of thread summaries with inherited context
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.
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
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:
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.
The plugin installs the server and adds:
/clear and after compaction (nothing happens in repositories without a ThreadMind project)stats_show/thread-mind:context, /thread-mind:tree, /thread-mind:create, /thread-mind:switch, /thread-mind:summary, /thread-mind:merge, /thread-mind:statsIf you configured ThreadMind manually before, remove that configuration so Claude Code doesn't run two servers.
No installation required β run directly with npx:
Or install globally:
Add to your Claude Code MCP settings (~/.claude/settings.json or project .claude/settings.json):
macOS / Linux:
Windows:
On Windows,
npxmust be wrapped withcmd /cbecausenpxis a.cmdwrapper and cannot be spawned directly by the MCP stdio transport.
Windows + Volta:
If you use Volta as your Node.js version manager, use volta run to ensure the correct Node.js version is resolved when Claude Code spawns the MCP subprocess:
Or via CLI: claude mcp add thread-mind-mcp --scope project -- cmd /c volta run npx -y thread-mind-mcp
ThreadMind uses the stdio transport, compatible with any MCP client. Use the same configuration above for your platform.
ThreadMind stores its data in .threadmind/ at the root of your workspace, found in this order:
THREADMIND_ROOT environment variable, if set.threadmind/ wins)A client that starts servers outside your project without advertising roots (for example a desktop chat app with no project folder) needs THREADMIND_ROOT:
The server sends its usage instructions when the client connects (MCP server instructions): Claude Code needs no setup file. For agents that don't read them, run threadmind_init to generate an AGENTS.md file, read by Codex, Cursor, GitHub Copilot and others.
| Concept | Description |
|---|---|
| Project | A workspace containing a thread tree. Has a title, system context, and mode (solo/team). |
| Thread | A node in the tree representing a discussion topic. Stores a markdown summary, and may be linked to a git branch, done or abandoned. |
| Summary | What was decided in a thread, in sections: Decisions, Constraints, State, Open questions, Next steps. |
| Context | The active thread's summary plus its ancestors' decisions and constraints β what the AI loads. |
| Session | Each client session has its own active thread; new sessions start from the checked-out git branch. |
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.
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:
paths recorded with themmaxTokens leaves out the farthest ancestors first when the context would be too largeEach tool declares a title and MCP annotations (read-only, destructive, idempotent), which clients can use to decide when to ask for confirmation.
| Tool | Description |
|---|---|
project_create | Create a new project with a root "main" thread |
project_list | List all projects (shows the session's project) |
project_switch | Switch the session to a different project (a single project is selected automatically) |
project_create| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Project title (used to generate ID) |
systemContext | string | No | System prompt or global instructions |
mode | "solo" | "team" | No | Project mode (default: "solo") |
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/thread-mind)<a href="https://allmcps.com/mcp/thread-mind"><img src="https://allmcps.com/api/badge/thread-mind?style=directory" alt="Thread Mind on AllMCPs" /></a>