Skip to main content
Glama

lore

License: MIT TypeScript lore MCP server

Claude Code および OpenAI Codex CLIの会話全体を対象としたセマンティック検索ツールです。 すべてのプロジェクト、すべてのセッション、すべてのブランチ、すべてのエージェントにわたって、過去に議論した内容を検索できます。

lore MCP server

特徴

  • ハイブリッド検索(ベクトル + キーワード) multilingual-e5-small埋め込みとFTS5/BM25をReciprocal Rank Fusionで組み合わせます。意味による検索と完全一致検索の両方で結果を見つけます。

  • マルチエージェント対応: Claude Code + Codex CLI ~/.claude/projects/ (Claude Code) と ~/.codex/sessions/ (OpenAI Codex CLI) の両方を同じDBにインデックス化します。Codexセッションは session_meta から取得した cwd ごとにグループ化され、codex-<path> 仮想プロジェクトとして表示されるため、まとめて検索したり、特定のエージェントに絞り込んだりできます。

  • 完全ローカル、APIキー不要 すべてがローカルマシン上で動作します。埋め込みにはONNX Runtime、ストレージにはsqlite-vecを使用します。データがデバイスから外部へ送信されることはありません。

  • セッション終了時の自動インデックス SessionEndフックにより、新しいセッションがバックグラウンドで自動的にインデックス化されます。手動でのトリガーは不要です。

  • バックグラウンドインデックス 手動でのインデックス実行は即座に完了します。作業を続けながら進捗を監視できます。インデックス作成中も、すでに完了している分については検索可能です。

  • デフォルトでオプトアウト方式 すべてのプロジェクトが自動的にインデックス化されます。不要なプロジェクトは除外できます。登録は不要です。

  • 会話を認識したチャンク分割 任意のトークンウィンドウではなく、論理的なターン(ユーザーの質問 + アシスタントの完全な応答チェーン)で分割します。ツール使用チェーン、思考ブロック、多段階のやり取りを正しく処理します。

  • 100以上の言語に対応 韓国語、日本語、中国語、英語など、90以上の言語に対応。CJK(中日韓)を考慮したトークン推定により、正確なチャンク分割を行います。

Related MCP server: Semantic Search MCP Server

クイックスタート

Claude Codeに追加

# 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

OpenAI Codex CLIに追加

# No install needed
codex mcp add lore -- npx getlore
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

使用方法

接続後、AIはloreのツールを直接使用できます:

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...

初回セットアップ:

  1. インデックス作成 -- index() はすべてのプロジェクトを自動的にスキャンし、バックグラウンドで実行されます

  2. 検索 -- 過去の会話について何でも質問してください

  3. 除外 (オプション) -- 不要なノイズの多いプロジェクトを非表示にします

ツール

ツール

目的

manage_projects

インデックス対象からプロジェクトを除外/追加(オプトアウトモデル)

index

バックグラウンドインデックスを開始。除外されていないすべてのプロジェクトが対象。モード: incremental (デフォルト), rebuild, cancel

status

インデックス作成の進捗、ETA、スキップ理由、DBの健全性を確認

search

会話全体を対象としたセマンティック検索 + キーワード検索

get_context

検索結果を前後の会話を含めて展開

list_sessions

プロジェクトごとにインデックス化されたセッションを閲覧

なぜこれが必要なのか

Claude Codeはすべての会話を ~/.claude/projects/ にJSONL形式のトランスクリプトとして保存し、OpenAI Codex CLIはロールアウトを ~/.codex/sessions/YYYY/MM/DD/ に保存します。数週間経つと、数十のプロジェクトにわたって数百のセッションが蓄積され、多くの場合、両方のエージェントに分散してしまいます。アーキテクチャの決定、デバッグセッション、コードレビュー、設計の検討など、議論の内容は多岐にわたります。

しかし、それらを検索する方法がありません。「認証ミドルウェアにはどのようなアプローチをとったか?」や「データベース移行の議論はどのプロジェクトで行ったか?」といった質問に答えることはできません。

既存のツールは、クラウドAPIを必要としたり、ゾンビプロセスを生成したり、会話を単なるドキュメントとして扱ったりするものがほとんどです。loreはAIコーディングセッション専用に構築されており、ターンの境界、ツール使用チェーン、思考ブロックを理解し、Claude CodeとCodexのJSONL形式をネイティブに解析します。Node.js以外の依存関係なしで、完全にローカルで動作します。

仕組み

~/.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セッションは、各ファイルの session_meta 行から抽出された cwd によってグループ化され、インデックス内で codex-<path> 仮想プロジェクトとして表示されます。

ストレージ: ~/.lore/lore.db に単一のSQLiteファイルを作成し、同時読み取りのためにWALモードを使用します。

設定: プロジェクトの除外設定は ~/.lore/config.json に保存されます。

環境変数

変数

デフォルト

説明

LORE_DIR

~/.lore

データディレクトリ

LORE_DB

~/.lore/lore.db

データベースパス

CLAUDE_PROJECTS_DIR

~/.claude/projects

Claude Codeトランスクリプトの場所

CODEX_SESSIONS_DIR

~/.codex/sessions

OpenAI Codex CLIロールアウトの場所

Apple Silicon (Mシリーズ) での測定値:

メトリクス

検索レイテンシ

20-30ms

インデックス速度

約10セッション/秒

初回検索 (モデルのコールドロード)

約5秒

DBサイズ

10セッションあたり約0.1MB

モデルサイズ (初回ダウンロード)

約112MB

"No sessions found"

manage_projectslist アクションで実行し、利用可能なプロジェクトを確認してください。除外されない限り、すべてデフォルトでインデックス化されます。

古いロックファイル

インデックス作成が中断された場合、次回の実行時にロックファイルは自動的にクリーンアップされます (PIDベースの検出)。

DBの破損

~/.lore/lore.db を削除して再インデックスしてください。ソースデータ (~/.claude/projects/) が変更されることはありません。

開発

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

技術スタック

ライセンス

MIT

Available Tools

6 tools
get_contextA

Retrieve more conversation context around a specific search result. Use ONLY after calling search, when you need to see what was discussed before or after a result.

ParametersJSON Schema
NameRequiredDescriptionDefault
chunk_idYes
directionNo
countNo

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it mentions the tool retrieves context, it lacks details on permissions, rate limits, error handling, or what the output looks like (e.g., format, size limits). For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly concise and front-loaded, with two sentences that directly state the purpose and usage guidelines without any wasted words. Every sentence earns its place by providing essential information efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description covers purpose and usage well but is incomplete. It lacks details on parameters, behavioral traits, and output format, which are necessary for full understanding. The description is adequate as a minimum but has clear gaps in context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It only vaguely references 'a specific search result' (implied to relate to 'chunk_id') and 'before or after a result' (implied to relate to 'direction'), but provides no specifics on parameter meanings, formats, or constraints. This fails to adequately explain the three parameters beyond basic schema hints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Retrieve more conversation context') and resource ('around a specific search result'), distinguishing it from siblings like 'search' (which finds results) or 'list_sessions' (which lists sessions). It explicitly defines the tool's scope as fetching contextual conversation snippets.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool ('Use ONLY after calling search, when you need to see what was discussed before or after a result'), including a prerequisite (must call 'search' first) and a clear use-case (viewing surrounding context). It effectively differentiates from alternatives by specifying its post-search role.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

indexA

Update the search index with recent Claude Code sessions. Call if search returns stale results or the user asks to refresh the index. Modes: 'incremental' (default, only new/changed), 'full' (delete all and rebuild from scratch), 'cancel' (stop running index).

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNo
projectNo
confirmNo

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and does well by explaining the three modes and their behaviors ('incremental' for new/changed, 'full' for delete and rebuild, 'cancel' to stop). It could mention performance impact or permissions but covers core operational traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with zero waste: first states purpose, second gives usage guidelines, third details modes. Each sentence earns its place, and the structure is front-loaded with essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 3 parameters, no annotations, and no output schema, the description is quite complete—covering purpose, usage, and key parameter semantics. It could note that 'full' mode might be resource-intensive or that 'confirm' is for safety, but it's largely adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains the 'mode' parameter's three values and their meanings, which adds crucial semantics beyond the bare enum in the schema. It doesn't cover 'project' or 'confirm', but the mode explanation is substantial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('Update the search index') and resources ('recent Claude Code sessions'), distinguishing it from sibling tools like 'search' or 'list_sessions' which query rather than update the index.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is provided on when to use this tool: 'if search returns stale results or the user asks to refresh the index.' This directly addresses the tool's purpose relative to alternatives like 'search'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_sessionsB

List all indexed Claude Code sessions. Use when the user wants to browse conversation history or find sessions by project/date.

ParametersJSON Schema
NameRequiredDescriptionDefault
projectNo
limitNo
sortNo

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions that sessions are 'indexed' and implies filtering capabilities ('by project/date'), but lacks details on permissions, rate limits, pagination, or what 'indexed' entails. For a list tool with zero annotation coverage, this leaves significant gaps in understanding the tool's behavior and constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured, consisting of two sentences that efficiently convey the tool's purpose and usage. The first sentence states what it does, and the second provides context for when to use it, with no wasted words or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (3 parameters, no annotations, no output schema), the description is incomplete. It lacks details on behavioral aspects like permissions or rate limits, and parameter semantics are underspecified. Without an output schema, it also doesn't describe return values (e.g., session format). For a tool with moderate complexity and no structured support, the description should provide more comprehensive guidance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 3 parameters with 0% description coverage, meaning no parameter details are documented in the schema. The description only vaguely references 'project/date' for filtering, which partially covers the 'project' parameter but ignores 'limit' and 'sort'. It doesn't explain what 'limit' controls (e.g., number of results) or the meaning of 'sort' enum values ('recent', 'oldest'), failing to compensate for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'List all indexed Claude Code sessions.' It specifies the verb ('List') and resource ('indexed Claude Code sessions'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate this tool from sibling tools like 'search' or 'get_context', which might also involve session retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage guidance: 'Use when the user wants to browse conversation history or find sessions by project/date.' This gives context for when to invoke the tool, such as for browsing or filtering by project/date. It doesn't explicitly state when not to use it or name alternatives like 'search', but the context is sufficient for basic decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

manage_projectsA

Manage which projects are registered for indexing. Use 'list' to see all projects on disk and their registration status. Use 'add' to register a project for indexing. Use 'remove' to unregister. Projects must be registered before they can be indexed.

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYes
projectNo

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the three discrete actions and the registration requirement, but doesn't mention permissions needed, whether changes are reversible, rate limits, or what the response looks like. For a mutation tool with zero annotation coverage, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with three sentences: an overview statement, specific action explanations, and a prerequisite. Every sentence adds value with no redundant information, making it easy to parse and understand.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-parameter tool with no annotations and no output schema, the description provides good purpose and usage guidance but lacks details about response format, error conditions, and the exact format of the 'project' parameter. It's adequate but has clear gaps in behavioral transparency.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description must compensate. It explains the meaning of the 'action' parameter values ('list', 'add', 'remove') and implies the 'project' parameter is used with 'add' and 'remove' actions. However, it doesn't specify what format the 'project' parameter expects (path, name, ID).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('manage', 'list', 'add', 'remove') and resources ('projects', 'indexing'), distinguishing it from sibling tools like 'index' or 'search'. It explains that this tool handles registration status for indexing, not the indexing process itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use each action ('list' to see status, 'add' to register, 'remove' to unregister) and includes a prerequisite statement ('Projects must be registered before they can be indexed') that helps differentiate from the 'index' sibling tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

statusA

Check the health and progress of lore indexing. Shows indexing status, session counts, DB size. Use this to monitor indexing progress after calling index.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes what the tool does (checking health/progress and showing specific metrics) but lacks details on permissions needed, rate limits, or what happens if indexing isn't running. It doesn't contradict annotations, but could be more informative.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences that are front-loaded: the first states the purpose and what it shows, the second provides usage guidance. Every sentence adds value without redundancy or waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no annotations, no output schema), the description is reasonably complete. It explains the tool's purpose, what it returns, and when to use it. However, without an output schema, it could benefit from more detail on return format or error conditions, but this is minor for a status-check tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description doesn't need to add parameter information, but it implicitly confirms no parameters are needed by not mentioning any. This meets the baseline for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('check', 'shows') and resources ('health and progress of lore indexing', 'indexing status, session counts, DB size'). It distinguishes from siblings by focusing on monitoring rather than performing operations like 'index' or 'search'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for usage ('Use this to monitor indexing progress after calling index'), indicating when to use it in relation to the 'index' sibling tool. However, it doesn't explicitly state when not to use it or mention alternatives among other siblings like 'list_sessions' or 'get_context'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updates
    • First observedget_context
    • First observedindex
    • First observedlist_sessions
    • First observedmanage_projects
    • First observedsearch
    • First observedstatus

TDQS

A4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: get_context retrieves conversation context around search results, index updates the search index, list_sessions lists indexed sessions, manage_projects handles project registration, search performs searches, and status checks indexing health. The descriptions explicitly differentiate their use cases, preventing agent confusion.

Naming Consistency4/5

Tool names follow a consistent snake_case pattern and use clear verbs like get, index, list, manage, search, and status. However, 'status' deviates slightly as a noun rather than a verb (e.g., 'check_status' would be more consistent), but overall the naming is predictable and readable.

Tool Count5/5

With 6 tools, this server is well-scoped for its purpose of managing and searching conversation history. Each tool serves a specific function in the indexing and retrieval workflow, from setup (manage_projects, index) to query (search, get_context) and monitoring (list_sessions, status), with no unnecessary bloat.

Completeness5/5

The tool set provides complete coverage for the domain of indexing and searching Claude Code sessions. It includes project management (manage_projects), indexing operations (index, status), session listing (list_sessions), search functionality (search), and context retrieval (get_context), ensuring agents can handle the full lifecycle without gaps.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables comprehensive search and analysis of Claude Code conversation history using full-text search, optional semantic vector search, and conversation management tools. Provides fast SQLite-based indexing with role-based filtering, project organization, and hybrid search capabilities combining keyword and semantic matching.
    -
  • F
    license
    Not graded
    quality
    B
    maintenance
    Provides hybrid semantic and keyword code search for Claude Code using BM25 and vector retrieval. It enables indexing and searching local codebases with language-aware chunking and local embeddings.
    -
  • A
    license
    A
    quality
    A
    maintenance
    Enables local semantic search over documents and code for Claude Code and Claude Desktop, running entirely offline with local embeddings and vector storage.
    12
    3
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides Claude Code with local semantic search and indexing of your codebase using AST-aware chunking and hybrid search, enabling deep code understanding without sending data to the cloud.
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hyunjae-labs/lore'

If you have feedback or need assistance with the MCP directory API, please join our Discord server