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) в одной базе данных. Сессии Codex группируются по cwd из session_meta и отображаются как виртуальные проекты 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

Использование

После подключения ИИ может напрямую использовать инструменты 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 -- index() автоматически сканирует все проекты, работает в фоне

  2. Search -- спрашивайте что угодно о прошлых диалогах

  3. Exclude (опционально) -- скройте шумные проекты, которые вам не интересны

Инструменты

Инструмент

Назначение

manage_projects

Исключение/включение проектов из индексации (модель opt-out)

index

Запуск фоновой индексации. Все неисключенные проекты. Режимы: incremental (по умолчанию), rebuild, cancel

status

Проверка прогресса индексации, времени завершения, причин пропуска, состояния БД

search

Семантический поиск + поиск по ключевым словам по диалогам

get_context

Расширение результатов поиска контекстом диалога

list_sessions

Просмотр проиндексированных сессий по проектам

Зачем это нужно

Claude Code сохраняет каждый диалог как JSONL-транскрипт в ~/.claude/projects/, а OpenAI Codex CLI сохраняет свои сессии в ~/.codex/sessions/YYYY/MM/DD/. Через несколько недель у вас накапливаются сотни сессий в десятках проектов, часто разбросанных между обоими агентами — обсуждения архитектурных решений, сессии отладки, код-ревью и дизайн-исследования.

Но искать по ним негде. Вы не можете спросить: "какой подход мы использовали для auth middleware?" или "в каком проекте было обсуждение миграции базы данных?".

Существующие инструменты либо требуют облачных API, либо порождают зомби-процессы, либо рассматривают диалоги как обычные документы. lore создан специально для сессий ИИ-кодинга: он понимает границы реплик, цепочки использования инструментов и блоки размышлений, а также нативно парсит форматы JSONL как Claude Code, так и Codex. Работает полностью локально без зависимостей, кроме 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 группируются по cwd, извлеченному из строки session_meta каждого файла, и отображаются в индексе как виртуальные проекты codex-<path>.

Хранилище: Один файл SQLite в ~/.lore/lore.db с режимом 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-30 мс

Скорость индексации

~10 сессий/сек

Первый поиск (холодная загрузка модели)

~5 с

Размер БД

~0.1 МБ на 10 сессий

Размер модели (скачивается один раз)

~112 МБ

"No sessions found"

Запустите manage_projects с действием list, чтобы увидеть доступные проекты. Все они индексируются по умолчанию, если не исключены.

Устаревший файл блокировки

Если индексация была прервана, файл блокировки автоматически очищается при следующем запуске (определение на основе PID).

Повреждение БД

Удалите ~/.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