lore-mcp
Persistent knowledge layer for AI agents. Structured KB with search, investigation threads, multi-session journal, and multi-agent attribution. SQLite or PostgreSQL.
README
Lore
lore-knowledge-mcp · Operational knowledge layer for engineering teams and their AI agents.

The Problem
Your agents start every session knowing nothing about your systems. Every runbook you've written. Every gotcha you've hit. Every incident you've debugged. None of it carries forward.
You re-explain. They re-discover. Context vanishes when the session ends.
Lore fixes that.
Without Lore With Lore
───────────────────────────── ──────────────────────────────────
Agent starts fresh every time Agent queries Lore on startup
"How does our infra work?" Gets: topology, gotchas, runbooks,
You re-explain everything past incidents, verified decisions
Context lost at session end Knowledge persists across all sessions
How It's Different
| Tool | Built for | What it remembers | Agent-native |
|---|---|---|---|
| OB1 / personal memory | One person | Your thoughts and captures | No |
| Mem0 / Zep | App developers | User preferences, conversations | Partially |
| Confluence / Notion | Human teams | Documentation (human-browsed) | No |
| Lore | Engineering teams + AI agents | How your systems actually work — searchable by meaning, not just keywords | Yes |
Lore is not a second brain. It's the operational intelligence your agents need to work in your environment — not just any environment.
What Lore Does
Knowledge Base
Your team's operational knowledge — always queryable by any agent. Capture the things that matter: runbooks, hard-won gotchas, architecture decisions, deployment state. Every entry carries attribution so agents know who wrote it and whether a human has verified it.
Investigations
When something breaks, open a structured investigation. Document the symptom, test hypotheses, record what you tried and what you found. Six months later when the same issue resurfaces — different engineer, different agent — the trail is there.
Journal
A permanent record of milestones, architecture decisions, and buying decisions. The kind of thing that lives in someone's head until they leave the team.
Built for Multi-Agent Systems
In a multi-agent environment, provenance matters. Every Lore entry carries author, source_type, and verified.
kb_search("proxmox lxc dns")
[1] "LXC inherits host resolv.conf — Tailscale breaks containers"
david · human · ✓ verified
[2] "LXC DNS fix after Tailscale install"
engineer-agent · agent · unreviewed
[3] "LXC DNS configuration reference"
research-agent · agent · ✗ disputed
Your agents know: result 1 is production-safe. Result 2, spot-check before acting. Result 3, review first.
Semantic Search (v0.6.0+)
Lore finds entries by meaning, not just keywords. Search "DNS broken in containers" and it returns an entry titled "LXC containers inherit resolv.conf from the host" — no keyword overlap required.
Powered by local sentence-transformers embeddings (no API key, no external calls), combined with FTS5 lexical search and Reciprocal Rank Fusion. The same model used by mcp-memory-service, fully self-hosted.
Enable it
Heads up: Semantic search is feature-complete and shipping in a future release. The v0.6.0 release that included it was yanked from PyPI on 2026-05-24 while we set up a proper staging and end-to-end testing pipeline. You can run it from source today by cloning the repo and running
pip install -e ".[semantic]".
# Once a stable release is published:
pip install lore-knowledge-mcp[semantic]
LORE_SEMANTIC_SEARCH=true lore-mcp
What you get
| Mode | When to use |
|---|---|
fts |
Exact term matches (default when semantic is off) |
semantic |
Meaning-based retrieval, no keyword overlap needed |
hybrid |
Best of both — FTS5 + vector via RRF (recommended) |
Backfill existing KB
If you already have entries, generate embeddings for them:
kb_backfill_embeddings() # idempotent, safe to re-run
kb_embedding_status() # check coverage
Configuration
| Variable | Default | Notes |
|---|---|---|
LORE_SEMANTIC_SEARCH |
false |
Master switch — off = current behavior unchanged |
LORE_EMBEDDING_MODEL |
all-MiniLM-L6-v2 |
384d, ~90MB, English-optimized |
LORE_RRF_K |
10 |
Increase to 30–60 for corpora >10k entries |
For multilingual content, set LORE_EMBEDDING_MODEL=paraphrase-multilingual-MiniLM-L12-v2 (same 384d, no schema change).
Automating Lore in Your Workflow
Add one line to every agent's system prompt and one entry to ~/.mcp.json — that's the entire integration. Each phase of your engineering workflow reads prior knowledge from Lore and writes its findings back, so nothing is re-discovered from scratch.
→ How to wire Lore into a 6-phase multi-agent pipeline — full walkthrough with code examples for every phase: research, architecture review, implementation, adversarial code review, QA, and documentation.
Quick Start
No database setup required. Lore runs out of the box with SQLite.
1. Install
pip install lore-knowledge-mcp
Optional: semantic search
Note: The v0.6.0 PyPI release was yanked — see Semantic Search for current install status.
pip install lore-knowledge-mcp[semantic]
Then set LORE_SEMANTIC_SEARCH=true. See Semantic Search for details.
2. Start the server
# Stdio mode (for local MCP clients like Claude Code)
lore-mcp
# HTTP mode (for remote or multi-agent access)
lore-mcp --host 0.0.0.0 --port 8000
3. Add to your MCP client
Claude Code / Claude Desktop — add to ~/.mcp.json:
{
"mcpServers": {
"lore": {
"type": "stdio",
"command": "lore-mcp"
}
}
}
Or for HTTP mode (recommended for teams):
{
"mcpServers": {
"lore": {
"type": "http",
"url": "http://localhost:8000/mcp"
}
}
}
That’s it. Lore is ready.
Tool Reference
Knowledge Base
| Tool | What it does |
|---|---|
kb_add |
Add an entry. Accepts author, source_type for attribution. |
kb_search |
Semantic search with optional topic filter. |
kb_get |
Fetch full entry by ID. |
kb_list |
List entries, filter by topic. |
kb_update |
Update content, tags, or set verified flag. |
kb_delete |
Delete entry (requires confirm=true). |
Investigations
| Tool | What it does |
|---|---|
investigation_add |
Open or add to an investigation. |
investigation_list |
List investigations, filter by topic. |
investigation_get |
Fetch full investigation by ID. |
investigation_log_experiment |
Log a structured hypothesis → result → conclusion. |
investigation_list_experiments |
List all logged experiments. |
Journal
| Tool | What it does |
|---|---|
journal_append |
Add a milestone, decision, or reflection. |
journal_list |
List recent entries (default 20). |
journal_get |
Fetch entry by ID. |
snapshot_config |
Snapshot a config object to the journal. |
Document Ingestion
| Tool | What it does |
|---|---|
kb_ingest_doc |
Ingest a markdown file into the KB. |
kb_ingest_dir |
Batch-ingest a directory, with change detection. |
kb_sync_status |
Check what's changed since last sync. |
MCP Index
| Tool | What it does |
|---|---|
mcp_index_scan |
Scan all configured MCP servers and index their tools. |
mcp_index_search |
Search indexed tools by description. |
mcp_index_get_server |
Get all tools for a specific MCP server. |
mcp_index_rebuild |
Force a full rescan. |
Search
| Tool | What it does |
|---|---|
multi_search |
Search across KB, investigations, journal, and transcripts at once. |
search_local |
Search local files by content. |
search_transcripts |
Search Whisper transcript segments. |
deduplicate_results |
Deduplicate a result set by similarity threshold. |
cluster_results |
Cluster results by topic. |
Backends
| SQLite | PostgreSQL | |
|---|---|---|
| Setup required | None | Existing PostgreSQL instance |
| Best for | Solo developers, local use | Teams, shared agents, production |
| Config | DB_BACKEND=sqlite (default) |
DB_BACKEND=postgres + connection vars |
| Data location | ~/.local/share/lore/ |
Your database |
SQLite is the default. No configuration needed — just install and run.
PostgreSQL is for teams who want a shared knowledge layer accessible from multiple machines or agents simultaneously.
# PostgreSQL setup
export DB_BACKEND=postgres
export DB_HOST=your-db-host
export DB_PORT=5432
export DB_NAME=lore
export DB_USER=your-user
export DB_PASSWORD=your-password
lore-mcp
License
MIT — see LICENSE
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。