SuperAPI AI Directory

lore

Local semantic search across Claude Code conversations with hybrid vector and keyword search, background indexing and per-project selection.

Open website

About this tool

Purpose

lore is a semantic search MCP server for AI coding sessions, used to retrieve your past conversations with Claude Code and OpenAI Codex CLI. The core problem it solves is this: as usage grows over time, hundreds of sessions accumulate locally (architecture decisions, debugging processes, code reviews, design explorations, etc.), but there is no way to search these records, and questions like "what approach did the auth middleware use back then" cannot be answered.

Main Capabilities

  • Hybrid search (vector + keyword): Combines multilingual-e5-small embeddings with FTS5/BM25, fusing rankings via Reciprocal Rank Fusion, so results can be matched both by semantics and by exact terms.
  • Multi-agent support: The same database simultaneously indexes Claude Code's ~/.claude/projects/ and Codex CLI's ~/.codex/sessions/. Codex sessions are grouped by the cwd in session_meta and presented as virtual projects in the form codex-<path>, allowing combined searches or filtering to just one agent.
  • Fully local, zero API keys: Embeddings are run by ONNX Runtime, storage uses sqlite-vec, data never leaves the device, and there are no additional dependencies beyond Node.js.
  • Automatic indexing: The SessionEnd hook automatically indexes all new sessions in the background when a session ends, with no manual trigger needed.
  • Background indexing: A manual indexing trigger returns immediately, allowing you to monitor progress while continuing to work, and to search the portion that has already been indexed.
  • Index by default, exclusion optional: All projects are indexed automatically; projects you do not need can be excluded, with no registration required.
  • Session-aware chunking: Splits by logical turns (user question + complete assistant response chain), rather than arbitrary token windows, correctly handling tool call chains, thinking blocks, and multi-step interactions.
  • Multilingual: Supports Korean, Japanese, Chinese, English, and more than 100 other languages, with CJK-specific token estimation ensuring accurate chunking.

How to Use

After adding lore to Claude Code or OpenAI Codex CLI, the AI can directly call its tools:

  1. First-time setup: Call index() to automatically scan all projects, running in the background.
  2. Search: Directly ask about anything from past conversations.
  3. Exclude (optional): Hide noisy projects you do not need.

Storage location: a single SQLite file ~/.lore/lore.db, using WAL mode to support concurrent reads. Configuration: project exclusions are saved in ~/.lore/config.json.

Use Cases

  • Finding architecture decisions or technical approaches discussed in the past for a given project.
  • Recalling the context of debugging sessions, code reviews, and design explorations.
  • When using both Claude Code and Codex CLI, needing unified retrieval of history across agents.
  • For developers who require data localization and do not want conversation content uploaded to the cloud.

Tech Stack and Limitations

  • Based on the Model Context Protocol SDK (stdio transport), @huggingface/transformers' multilingual-e5-small (INT8), better-sqlite3 + sqlite-vec embedded vector database, and Reciprocal Rank Fusion hybrid ranking.
  • Performance is measured on Apple Silicon (M series); performance data for other platforms is not yet available.
  • Common issue handling: when "No sessions found" appears, you can run manage_projects and choose action list to view available projects; lock files left by an interrupted index are automatically cleaned up on the next run based on the PID; if a rebuild is needed, you can delete ~/.lore/lore.db and re-index, and the source data in ~/.claude/projects/ will not be modified.
  • Fees, pricing, and platform support scope: not yet available.