Back to MCP Servers

Rekindle

Session continuity engine that solves session orientation. Boot reports with gap detection and 100-point scoring, structured end-session capture with typed continuity records, and BM25 memory search. 7 tools, local SQLite + FTS5, zero API keys. `npx rekindle`

knowledge-memorysqliteapi
By Skitchy
42Updated 2 weeks agoTypeScriptMIT

Installation

npx rekindle

Configuration

{
  "mcpServers": {
    "rekindle": {
      "command": "npx",
      "args": ["-y", "rekindle"]
    }
  }
}

How to use

  1. Run the installation command above (if needed)
  2. Open your Claude Code settings file (~/.claude/settings.json)
  3. Add the configuration to the mcpServers section
  4. Restart Claude Code to apply changes
<div align="center">

Rekindle

npm tests license Glama score

For Claude Code users who lose time re-explaining project context every session.

npx rekindle init

Your AI forgets everything between sessions. Rekindle fixes that.

</div>

Rekindle init demo

Rekindle is an MCP continuity engine that solves session orientation, not just storage. Orient at session start, capture at session end, survive mid-session compaction. All local, all SQLite, zero API keys.

v0.3.3 — version-consistent MCP metadata and package documentation, on top of v0.3.2's one-command session-start delivery installer. Release notes

Quick Start

Requires Node.js 20 or newer.

npx rekindle init

This creates .rekindle/ in your project with a SQLite database, identity template, captures directory, and transcript directory. Then add the MCP server config for your client:

<details open> <summary><strong>Claude Code</strong></summary>

Add to ~/.claude.json:

{
  "mcpServers": {
    "rekindle": {
      "command": "npx",
      "args": ["-y", "rekindle"]
    }
  }
}

Enable PreCompact protection (captures context before mid-session compaction):

npx rekindle setup-hooks

Enable session-start orientation delivery — the budgeted orientation packet arrives automatically at startup, resume, /clear, and /compact, so the model re-orients at every context boundary without being asked:

npx rekindle setup-delivery

Both hooks are opt-in; plain init never installs either. npx rekindle init --with-hooks --with-delivery does everything in one line.

</details> <details> <summary><strong>Claude Desktop</strong></summary>

Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):

{
  "mcpServers": {
    "rekindle": {
      "command": "npx",
      "args": ["-y", "rekindle"]
    }
  }
}
</details> <details> <summary><strong>Cursor</strong></summary>

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "rekindle": {
      "command": "npx",
      "args": ["-y", "rekindle"]
    }
  }
}
</details>

Then fill in .rekindle/identity.md and paste the boot instructions into your project's CLAUDE.md.

Session 1 stores. Session 2 remembers. Session 10 anticipates.


The Problem (43 Sessions of Data)

Over 43 sessions, we measured what an AI assistant failed to load at session start:

MetricValue
Sessions analyzed43
Clean boots (all context loaded)33%
High-signal failures (5+ gaps)26%
Total retrieval failures173

Existing memory tools (Mem0, Letta, Zep) optimize for retrieval accuracy: can the AI find what it stored? That's necessary but not sufficient. None of them address whether the AI loaded the right context for this session, or whether it can detect what it missed.

Rekindle solves session orientation: loading identity, recent context, memory health, and missing-context warnings before the assistant starts work.

See docs/gap-analysis.md for the full research dataset.


What It Does

Boot: orient at session start

boot_report runs an orientation pipeline before any work begins:

boot_report
  +-- Read identity document (who am I working with?)
  +-- Scan memory stats (what do I know?)
  +-- Find latest checkpoint (where did we leave off?)
  +-- Read last transcript (what actually happened?)
  +-- Surface open loops (what needs follow-up?)
  +-- Surface PreCompact captures (what survived compaction?)
  +-- Detect gaps (what am I missing?)
  +-- Calculate orientation score (how oriented am I?)
  --> "Carrying forward: [context loaded, gaps identified, score: 80/100]"

Survive the Long Middle: PreCompact capture (v0.3)

Mid-session compaction destroys reasoning chains, failed approaches, relational texture, and tone. The PreCompact hook fires automatically before compaction and saves what would otherwise be lost:

PreCompact hook fires
  +-- Parse JSONL transcript (last N messages)
  +-- Write raw Markdown capture (.rekindle/captures/)
  +-- Write structured JSON snapshot (decisions, open loops, files)
  +-- Update manifest for cheap listing
  --> boot_report surfaces captures on next session start
  --> end_session warns if captures exist but weren't reviewed

Three read modes control token cost:

  • summary — one paragraph, cheap
  • structured — decisions/loops/warnings, moderate
  • raw — full transcript excerpt, expensive (only when needed)

Capture: close the loop at session end

end_session stores structured continuity records — not just a summary:

FieldWhat it captures
checkpointWhere we left off (required)
decisionsWhat was decided and why
open_loopsUnresolved tasks or questions
constraintsBoundaries that must not be violated
relational_deltaWhat changed in the working relationship
next_session_focusWhere to resume next session
preferencesNew user preferences learned
warningsThings next session should watch for

All records stored with type, source, and session_id metadata. Next boot_report loads the checkpoint automatically.

Between sessions: search and manage

ToolDescription
store_memoryStore with content, category, importance (1-10), and project scope
search_memoryFull-text search with BM25 ranking, boosted by importance
list_memoriesBrowse memories, newest first. Filter by category or project
delete_memoryDelete by ID
update_memoryUpdate content, category, or importance
list_capturesList PreCompact captures (optionally filter by session)
read_captureRead a capture in summary, structured, or raw mode
capture_nowManually capture current session context on demand

Categories: preference lesson context relationship general


Why not just CLAUDE.md?

A static file is passive. Your AI reads it, but it can't search it, rank it, track what's been retrieved, or tell you what's missing. Rekindle adds:

  • Search — full-text with importance-weighted ranking
  • Structure — category and project scoping across memories
  • Orientation — proactive context loading at boot, not just on-demand retrieval
  • Gap detection — flags missing identity, empty categories, stale data
  • Scoring — transparent checklist so you know how oriented the AI is
  • Session capture — structured close with checkpoints, decisions, and open loops
  • Compaction survival — PreCompact captures preserve what summaries flatten

Release Highlights

v0.3.3

  • Version-consistent protocol metadata — the MCP initialize response derives its version from the shipped package metadata, preventing release-version drift
  • Package-page accuracy — the README shipped to npm identifies the current release before the tag and package are created
  • 148 automated tests, plus a packed-artifact check that compares MCP metadata to the installed package version

v0.3.2

  • One-command delivery installnpx rekindle setup-delivery (or init --with-delivery) configures the SessionStart hook opt-in: idempotent, preserves other tools' hooks, refuses corrupted settings files
  • 147 automated tests

v0.3.1 — "Five Measured Gates"

  • Session-start deliveryrekindle session-start emits a budgeted orientation packet via the SessionStart hook at startup, resume, /clear, and /compact
  • Budgeted packets, truthful receipts — packets cap at 8,000 valid UTF-8 bytes with an in-packet truncation marker; receipts attest emission only and never claim model visibility
  • Desktop-safe storage — storage root never derives from the spawn point (Claude Desktop spawns MCP servers at /); explicit resolution order, fail-loud
  • Dual-channel guidance — workflow guidance rides both tool descriptions and MCP instructions, drift structurally impossible
  • Cursor adaptersession-start --client cursor with whitelist stdin parsing; email and workspace paths never reach receipts
  • Measured, not assumed — every claim above is backed by a published measurement (evidence, spike results)

v0.3.0 — "Survive the Long Middle" added the PreCompact capture system, open loops, and review tracking — v0.3.0 release notes


CLI Commands

CommandDescription
npx rekindle initSet up .rekindle/ in current directory
npx rekindle init --globalSet up in home directory
npx rekindle init --with-hooksInit + configure PreCompact capture hook
npx rekindle init --with-deliveryInit + configure SessionStart delivery hook
npx rekindle setup-hooksConfigure PreCompact capture hook (standalone)
npx rekindle setup-deliveryConfigure SessionStart delivery hook (standalone)
npx rekindle session-startEmit budgeted orientation packet (SessionStart hook)
npx rekindle session-start --client cursorSame, in Cursor's hook response shape
npx rekindle precompact-captureCapture context before compaction (hook)
npx rekindle capture-nowManually capture current session context
npx rekindleStart MCP server (used by Claude Code)

Install from Source

git clone https://github.com/Skitchy/rekindle.git
cd rekindle
npm install
npm run build
node dist/init/cli.js init
<details> <summary><strong>PreCompact Hook Configuration</strong></summary>

The setup-hooks command writes this to .claude/settings.local.json:

{
  "hooks": {
    "PreCompact": [
      {
        "matcher": "auto",
        "hooks": [
          {
            "type": "command",
            "command": "npx rekindle precompact-capture",
            "timeout": 60
          }
        ]
      },
      {
        "matcher": "manual",
        "hooks": [
          {
            "type": "command",
            "command": "npx rekindle precompact-capture",
            "timeout": 60
          }
        ]
      }
    ]
  }
}

The hook receives session context on stdin (session_id, transcript_path, cwd, hook_event_name) and writes captures to .rekindle/captures/.

VariableDefaultDescription
REKINDLE_PRECOMPACT_MAX_MESSAGES80Max messages to capture
REKINDLE_PRECOMPACT_MAX_CHARS120000Max characters to capture
REKINDLE_BASE_DIRResolved (see below)Base directory for .rekindle/

Storage root resolution. All Rekindle entry points (server, PreCompact hook) resolve the directory holding .rekindle/ through one rule, in order:

  1. REKINDLE_BASE_DIR, if set — explicit always wins
  2. Derived from REKINDLE_DB_PATH, when it points at a canonical <base>/.rekindle/db/ layout
  3. An existing .rekindle/ in the current working directory (never when cwd is the filesystem root)
  4. An existing .rekindle/ in your home directory
  5. Otherwise: your home directory — never the spawn point

Rules 3 and 5 exist because some hosts (e.g. Claude Desktop) spawn MCP servers at cwd=/; a spawn point is not a storage location. If storage cannot be created, the server exits with a message naming the fix instead of a stack trace.

</details> <details> <summary><strong>Pr

View source on GitHub