Lore logo

Lore

by hyunjae-labs

Search Claude Code and OpenAI Codex CLI conversations locally with hybrid semantic and keyword retrieval.

Install Lore

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "hyunjae-labs-lore": {
      "command": "npx",
      "args": [
        "-y",
        "getlore"
      ],
      "env": {
        "LORE_DIR": "YOUR_VALUE_HERE",
        "LORE_DB": "YOUR_VALUE_HERE",
        "CLAUDE_PROJECTS_DIR": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

The install command didn't complete successfully in our automated test.

npx -y getlore

t (node:events:519:28) npm error at TLSSocket.emit (node:domain:489:12) npm error at addChunk (node:internal/streams/readable:561:12) npm error npm error Node.js v22.23.4 npm notice npm notice New major version of npm available! 10.9.9 -> 12.2.3 npm notice Changelog: https://github.com/npm/cli/releases/tag/v12.2.3 npm notice To update run: npm install -g npm@12.2.3 npm notice npm error A complete log of this run can be found in: /home/user/.npm/_logs/2026-11-18T16_02_14_809Z-debug-0.log

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

lore indexes Claude Code and OpenAI Codex CLI conversation files into a local SQLite database. It combines multilingual embeddings with FTS5/BM25 keyword search using Reciprocal Rank Fusion, and supports background indexing, project exclusions, session browsing, and context expansion. Use it when you need to retrieve decisions, debugging discussions, or other details from past coding sessions without sending data to a cloud service.

Use cases

  • Search past coding conversations by meaning or exact terms
  • Browse indexed sessions for a specific project
  • Expand search results with surrounding conversation context
  • Exclude projects from automatic indexing
  • Monitor or rebuild background indexing

Key features

  • Hybrid vector and keyword search
  • Claude Code and Codex CLI session indexing
  • Local ONNX embeddings and SQLite storage
  • Background and automatic session-end indexing
  • Project inclusion and exclusion management
  • Conversation-aware multilingual chunking

Tools6

What Lore lets your agent do. Expand a tool for its parameters.

Self-reported~100 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.

28/28 checks healthy over the last 113d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev · getlore (npm)

Adoption & maintenance

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

GitHub stars11Stargazers on the source repository.
npm downloads108Package downloads in the last 30 days.
Last commit6mo agoMost recent push to the default branch.
Install checkInconclusiveInstall command did not finish in our automated test.
Tools exposed6Callable tools this server registers over MCP.
Directory activity5 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

lore

License: MIT TypeScript lore MCP server

Semantic search across your Claude Code and OpenAI Codex CLI conversations. Find anything you've ever discussed -- across all projects, all sessions, any branch, any agent.

lore MCP server

Features

  • Hybrid search (vector + keyword) Combines multilingual-e5-small embeddings with FTS5/BM25 via Reciprocal Rank Fusion. Finds results by meaning and exact terms.

  • Multi-agent: Claude Code + Codex CLI Indexes both ~/.claude/projects/ (Claude Code) and ~/.codex/sessions/ (OpenAI Codex CLI) in the same DB. Codex sessions are grouped by cwd from session_meta, surfaced as codex-<path> virtual projects so you can search them together or filter to one agent.

  • Fully local, zero API keys Everything runs on your machine. ONNX Runtime for embedding, sqlite-vec for storage. No data leaves your device.

  • Auto-index on session end A SessionEnd hook automatically indexes all new sessions in the background. No manual triggers needed.

  • Background indexing Manual index triggers return instantly. Monitor progress while you keep working. Search what's already indexed while the rest catches up.

  • Opt-out by default All projects are indexed automatically. Exclude the ones you don't want. No registration needed.

  • Conversation-aware chunking Splits by logical turns (user question + full assistant response chain), not arbitrary token windows. Handles tool-use chains, thinking blocks, and multi-step interactions correctly.

  • 100+ languages Korean, Japanese, Chinese, English, and 90+ more. CJK-aware token estimation for accurate chunking.

Quick Start

Add to Claude Code

bash
# No install needed — always runs latest version
claude mcp add -s user lore -- npx getlore

# Or for a single project only
claude mcp add -s project lore -- npx getlore

Add to OpenAI Codex CLI

bash
# No install needed
codex mcp add lore -- npx getlore
Alternative: global install (faster startup, works offline)
Terminal
npm install -g getlore

# Then register with your tool:
claude mcp add -s user lore -- getlore   # Claude Code
codex mcp add lore -- getlore            # Codex CLI

# Manage your install:
getlore --version   # Check installed version
getlore update      # Update to latest

Usage

Once connected, the AI can use lore's tools directly:

Code
You: "What did we discuss about auth refactoring last week?"

Claude: [calls lore search] Found 3 relevant conversations...
        In your "my-webapp" project on March 15, you decided to...

First time setup:

  1. Index -- index() scans all projects automatically, runs in background
  2. Search -- ask anything about past conversations
  3. Exclude (optional) -- hide noisy projects you don't care about

Tools

ToolPurpose
manage_projectsExclude/include projects from indexing (opt-out model)
indexStart background indexing. All non-excluded projects. Modes: incremental (default), rebuild, cancel
statusCheck indexing progress, ETA, skip reasons, DB health
searchSemantic + keyword search across conversations
get_contextExpand search results with surrounding conversation
list_sessionsBrowse indexed sessions by project

Why This Exists

Claude Code stores every conversation as a JSONL transcript in ~/.claude/projects/, and OpenAI Codex CLI stores its rollouts in ~/.codex/sessions/YYYY/MM/DD/. After a few weeks, you have hundreds of sessions across dozens of projects, often spread across both agents -- discussions about architecture decisions, debugging sessions, code reviews, and design explorations.

But there's no way to search through them. You can't ask "what approach did we take for the auth middleware?" or "which project had that database migration discussion?"

Existing tools either require cloud APIs, spawn zombie processes, or treat conversations as generic documents. lore is purpose-built for AI coding sessions: it understands turn boundaries, tool-use chains, and thinking blocks, and parses both Claude Code and Codex JSONL formats natively. It runs entirely locally with zero dependencies beyond Node.js.

How It Works

Code
~/.claude/projects/*/*.jsonl     ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl
        \                                       /
         \                                     /
          JSONL Parser (Claude Code + Codex formats, skips noise)
                              |
          Turn-pair Chunker (groups by logical conversation turns)
                              |
          Transformers.js (multilingual-e5-small, INT8 quantized, 384d)
                              |
          sqlite-vec + FTS5 (hybrid vector + keyword storage)
                              |
          Reciprocal Rank Fusion (combines both signals for ranking)

Codex sessions are grouped by cwd extracted from each file's session_meta line and surfaced as codex-<path> virtual projects in the index.

Storage: Single SQLite file at ~/.lore/lore.db with WAL mode for concurrent reads.

Config: Project exclusions stored in ~/.lore/config.json.

Configuration

Environment Variables

VariableDefaultDescription
LORE_DIR~/.loreData directory
LORE_DB~/.lore/lore.dbDatabase path
CLAUDE_PROJECTS_DIR~/.claude/projectsClaude Code transcripts location
CODEX_SESSIONS_DIR~/.codex/sessionsOpenAI Codex CLI rollouts location
Performance

Measured on Apple Silicon (M-series):

MetricValue
Search latency20-30ms
Index speed~10 sessions/sec
First search (cold model load)~5s
DB size~0.1MB per 10 sessions
Model size (downloaded once)~112MB
Troubleshooting

"No sessions found"

Run manage_projects with action list to see available projects. All are indexed by default unless excluded.

Stale lock file

If indexing was interrupted, the lock file auto-cleans on next run (PID-based detection).

DB corruption

Delete ~/.lore/lore.db and re-index. Your source data (~/.claude/projects/) is never modified.

Development

bash
git clone https://github.com/hyunjae-labs/lore.git
cd lore
npm install
npm run build
npm test          # 135 tests

Tech Stack

License

MIT

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Lore

It indexes Claude Code files from ~/.claude/projects/ and OpenAI Codex CLI sessions from ~/.codex/sessions/.

No. It runs fully locally and does not require API keys.

It combines multilingual-e5-small vector embeddings with FTS5/BM25 keyword search using Reciprocal Rank Fusion.

Yes. Projects are indexed by default, and manage_projects can exclude or include them.

The default database is ~/.lore/lore.db, with configuration stored in ~/.lore/config.json.

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 PreviewLore AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/hyunjae-labs-lore?style=directory)](https://allmcps.com/mcp/hyunjae-labs-lore)
HTML Embed
<a href="https://allmcps.com/mcp/hyunjae-labs-lore"><img src="https://allmcps.com/api/badge/hyunjae-labs-lore?style=directory" alt="Lore on AllMCPs" /></a>