Thatch logo

Thatch

by @jeffober

Local, persistent memory for coding agents using SQLite and embeddings, with session search, behavior rules, chat, and project-aware workflows.

Install Thatch

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "jeffober-thatch": {
      "command": "npx",
      "args": [
        "-y",
        "@jeffober/thatch"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio jeffober-thatch -- npx -y @jeffober/thatch

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y @jeffober/thatch

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

@jeffober/thatch gives coding agents persistent project and shared memory through local SQLite stores and embeddings. It supports OpenCode as a plugin, and Claude Code, Cursor, or another MCP harness through its server setup. Use it when agents need to retain architecture, conventions, preferences, and operational knowledge across sessions without cloud services. It also adds conversation search, automatic extraction, cross-session messaging, watchers, and workflow skills.

Use cases

  • Retain project architecture and conventions across coding sessions
  • Search previous OpenCode conversations and tool activity
  • Seed a new agent with an initial project memory map
  • Coordinate multiple agent sessions through local chat
  • Watch GitHub branches, pull requests, or local commands

Key features

  • SQLite-backed project and global memory
  • Local embedding search with automatic fact extraction
  • Preference prediction and behavior rules
  • Conversation search with JSONL CLI output
  • Cross-session chat and event watchers
  • Coding workflow skills and notifications

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

12/12 checks healthy over the last 50d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev · @jeffober/thatch (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars7Stargazers on the source repository.
npm downloads2.5kPackage downloads in the last 30 days.
Last commit11d agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.

How Thatch works

What @jeffober/thatch does

@jeffober/thatch gives AI coding agents a durable memory layer that stays on the local machine. It stores knowledge in SQLite with local embeddings, using one database for each project and a shared global store. Agents can save, search, and recall information from earlier sessions, including architecture decisions, coding conventions, known issues, and user preferences.

The package also models recurring decisions and operational behavior. Its prediction engine can apply strong preference predictions quietly, while uncertain cases are surfaced. The behavior engine records rules such as what to do when a particular situation occurs. Session activity can be mined automatically for durable facts, reducing the need for an agent to explicitly save every useful detail.

How it works

The embedding model is downloaded once from Hugging Face Hub and cached for later use. Data remains local; the documented exception is polling GitHub pull requests or branches through the user's existing gh authentication when those watchers are explicitly configured. Watcher notifications contain pointers and machine status rather than copied external content.

On MCP hosts, sessions share an embedding model for each database through a background daemon. The daemon starts automatically and exits after 30 minutes without activity. Deleted memories are protected by tombstones, which prevent the same content from being recreated until the tombstone is cleared.

Thatch can search prior OpenCode conversations by substring or regular expression and return complete messages, including tool inputs and outputs. Its CLI exposes session listing, retrieval, transcript, and search commands with JSONL output suitable for processing with jq.

Setup and configuration

OpenCode users add @jeffober/thatch to opencode.jsonc as a plugin. OpenCode 2.1 or newer is required. Claude Code users can install it through the sysread/thatch marketplace, while older Claude Code versions or installations that disable mods can use the global npm package with thatch setup --claude --hooks. Node.js 22.13 or newer, or Bun 1.4.2 or newer, must be available for the Claude Code and Cursor paths.

Cursor users install the package globally and run thatch setup --cursor or thatch setup --global. Other MCP hosts can obtain a server configuration with thatch setup --mcp-json. Run thatch prime from a project directory to create an initial codebase map and seed its memory. Nix users can run the flake, use its package or module, and avoid a separate global runtime installation.

Tools and capabilities

  • Persistent project and global memory with save, search, recall, and guarded deletion.
  • Statistical preference prediction and automatically triggered behavior rules.
  • Extraction of durable facts from tool activity.
  • Cross-session chat with assigned session names, broadcasts, queued mail, and stale-session handling.
  • GitHub PR, branch, and local-command watchers.
  • Slash-command workflows for extraction, reflection, review, refinement, hygiene, defragmentation, bug intake, and session wrap-up.
  • Desktop and spoken notifications on macOS and Linux, with a journal of delivery attempts.
  • Skills for memory workflows, specialist code review, planning audits, bug intake, walkthroughs, knowledge export, and writing tasks.

Limitations and notes

OpenCode version 1 is not supported. OpenCode can unload inactive locations after roughly 60 minutes without project-directory activity, which can delay chat delivery until the location reloads. The embedding model is local, but its initial download requires access to Hugging Face Hub. GitHub watchers require existing gh authentication and only poll targets selected by the user. Feature availability varies by host; the project maintains an MCP parity reference.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Thatch

@jeffober/thatch is an MCP server that connects coding agents to local SQLite memory stores and locally cached embeddings. Its main tools support saving, searching, and recalling knowledge, extracting facts from tool activity, searching conversations, coordinating sessions through chat, and watching selected GitHub or local targets.

Install it through the OpenCode plugin configuration, the Claude Code marketplace, or the global npm package for Cursor and other MCP hosts. For a generic host, run `thatch setup --mcp-json` to print the server configuration. Run `thatch prime` in each project after setup.

Yes, @jeffober/thatch works with Cursor through its MCP setup. Install the package globally, then run `thatch setup --cursor` or `thatch setup --global`. Node.js 22.13 or newer, or Bun 1.4.2 or newer, must be available on the path.

No, its memory and embeddings run locally and it does not require an API key or cloud service. The embedding model is downloaded once and cached. GitHub watchers use the existing `gh` authentication to poll explicitly selected pull requests or branches.

Run `thatch prime` from the project directory after configuring the host. The command builds an initial map of the codebase and seeds the project's memory store. The embedding model is downloaded on first use and then cached per user.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewThatch AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/jeffober-thatch?style=directory)](https://allmcps.com/mcp/jeffober-thatch)
HTML Embed
<a href="https://allmcps.com/mcp/jeffober-thatch"><img src="https://allmcps.com/api/badge/jeffober-thatch?style=directory" alt="Thatch on AllMCPs" /></a>