Lore MCPサーバー
コミット 2026年11月1日ソフトウェアのパターンや規約に関するローカルなセマンティック検索エンジンを提供し、AIコーディングエージェントにエンジニアリングのコンテキストを与えます。
別名 attila/lore
- スター
- 8
- ツール
- 6
- ダウンロード数(30日間)
- —
- 最新バージョン
- —
- 最終コミット
- 2026年11月1日
- ライセンス
- Apache-2.0
Lore MCPとは
ソフトウェアのパターンや規約に関するローカルなセマンティック検索エンジンを提供し、AIコーディングエージェントにエンジニアリングのコンテキストを与えます。 6個のツールを提供しており、search_patterns, add_pattern, update_patternなどがあります。
プロジェクトのREADMEから生成された概要
Lore MCP server について
Loreは、ソフトウェアのパターンや規約のためのローカルなセマンティック検索エンジンとして機能することで、AIコーディングエージェントにエンジニアリングのコンテキストを提供します。開発者は、gitリポジトリ内のmarkdownファイルにエンジニアリングの知見を保存でき、Model Context Protocolを介してその知識をClaude Codeなどのツールから利用可能にします。このシステムは、単一のRustバイナリとローカルのSQLiteデータベースを使用し、全文検索とベクトル類似度を組み合わせたハイブリッド検索を実行します。
動作には、Ollamaやllama-serverのようなOpenAI互換サービスなどの埋め込みサーバーが必要です。初期化されると、markdownファイルをヘッディングごとにインデックス化し、検索精度を高めるためにYAML frontmatterのタグを抽出します。ユーザーは、特定のMCPツールを使用して、パターンの検索、新しいファイルの追加、既存ドキュメントの更新といったナレッジベースの管理を行うことができます。この構成により、コーディングエージェントはコードを生成する前に確立されたチームのパターンを参照できるようになり、コードベース全体の一貫性が維持されます。
できること
- 1エンジニアリングパターンの取得ローカルドキュメントから、特定のコーディング規約やエラーハンドリング戦略をAIエージェントに探させます。
- 2パターンの網羅性の監査新しく作成したパターンが、既存のドキュメントの語彙や要件に適合しているかを確認します。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
Lore MCPツール 6
READMEから検出search_patternsadd_patternupdate_patternappend_to_patternlist_patternslore_status
| search_patterns | — | |
| add_pattern | — | |
| update_pattern | — | |
| append_to_pattern | — | |
| list_patterns | — | |
| lore_status | — |
自動チェック
実行日 2026年11月14日完全なレポート →まだ検証されていません。サーバーには80点のスコア、重大な問題がないこと、および検証に必要な十分なデータが必要です。 チェックの仕組み · 点数を上げるための改善点
- ソースリポジトリがリンクされており、アクセス可能attila/lore is public and reachablegithub.com/attila/lore ↗合格
- パッケージがこのリポジトリをソースとして指定未チェック
- ビルドの来歴 (Sigstore 証明)未チェック
- オープンソースライセンス (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit or release 2026-11-01github.com/attila/lore ↗合格
- OpenSSF Scorecard未チェック
- パッケージ名が有名なパッケージに酷似していない未チェック
- パッケージおよびその依存関係に重大な勧告なし未チェック
- モデルへの隠れた指示がない6 tool descriptions and the README read; no override phrases, credential paths or hidden characters合格
- 破壊的なツールがラベル付けされているNo tool named like delete, drop or exec合格
- リモートエンドポイントが MCP ハンドシェイクに応答未チェック
README
GitHubで見るLore
Your engineering wisdom, always in context.
Lore is a local semantic search engine for your software patterns and conventions, exposed as a Model Context Protocol (MCP) tool for Claude Code. Your knowledge lives as markdown files in a git repository. Lore indexes them with hybrid full-text and vector search, then serves results over MCP so your AI coding agent consults your patterns before writing code.
Single Rust binary. No external database. Only runtime dependency is an embedding server:
Ollama by default, or an OpenAI-compatible embedding server such as
llama-server.
How It Works
Markdown files (git repo, source of truth)
│
▼ ingest
┌───────────────┐ ┌──────────┐
│ lore │──────▶│ Ollama │ (embed chunks)
│ (Rust binary) │◀──────│ :11434 │
└───────┬───────┘ └──────────┘
│
▼
┌───────────────┐
│ SQLite │ FTS5 (lexical) + sqlite-vec (vector)
│ (single file) │ both compiled into the binary
└───────┬───────┘
│
▼ MCP over stdio
┌───────────────┐
│ Claude Code │
└───────────────┘
Install
Prerequisites
- Ollama:
brew install ollamaor see install options
To use llama-server, LM Studio or a hosted service instead, see
Embedding Servers.
lore init needs the embedding server running. After setup, if the server becomes unavailable,
search falls back to keyword matching and warns that it has.
Homebrew
On macOS (Apple Silicon or Intel) and Linux (x86_64 or Arm), install with Homebrew:
brew install attila/tap/lore
The formula installs the prebuilt release archive, verified against its published checksum, and is updated with every stable release. It does not install Ollama.
Prebuilt archive
Prebuilt binaries are published with every tagged release on the
releases page, accompanied by a SHA256SUMS file for
integrity verification. Pick VERSION from the releases page. Set TARGET to one of
x86_64-unknown-linux-gnu (most Linux), x86_64-unknown-linux-musl (Alpine and musl distros),
aarch64-unknown-linux-musl (Arm Linux), aarch64-apple-darwin (Apple Silicon), or
x86_64-apple-darwin (Intel Mac):
VERSION=0.6.0
TARGET=x86_64-unknown-linux-gnu
curl -LO https://github.com/attila/lore/releases/download/v${VERSION}/lore-${VERSION}-${TARGET}.tar.gz
curl -LO https://github.com/attila/lore/releases/download/v${VERSION}/SHA256SUMS
sha256sum -c SHA256SUMS --ignore-missing # macOS: shasum -a 256 -c SHA256SUMS --ignore-missing
tar xzf lore-${VERSION}-${TARGET}.tar.gz
sudo mv lore /usr/local/bin/
# (no sudo? mkdir -p ~/.local/bin && mv lore ~/.local/bin/, then ensure ~/.local/bin is on PATH)
Why does Gatekeeper block the binary? Tarballs downloaded via
curlrun without further intervention. If you download via a browser, macOS may attach thecom.apple.quarantineextended attribute and refuse to launch the binary. Clear it withxattr -d com.apple.quarantine ./loreafter extraction (or right-click → Open the first time). The binary is not Apple-notarized: that requires a paid Developer ID certificate, which the project does not currently hold.
Build from source
Building from source needs Rust (the version pinned in rust-toolchain.toml)
and just (cargo install just).
just install
This runs cargo install --path ., placing the lore binary in ~/.cargo/bin/ (which rustup adds
to PATH during Rust installation). To build without installing:
cargo build --release
# binary at ./target/release/lore
Quick Start
Initialise and Use
# Point lore at a directory of markdown files (git repository recommended)
lore init --repo ~/my-patterns
# Test a search
lore search "error handling"
# Check health
lore status
The init command verifies Ollama is running, pulls the embedding model (nomic-embed-text,
~270MB), creates lore.toml and the knowledge database, and runs the first ingestion.
For an OpenAI-compatible embedding server, add --provider openai-compatible, --url and
--model, as Embedding Servers shows.
Use with Claude Code
Install the lore plugin to get the MCP server, lifecycle hooks, and the /search and
/coverage-check skills:
claude --plugin-dir /path/to/lore/integrations/claude-code/
The plugin assumes lore is on PATH and uses the default configuration
(~/.config/lore/lore.toml). If you use a custom configuration path, either edit
integrations/claude-code/mcp.json to add your --config flag, or add the MCP server manually:
claude mcp add --scope user --transport stdio lore -- \
lore serve --config /path/to/lore.toml
The manual approach gives only the MCP server. The plugin also includes hooks that inject relevant
patterns before edits, a /search skill for on-demand queries, and a /coverage-check skill. The
/coverage-check skill audits a draft pattern's vocabulary coverage by simulating the PreToolUse
hook's own query extraction against synthetic tool calls.
Patterns whose tags: frontmatter list contains universal opt into an always-on tier. Lore emits
these in full at every SessionStart. It re-injects them on every relevant tool call, for
process-level conventions like push discipline that need continuous reinforcement. See the "When to
use the universal tag" section in the pattern authoring guide.
Commands
| Command | Purpose |
|---|---|
lore init --repo <path> |
First-time setup: provision Ollama, create configuration, ingest |
lore ingest |
Re-index the knowledge directory after editing markdown files |
lore ingest --file <path> |
Index a single file without requiring a git commit |
lore serve |
Start the MCP server (stdio transport for Claude Code) |
lore search <query> |
Search from the command line |
lore extract-queries |
Simulate the hook's FTS5 query extraction for a tool call |
lore list |
List every indexed pattern |
lore status |
Check health of all components |
lore trace why |
Explain lore's injection decisions from its trace files |
lore trace prune |
Compress and delete old trace files |
What if the knowledge directory is empty?
lore ingestandlore serveprint a warning to stderr ("Warning: knowledge directory is empty …") and continue. An empty directory is a legal state, not an error, so the exit status stays0. Add a.mdfile or relax.loreignoreto populate the index.lore statusreports the same state via itsScan set:line, and the MCPlore_statustool exposesempty_knowledge_dir: trueplusknowledge_dir_status: "empty"for monitoring callers.
MCP Tools
The server exposes six tools:
| Tool | Purpose |
|---|---|
search_patterns |
Semantic + keyword search across all patterns |
add_pattern |
Create a new pattern file, index it, and commit if the base is a git repository |
update_pattern |
Replace an existing pattern's content, re-index, and commit if git is in use |
append_to_pattern |
Add a section to an existing pattern, re-index, and commit if git is in use |
list_patterns |
List every indexed pattern with its tags and whether it is universal |
lore_status |
Report knowledge directory health: git status, indexed counts, last commit |
Knowledge Directory Format
Your knowledge directory is a directory of markdown files. Any structure works:
my-patterns/
├── error-handling.md
├── testing/
│ ├── unit-tests.md
│ └── integration-tests.md
├── api-design.md
└── code-style.md
Only files with a .md or .markdown extension are ingested. Other files (.txt, .mdx, .rst,
etc.) are skipped without a warning. They do not appear in search results.
Git is recommended but not required. Lore works against a plain directory, but delta ingest, the inbox branch workflow, and version history are all unavailable without a git repository. See Configuration Reference → Git Integration for the full picture.
Files are chunked by heading: each ## Section becomes a separate searchable unit. YAML frontmatter
tags are extracted and searchable.
To exclude non-pattern files such as README.md, CONTRIBUTING.md, or a drafts/ directory from
indexing, place a .loreignore file at the repository root. The syntax matches .gitignore and
supports negation patterns. See the Configuration Reference for
details.
---
tags: [error-handling, rust, result-types]
---
# Error Handling with Result Types
Always use Result<T, E> for fallible operations...
Search
- Hybrid (default): Combines FTS5 lexical search and sqlite-vec vector similarity using Reciprocal Rank Fusion. Title and tag matches are weighted above body text, so domain-scoped queries return the right patterns first.
- Full-Text Search (FTS) only: Set
hybrid = falseinlore.tomlto skip the embedding server at query time.
Documentation
| Guide | Description |
|---|---|
| Pattern Authoring Guide | How to write patterns that agents follow |
| Search Mechanics Reference | Full search pipeline internals for debugging discoverability |
| Hook Pipeline and Plugin Reference | Hook lifecycle, plugin setup, and injection tuning |
| Configuration Reference | lore.toml options, environment variables, CLI flags |
| Embedding Servers | Use an OpenAI-compatible embedding server instead of Ollama |
| Release Process | Maintainer runbook for cutting releases |
Development
Prerequisites
just: task runner- dprint: formatter
- cargo-deny: dependency auditor
- git-cliff: changelog generator
Commands
just setup # configure git hooks (run once after clone)
just ci # run the full quality gate pipeline
| Command | What it does |
|---|---|
just setup |
Configure git hooks (run once after clone) |
just fmt |
Check formatting |
just fmt-fix |
Fix formatting |
just clippy |
Run clippy lints |
just test |
Run tests (no Ollama needed) |
just deny |
Run dependency audits |
just doc |
Build documentation |
just changelog |
Regenerate CHANGELOG.md from git history |
just ci |
Run the full pipeline |
License
Dual-licensed under MIT and Apache 2.0.
Lore MCPのよくある質問
Lore MCPが提供するツールは
6個のツールを提供しており、search_patterns, add_pattern, update_pattern, append_to_pattern, list_patternsなどがあります。
Loreを実行するための要件は何ですか?
Loreは単一のRustバイナリで構成されており、デフォルトではOllama、またはllama-serverのようなOpenAI互換のサーバーなどの埋め込みサーバーが必要です。
検索機能はどのように動作しますか?
FTS5による全文検索と、Reciprocal Rank Fusionを用いたsqlite-vecによるベクトル類似度検索を組み合わせたハイブリッド検索を使用します。
gitリポジトリなしでLoreを使用できますか?
はい、通常のディレクトリに対してもLoreは動作します。ただし、差分インジェストやバージョン履歴などの機能を利用するにはgitリポジトリが必要です。
埋め込みサーバーが利用できなくなった場合はどうなりますか?
セットアップ後に埋め込みサーバーが利用できなくなった場合、検索はキーワードマッチングにフォールバックされ、警告が表示されます。