Claude Mem Lite logo

Claude Mem Lite

Persistent Claude Code memory with automatic hook capture, local SQLite storage, and FTS5 search across coding sessions.

Install Claude Mem Lite

Run the project’s own setup commands, in order.

Setup steps from the project

claude-mem-lite installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Add to your MCP client
    /plugin marketplace add sdsrss/claude-mem-lite
    
  2. 2. Install
    git clone https://github.com/sdsrss/claude-mem-lite.git
    
  3. 3. Install
    node install.mjs install
    
  4. 4. Install
    node install.mjs install              # Install and configure
    

Overview

claude-mem-lite gives Claude Code persistent cross-session memory through an MCP server and lifecycle hooks. It captures coding decisions, bug fixes, prompts, file activity, and session context into a single local SQLite database, then retrieves observations with FTS5 BM25 search, query expansion, timelines, and file-focused recall. Episode batching groups related operations before optional LLM encoding, while background hooks keep capture asynchronous. Reach for it when Claude Code needs automatic project memory without external services or a separate vector database.

Use cases

  • Recall prior bug fixes before editing a file
  • Capture coding decisions across Claude Code sessions
  • Search project history by type, date, or importance
  • Carry unfinished work into a future session
  • Inspect, export, and maintain local observations

Key features

  • Automatic capture through seven Claude Code lifecycle hooks
  • Local SQLite storage with no external services
  • FTS5 BM25 search with synonym and query expansion
  • Episode batching for related coding operations
  • File recall, timelines, deferred work, and session context
  • Preview-first cleanup, compression, optimization, and export tools

Tools19

What Claude Mem Lite lets your agent do. Expand a tool for its parameters.

Self-reported~384 tokens of context

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.

13/13 checks healthy over the last 33d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 18d ago via OSV.dev

Adoption & maintenance

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

GitHub stars70Stargazers on the source repository.
Last commit7d agoMost recent push to the default branch.
Tools exposed19Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Claude Mem Lite works

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.

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 Claude Mem Lite

claude-mem-lite is an MCP server that connects Claude Code’s lifecycle hooks to a local SQLite memory store. Its main tools capture and retrieve coding observations through `mem_save`, `mem_search`, `mem_recall`, `mem_recent`, `mem_timeline`, and `mem_get`, while maintenance tools manage, export, and optimize stored project context across sessions.

Install it through the Claude Code plugin command or with `npx`. The project is intended to run with Claude Code hooks, which provide automatic capture alongside the MCP tools. It uses Node.js and a local SQLite database, so no external service or separate database setup is required.

Cursor can connect to an MCP server through its general MCP support, but claude-mem-lite’s automatic capture and session features are designed for Claude Code hooks. In Cursor, the exposed MCP tools may be available while Claude Code-specific lifecycle capture and injected session context are not part of the workflow.

claude-mem-lite stores memories in a single SQLite database under the hidden `~/.claude-mem-lite/` directory. The data directory can automatically migrate data from the earlier `~/.claude-mem/` location, keeping storage local rather than relying on an external database or hosted service.

Use `mem_search` for FTS5 full-text search with BM25 ranking and filters for type, project, date range, and importance. Use `mem_recall` for observations related to a file, `mem_timeline` for chronological context, and `mem_get` when you need complete details for selected observation IDs.

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 PreviewClaude Mem Lite AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/claude-mem-lite?style=directory)](https://allmcps.com/mcp/claude-mem-lite)
HTML Embed
<a href="https://allmcps.com/mcp/claude-mem-lite"><img src="https://allmcps.com/api/badge/claude-mem-lite?style=directory" alt="Claude Mem Lite on AllMCPs" /></a>