Thatch
Persistent memory and operational methodology for AI coding agents. Works with OpenCode (as a plugin), Claude Code (as a local MCP server), and (as a local MCP server).
Power your agent
คำสั่งของผู้เผยแพร่เอง ไม่ใช่เอนด์พอยต์ของ PlugMCP
Host a copy with our keys and logs.
npx -y @jeffober/[email protected]Claude Code ไม่มีลิงก์ติดตั้งสำหรับคำสั่งแบบโลคัล ให้คัดลอกคำสั่งด้านล่างแล้วรันในเทอร์มินัล
claude mcp add jeffober-thatch -- npx -y @jeffober/thatch@0.4.2รันในเทอร์มินัล
{ "mcpServers": { "jeffober-thatch": { "command": "npx", "args": [ "-y", "@jeffober/[email protected]" ] } }}claude_desktop_config.json
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดจากผู้เผยแพร่
Persistent memory and operational methodology for AI coding agents. Works with OpenCode (as a plugin), Claude Code (as a local MCP server), and (as a local MCP server).
Persistent memory for AI coding agents — local embeddings, SQLite stores, zero config. Works with OpenCode (as a plugin), Claude Code (as an MCP server), and Cursor (as an MCP server).
Each session inherits the accumulated knowledge of every session before it: project architecture, conventions, gotchas, user preferences. Your agent starts with context instead of a blank slate. No API keys, no cloud services; everything runs on your machine.
// opencode.jsonc
{ "plugin": ["@jeffober/thatch"] }
On next start, OpenCode npm-installs thatch and its tools are available
immediately. Works with both opencode 1.x and 2.x (the same package supports
both plugin APIs). Until the next release ships, npm's latest still
targets 1.x only. For async extraction (child sessions run in the
background):
export OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true
Without this env var, extraction still works - the child session runs synchronously (fire-and-forget) instead of asynchronously.
The v2 plugin API is missing a few surfaces the v1 API had. On 2.x:
ui.toast.show. A TUI-less
environment (headless run, still connecting) shows nothing - toasts are
best-effort by design.opencode plugin update) reloads it, but extraction buffers, watcher
registrations, and armed wrap-ups are journaled and restored; a process
restart restores the state of a resumed (-c/-s) session. Other
sessions' watcher registrations survive as dormant definitions: resuming
such a session re-arms its watches on the first message (expired ones
are dropped and reported), and a live session in the same project gets a
one-line notice that a dead session's watch will re-arm if resumed.session.remove on the plugin API (v2.0.22), so the fact-extractor
child sessions are deleted when they finish - the session picker stays
clean. On an older 2.x build (pre-session.remove) the deletion
degrades silently: children accumulate in the session picker, and
"continue last session" (-c) can land in one after any session that
triggered extraction.session.compact on the plugin API (upstream
added it in v2.0.22); on an older 2.x build the checklist and memory
flush run but the compaction itself is skipped - run /compact yourself
there. /thatch/exit closes the session's own tab over the session-tab
bridge; with no tab open (headless run, tabs off) nothing visible happens,
but the session still unregisters from chat and its watches are
cancelled - on either host, and reopening or resuming the session does
not re-arm them. Re-create watches you still want with
thatch_watch_create.-c session listing. The chat resume listing degrades.Everything else - tools, memory, nudges, chat, watchers - behaves the same on both versions, with one caveat: v2 has no turn-free delivery (noReply), so the features that lean on it - the chat transcript echo bubble, the session-start reminder, and the post-reload re-attach notice - do not render on 2.x. Their model-facing content still arrives; only the bubble rendering is lost.
Then prime your project memory by running thatch prime in your project directory.
This launches an opencode session to build an initial map of the code base
and seed the memory.
Install globally, then run setup in your project:
npm install -g @jeffober/thatch
cd /path/to/your/project
thatch setup --claude # or --cursor
# set up in your global config for all projects
thatch setup --claude --global # or --cursor --global
setup installs the MCP server config, hooks, instructions, and skills.
Restart your editor and thatch's tools are available as mcp__thatch__*.
Requires Bun on PATH.
The embedding model downloads once at first use. It is cached in the
platform's per-user cache dir: ~/Library/Caches/thatch/models on macOS (or
$XDG_CACHE_HOME/thatch/models when XDG_CACHE_HOME is set),
$XDG_CACHE_HOME/thatch/models (default ~/.cache/thatch/models) elsewhere.
Set THATCH_MODEL_CACHE to override the location. The cache survives
upgrades and works from read-only installs.
This repo is a flake. The package bundles Bun and the native embedding
runtime, so you need no global npm install and no bun on PATH.
Try it without installing:
nix run github:sysread/thatch -- --version
Install options:
NixOS module (system-wide, all users):
{
inputs.thatch.url = "github:sysread/thatch";
# in your NixOS system's modules:
imports = [ inputs.thatch.nixosModules.default ];
programs.thatch.enable = true; # puts `thatch` on PATH for every user
}
Overlay: add nixpkgs.overlays = [ inputs.thatch.overlays.default ];,
then environment.systemPackages = [ pkgs.thatch ];
Package directly: add inputs.thatch.packages.${system}.default to a
home.packages or environment.systemPackages list
Once thatch is on PATH, wire it into your editor as usual:
cd /path/to/your/project
thatch setup --claude --global # or --cursor
The embedding model still downloads once at first use. Its cache lives in the
per-user cache dir described above, outside the read-only Nix store, so it
survives upgrades. THATCH_MODEL_CACHE overrides the location.
Thatch wires itself up for Claude Code and Cursor. For any other MCP harness, print the server config, paste it into your harness's config, and install the skills where that harness reads them:
thatch setup --mcp-json # print the server config as JSON
thatch setup --skills-only <dir> # install skills into any directory
--mcp-json prints the mcpServers shape (a stdio server that runs
thatch mcp) that Claude Code, Cursor, Gemini CLI, and many other MCP
clients use. Some harnesses use a different key or format; check your
harness's docs.
Include thatch's instructions in your agent's system prompt manually; see
MCP parity for the prompt text.
Thatch gives your agent:
session_search,
session_get, opencode only) and as CLI subcommands (thatch session list/get/transcript/search, JSONL output designed for piping to jq).exit_codes widens the set so terminal failures notify too).
Notifications carry pointer
data plus machine status (check conclusions, exit codes), never external
content.chat.enabled: false in the thatch config (or just the
auto-joining with chat.autoRegister: false)./thatch/defrag (consolidate duplicate memories),
/thatch/extract (drain the extraction queue now), /thatch/hygiene
(tend stale and orphaned memories), /thatch/reflect (persist what
the session learned), /thatch/refine (refine a plan under the
project type's requirements, classifying the project first),
/thatch/self-review (review your own completed work before
submitting it, weighted for reputation and simplicity),
/thatch/peer-review (review another author's change, weighted for
org velocity and sharing the project's persistent memory), and
/thatch/whois (report the session's chat identity) run on demand.
The nudge-backed actions (defrag, extract, hygiene, reflect)
mirror the same behaviors the nudges run on their own schedule; the
rest stand alone. Plus the opencode-only wrap-ups: /thatch/compact and
/thatch/exit run a pre-flight checklist before a compaction or an exit:
the agent flushes pending fact extraction, finishes promised memory
writes, and surfaces todos or follow-ups it never addressed. When the
checklist is clean it greenlights by calling the zero-arg tool for that
command (thatch_compact or thatch_exit) -- and thatch
then triggers the compaction or closes the session (its tab on opencode
2, the whole app on opencode 1 - either way its watches are cancelled).
With items outstanding, the agent lists them and nothing fires -- you
decide when to retry.~/.config/thatch/config.json) that the agent
manages through config_get/config_set -- ask it to change your voice,
quiet notifications entirely, or tune which alerts fire.Plus skills for memory workflows, structured multi-specialist code review, review response, plan refinement, separate evidence and consistency audits for plans, bug-report intake, change and feature walkthroughs, memory verification, knowledge export, and writing tasks (PR descriptions, tickets, PR splitting).
See the user guide for the full tool list, CLI commands, configuration, environment variables, and detailed setup for each host.
The memory tools, prediction and behavior engines, conversation search via
the thatch session CLI, cross-session chat (with stop-hook wake), skills,
and the on-demand actions /thatch/bug-intake, /thatch/defrag,
/thatch/hygiene, /thatch/reflect, /thatch/refine,
/thatch/self-review, and /thatch/peer-review (synced by
thatch setup --claude; the review-mode
commands run the specialist sequence inline, since the coordinator skill is
opencode-only). Not available: the
wrap-up commands (they need the plugin's host action routes),
/thatch/extract and /thatch/whois (they need the opencode plugin's
session identity), live recall/prediction nudges
beyond the hook-based flow, and toast notifications.
The same core set as Claude Code (memory, predictions, behaviors, chat with
stop-hook wake, skills, and the bug-intake/defrag/hygiene/reflect/
refine/self-review/peer-review actions). Cursor
has no file-based slash commands, so the actions surface through MCP prompts
instead. Not available: the wrap-up commands, /thatch/extract,
/thatch/whois, and toast notifications.
Everything is local. The embedding model downloads once from Hugging Face Hub and is cached. No data leaves your machine.
One exception: PR and branch watchers (opencode only) call the GitHub API
through the gh CLI to poll targets you explicitly asked to watch, using
your existing gh authentication; command watchers run local shell commands
in the project directory, reading only their exit codes. Thatch never sees
or stores the gh token, and notifications
carry pointer data plus machine status (check conclusions, exit codes),
never external content - GitHub comment text never enters your context
unless the agent fetches it.
bun install
mise run check # typecheck + bun test + markdownlint (the CI gate)
On Nix, nix develop drops you into a shell with bun, mise, and node already
on PATH -- no system install needed.
Tests never reach outside the sandbox: temp-directory SQLite files, mock embeddings, no network.
Persistent memory for AI coding agents — local embeddings, SQLite stores, zero config. Works with OpenCode (as a plugin), Claude Code (as an MCP server), and Cursor (as an MCP server).
{ "mcpServers": { "jeffober-thatch": { "command": "npx", "args": [ "-y", "@jeffober/[email protected]" ] } }}เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
@jeffober/thatch ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-11-14 Persistent memory for AI coding agents — local embeddings, SQLite stores, zero config. Works with OpenCode (as a plugin), Claude Code (as an MCP server), and Cursor (as an MCP server).