# claude-mem-lite [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/sdsrss/claude-mem-lite  
**GitHub Stars:** 70  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/claude-mem-lite

## Description
Persistent long-term memory for Claude Code via MCP — captures coding decisions, bugfixes, and context across sessions. Hybrid FTS5 + TF-IDF search with episode batching. Single SQLite DB, no external services. Alternative to claude-mem with 600x lower cost.

## Tools
Capabilities this server exposes over MCP:

- **mem_search** — FTS5 full-text search with BM25 ranking. Filters by type, project, date range, importance level.
- **mem_search_feedback** — Record sparse relevance labels for results from an existing `mem_search` Search ID.
- **mem_recent** — Show most recent observations, ordered by time. Quick snapshot of latest activity.
- **mem_recall** — Recall observations related to a file. Use before editing to surface past bugfixes and context.
- **mem_timeline** — Browse observations chronologically around an anchor point.
- **mem_get** — Retrieve full details for specific observation IDs (includes importance and related_ids).
- **mem_save** — Manually save a memory/observation. Accepts `closes_deferred` array for transactional closure of deferred work.
- **mem_defer** — Mark work for a future session (v2.70+). First-class carry-forward signal, surfaced in SessionStart `### Deferred Work` block.
- **mem_defer_list** — List open deferred items for the current project.
- **mem_defer_drop** — Drop a deferred item without fixing it; requires a `reason` for the audit trail.
- **mem_update** — Edit an observation in place.
- **mem_stats** — Counts, type distribution, daily activity.
- **mem_delete** — Preview / confirm workflow, FTS5 cleanup.
- **mem_compress** — Roll up old low-value observations (preview default; `--execute` to apply).
- **mem_maintain** — dedup / decay / cleanup / vacuum (`scan` previews, `execute` applies).
- **mem_optimize** — LLM-powered re-enrich / normalize / cluster-merge (preview default; `--run` to apply).
- **mem_export** — JSON / JSONL dump, filters by project, type, date.
- **mem_fts_check** — rebuild>
- **mem_browse** — Tier-grouped dashboard (working / active / archive).

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/sdsrss/claude-mem-lite), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Add to your MCP client:

```sh
/plugin marketplace add sdsrss/claude-mem-lite
```

2. Install:

```sh
git clone https://github.com/sdsrss/claude-mem-lite.git
```

3. Install:

```sh
node install.mjs install
```

4. Install:

```sh
node install.mjs install              # Install and configure
```

## Documentation

## What claude-mem-lite does

claude-mem-lite adds persistent memory to Claude Code. Its hooks capture observations from the coding lifecycle, including decisions, changes, bug fixes, prompts, file reads, and session reports. The resulting records remain available across sessions and can be scoped to a project.

Observations are classified as decisions, bug fixes, features, refactors, discoveries, or changes. Each record can receive a routine, notable, or critical importance level, and related records may be linked when they involve overlapping files. Session startup can include recent project context, while editing a file or encountering a command error can trigger relevant recall.

Storage uses one local SQLite database under the claude-mem-lite data directory. The design avoids external services and uses Node.js rather than a separate vector database or long-running worker process.

## How it works

Claude Code hooks observe activity at session start, before compaction, before and after tools, after tool failures, when a user prompt arrives, and when a session stops. Related file operations are grouped into episodes, typically several operations at a time, before an optional model-based extraction step. This reduces repeated model calls and lets the system filter low-value activity before processing it.

Search uses SQLite FTS5 with BM25 ranking. Query expansion covers synonyms, abbreviations, concept relationships, and cross-language mappings; a rescue pass can broaden restrictive searches, and deep search can combine multiple rewritten queries. Timeline and file-oriented retrieval provide alternatives to keyword lookup.

When model processing fails, some error-fixing or short activity records can still be retained through fallback handling. Low-signal episodes may be discarded unless `CLAUDE_MEM_KEEP_LOW_SIGNAL=1` is set.

## Setup and configuration

The project supports installation through the Claude Code plugin command or through `npx`. Its intended client is Claude Code, where the MCP server and hook configuration work together to provide automatic capture. The data directory is hidden in the user home directory and can migrate data from the earlier claude-mem location.

No external service or separate database service is required. The server uses Node.js and a small set of npm packages. The `claude-mem-lite doctor` command can warn when the Claude CLI used for model-assisted processing cannot be resolved.

## Tools and capabilities

The MCP tool set covers the complete memory lifecycle:

- Search and retrieval: `mem_search`, `mem_recent`, `mem_recall`, `mem_timeline`, and `mem_get`.
- Recording and deferred work: `mem_save`, `mem_defer`, `mem_defer_list`, `mem_defer_drop`, and `mem_update`.
- Inspection: `mem_stats` and `mem_browse`.
- Maintenance: `mem_delete`, `mem_compress`, `mem_maintain`, `mem_optimize`, and `mem_fts_check`.
- Export: `mem_export` for JSON or JSONL output.
- Search feedback: `mem_search_feedback` records sparse relevance labels for an existing search.

Search can filter by observation type, project, date range, and importance. Deferred items can be carried into a later session, and dropping one requires a reason for the audit trail. Destructive maintenance operations use preview-first flows, with explicit execution options for applying changes. `mem_export` supports project, type, and date filters.

## Limitations and notes

The automatic capture workflow is designed for Claude Code rather than general-purpose agent applications. Other MCP clients may invoke the exposed tools over a standard MCP connection, but the hook-driven capture and session-context behavior depend on Claude Code.

Model-assisted episode processing uses Haiku-sized per-episode calls when enabled. Cost and reduction figures described by the project are architecture estimates rather than measured end-to-end benchmarks. A command that Claude Code reports as failed is excluded from an episode, although certain commands that exit successfully while printing an error can still produce fallback activity records.

The former TF-IDF vector search arm was removed after evaluation showed it reduced results; FTS5 retrieval and query expansion remain the primary search path.

_Full upstream README: https://allmcps.com/mcp/claude-mem-lite/readme_

