# @jeffober/thatch [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/sysread/thatch  
**GitHub Stars:** 7  
**npm Downloads (last month):** 2503  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/jeffober-thatch

## Description
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).

## Claude Desktop Quick Installation
Install path inferred — verify against the README before running it. Uses `npx` (confidence: medium):

```json
"mcpServers": {
  "thatch": {
    "command": "npx",
    "args": ["-y","@jeffober/thatch"]
  }
}
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/jeffober-thatch/readme_

