Repolode
ramakay

ramakay/claude-self-reflect

A local Rust tool that gives Claude Code persistent memory of past conversations via semantic search, exposed as an MCP server.

Stars
230
Forks
29
Open issues
11
Last commit
5 days ago

What is it?

Claude Self-Reflect is a memory layer for Claude Code. It indexes past conversation transcripts from ~/.claude/projects and makes them searchable, so solutions, design decisions, and debugging history from earlier sessions can be recalled when relevant. It ships as a single Rust binary that stores chunks, embeddings, and enrichment state in SQLite and uses an HNSW index for vector search, with local FastEmbed embeddings. No database server, container, or API key is required for the core search.

The tool registers an MCP server with Claude Code and installs six lifecycle hooks (SessionStart, UserPromptSubmit, PostToolUse, Stop, PreCompact, SessionEnd) that inject relevant past context automatically. It exposes 15 MCP tools for explicit queries, including search by file, search by concept, timeline and recent-work views, full conversation retrieval, and a code graph that links functions or files to the conversations that shaped them. Installation is via a shell script or npm, and activation of hooks and conversation import happens only after an explicit setup step.

Optional AI narratives summarize conversations into searchable briefings by running the Claude CLI, and can be disabled with an environment variable.

Key features

  • 01Semantic search over past Claude Code conversations using local embeddings
  • 02Single Rust binary with SQLite storage and HNSW vector index, no external services
  • 03Six lifecycle hooks that inject relevant past context automatically
  • 0415 MCP tools for file, concept, timeline and conversation queries
  • 05Code graph linking functions and files to the conversations that shaped them
  • 06Consent-based setup that installs MCP registration and hooks only when activated

Use cases

  • Recalling how a bug was fixed or a component was designed in an earlier Claude Code session
  • Finding the conversations that led to a particular file or function's current code
  • Keeping long-running projects' decisions available across many sessions

Quick start

  1. 1

    Run the official install script from the README (downloads binary, then asks before activating)

  2. 2

    Install via npm (downloads binary only, no activation)

    npm install -g claude-self-reflect
  3. 3

    Activate setup (registers MCP server, installs hooks, imports conversations)

    csr-engine setup
  4. 4

    Restart Claude Code

Things to know

  • Prebuilt binaries cover macOS Apple Silicon, Linux x86_64/WSL and Linux ARM64; Intel Mac requires building from source.
  • AI narratives are optional but use your Claude subscription via claude -p and add token usage.

In collections

Topics

FAQ

What is claude-self-reflect?
A local Rust tool that gives Claude Code persistent memory of past conversations via semantic search, exposed as an MCP server. Claude Self-Reflect is a memory layer for Claude Code. It indexes past conversation transcripts from ~/.claude/projects and makes them searchable, so solutions, design decisions, and debugging history from earlier sessions can be recalled when relevant. It ships as a single Rust binary that stores chunks, embeddings, and enrichment state in SQLite and uses an HNSW index for vector search, with local FastEmbed embeddings. No database server, container, or API key is required for the core search.
Is claude-self-reflect free to use? What license does it have?
claude-self-reflect is open source under the MIT license. Check the license terms before using it in commercial products.
Is claude-self-reflect still maintained?
Actively maintained. The last commit to claude-self-reflect was on Nov 2, 2026.
What can I use claude-self-reflect for?
Recalling how a bug was fixed or a component was designed in an earlier Claude Code session Finding the conversations that led to a particular file or function's current code Keeping long-running projects' decisions available across many sessions
How do I install claude-self-reflect?
Run the official install script from the README (downloads binary, then asks before activating) Install via npm (downloads binary only, no activation): npm install -g claude-self-reflect Activate setup (registers MCP server, installs hooks, imports conversations): csr-engine setup Restart Claude Code
Where can I get claude-self-reflect?
The source code and installation instructions are on GitHub: https://github.com/ramakay/claude-self-reflect

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects