lore-mcp
Enables shared, multi-agent persistent storage for the knowledge base, investigations, and journal using PostgreSQL, suitable for team and production environments.
Provides local persistent storage for the knowledge base, investigations, and journal using SQLite, requiring no external database setup.
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 sessionsHow 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 · ✗ disputedYour 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-mcpWhat you get
Mode | When to use |
| Exact term matches (default when semantic is off) |
| Meaning-based retrieval, no keyword overlap needed |
| 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 coverageConfiguration
Variable | Default | Notes |
|
| Master switch — off = current behavior unchanged |
|
| 384d, ~90MB, English-optimized |
|
| 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-mcpOptional: 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 80003. 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 |
| Add an entry. Accepts |
| Semantic search with optional topic filter. |
| Fetch full entry by ID. |
| List entries, filter by topic. |
| Update content, tags, or set |
| Delete entry (requires |
Investigations
Tool | What it does |
| Open or add to an investigation. |
| List investigations, filter by topic. |
| Fetch full investigation by ID. |
| Log a structured hypothesis → result → conclusion. |
| List all logged experiments. |
Journal
Tool | What it does |
| Add a milestone, decision, or reflection. |
| List recent entries (default 20). |
| Fetch entry by ID. |
| Snapshot a config object to the journal. |
Document Ingestion
Tool | What it does |
| Ingest a markdown file into the KB. |
| Batch-ingest a directory, with change detection. |
| Check what's changed since last sync. |
MCP Index
Tool | What it does |
| Scan all configured MCP servers and index their tools. |
| Search indexed tools by description. |
| Get all tools for a specific MCP server. |
| Force a full rescan. |
Search
Tool | What it does |
| Search across KB, investigations, journal, and transcripts at once. |
| Search local files by content. |
| Search Whisper transcript segments. |
| Deduplicate a result set by similarity threshold. |
| Cluster results by topic. |
Backends
SQLite | PostgreSQL | |
Setup required | None | Existing PostgreSQL instance |
Best for | Solo developers, local use | Teams, shared agents, production |
Config |
|
|
Data location |
| 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-mcpLicense
MIT — see LICENSE
Maintenance
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/davidgut1982/lore-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server