lore-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lore-mcpsearch docs for 'machine learning setup'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
lore-mcp
LORE — Local Offline Retrieval Engine for MCP
An MCP server for semantic search over your local technical documents. No cloud, no external database — just a single .db file on your workstation.
What it does
Indexes a directory of Markdown/text files into a portable SQLite database using vector embeddings
Exposes three MCP tools (
search_docs,list_indexed_sources,list_collections) for any MCP client (Claude Code, Claude Desktop, Cursor, etc.)Runs locally with automatic GPU/API/CPU fallback for embedding generation
Related MCP server: docs-mcp
Quickstart
1. Install
git clone https://github.com/romainsc/lore-mcp.git
cd lore-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e .2. Check your hardware capabilities
python -c "
from lore_mcp.embedder import Embedder
emb = Embedder()
report = emb.assess()
print('GPU:', report['gpu']['message'])
print('CPU:', report['cpu']['message'])
"Example output:
GPU: NVIDIA RTX 500 Ada: 1.3/3.7 GB free, FP16 mode
CPU: 17.0 GB RAM available, CPU mode OKIf GPU VRAM is insufficient, the message tells you what to do (e.g. close GPU-heavy applications). If neither GPU nor CPU has enough resources, the embedding model cannot be loaded.
3. Index your documents
python -c "
from lore_mcp.embedder import Embedder
from lore_mcp.ingest import ingest_directory
embedder = Embedder() # auto-detects GPU/CPU
result = ingest_directory('/path/to/your/docs/', 'lore.db', embedder)
print(f'Indexed {result[\"file_count\"]} files, {result[\"chunk_count\"]} chunks')
if result['errors']:
print(f'{len(result[\"errors\"])} errors (see details in result[\"errors\"])')
"What happens:
First run downloads the embedding model nomic-ai/nomic-embed-text-v2-moe (~2 GB). This takes a few minutes. Subsequent runs use the cache (
~/.cache/huggingface/).Files are preprocessed (NUL characters and base64 image data stripped), chunked (2048 chars, 128 overlap), embedded, and stored in
lore.db.Files shorter than 100 characters after preprocessing are skipped.
If a file fails to process, the error is logged and indexing continues with the next file.
4. Start the MCP server and configure your client
There are two ways to connect lore-mcp to your MCP client:
Option A: HTTP server (recommended)
Start the server manually, then point your MCP client to its URL:
LORE_DB_PATH=/absolute/path/to/lore.db lore-mcp --transport sseThe server listens on http://localhost:8000/sse. Configure your MCP client:
{
"mcpServers": {
"lore": {
"url": "http://localhost:8000/sse"
}
}
}No path issues — the server runs in its own environment.
Option B: subprocess (stdio)
The MCP client launches the server as a subprocess. Requires the absolute path to the virtualenv binary:
{
"mcpServers": {
"lore": {
"command": "/absolute/path/to/lore-mcp/.venv/bin/lore-mcp",
"args": [],
"env": {
"LORE_DB_PATH": "/absolute/path/to/lore.db"
}
}
}
}Note: use absolute paths — the MCP client does not inherit your shell's virtualenv or working directory.
See docs/configuration.md for all environment variables and options.
5. Use from your MCP client
Once configured, your MCP client has three tools:
Semantic search:
search_docs("how to configure authentication")Returns the 5 most relevant passages with similarity scores and source files.
Search with more results or within a collection:
search_docs("deployment troubleshooting", top_k=10)
search_docs("embedding models", collection="docs-libre")List indexed files:
list_indexed_sources()Returns all indexed files with chunk counts.
List collections (multi-collection mode):
list_collections()Returns available .db collections with chunk and file counts.
6. Verify it works
From Claude Code, ask a question about your indexed documents. Claude will automatically call search_docs to find relevant passages and answer based on your local corpus.
If the server doesn't start, check:
The
commandpath points to thelore-mcpexecutable in your virtualenvThe
LORE_DB_PATHpoints to an existing.dbfileThe virtualenv has all dependencies installed (
pip install -e .)
Environment variables
Variable | Role | Default |
| SQLite database file path |
|
| Embedding model name |
|
| Mode: |
|
| Remote | (required if mode=api) |
| Model name for remote API | same as |
| Directory of | (none) |
| SSL verification for API ( |
|
| Custom CA certificate path | (system CA) |
| Chunk size in characters |
|
| Chunk overlap in characters |
|
| Chat LLM endpoint for eval | (required for eval) |
| Judge model name |
|
See docs/configuration.md for the full reference.
Architecture
lore-mcp uses nomic-ai/nomic-embed-text-v2-moe for embeddings (1024 dimensions, multilingual) and sqlite-vec for vector storage in a single .db file.
Embedding generation falls back automatically: local GPU (CUDA) → remote API (OpenAI-compatible) → local CPU.
See docs/architecture.md for the full design documentation.
Roadmap
Done
SQLite + sqlite-vec storage backend with model validation
Embedding with GPU/API/CPU fallback and capability assessment
MCP server (
search_docs,list_indexed_sources)Ingestion pipeline (preprocessing, chunking, batch indexing)
Unit and integration tests (165 tests, TDD)
Architecture and configuration documentation
README quickstart tutorial
Multi-collection support with license classification
Next
CI/CD with GitHub Actions
Example corpus and sample database
pip install lore-mcp(PyPI)CLI
lore-mcp indexsubcommandRAG evaluation (
lore-mcp eval+lore-mcp optimize)Build workflow (
lore-mcp build manifest.yaml --models models.yaml)
Future
Per-source result cap (reduce redundancy)
Incremental re-indexing
Metadata filtering
Hybrid search (vector + keyword)
Image captioning during ingestion
Docker image
AI-assisted development
This project is developed with AI assistance (Claude, Anthropic). All AI-assisted content is marked with Assisted-by and Co-Authored-By trailers in commits. Every contribution — human or AI-assisted — is reviewed, tested, and validated by a human before being committed.
See docs/ai-guidelines.md for the full guidelines.
License
AGPL-3.0-or-later — see docs/adr/001-license-gpl-v3.md for the rationale.
Copyright (C) 2026 Romain Chantereau
Available Tools
3 toolslist_collectionsA
List available collections with chunk and file counts.
Only available in multi-collection mode (LORE_DB_DIR set).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It implies a read-only listing operation and mentions the availability condition, but it does not explicitly state that it has no side effects, nor does it describe error behavior or output format details beyond 'chunk and file counts'.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, consisting of two short sentences. It front-loads the primary purpose and then adds a necessary condition. There is no fluff or redundant information, making it highly efficient for an agent to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with no parameters, the description is nearly complete. It states what is returned (chunk and file counts) and when it is available. It lacks explicit notes on edge cases or errors, but for a listing operation, the provided context is sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the schema coverage is trivially 100%. According to the rubric, the baseline for high coverage is 3, and there is no parameter information to add. The description does not need to explain parameters, but it also does not enhance anything beyond the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: listing available collections and providing chunk and file counts. It uses a specific verb ('List') and object ('collections'), making the purpose unambiguous even without comparing to siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides an explicit precondition for use: 'Only available in multi-collection mode (LORE_DB_DIR set)'. This guides the agent on when this tool is applicable. However, it does not contrast with alternatives like search_docs or list_indexed_sources, so the guidance is not fully comprehensive.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_indexed_sourcesA
List all indexed files with chunk counts.
In multi-collection mode, specify a collection name or leave empty to list sources across all collections.
| Name | Required | Description | Default |
|---|---|---|---|
| collection | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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. 'List' clearly implies a read-only operation, and the description states what is returned (indexed files with chunk counts). It does not mention edge cases like pagination or errors, but for a simple listing tool this is reasonably transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences with no filler or redundancy. The core purpose is front-loaded, and the parameter behavior is explained efficiently in the second sentence.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity (one optional parameter) and the presence of an output schema, the description covers the essential usage scenarios. It could be slightly more explicit about behavior in single-collection mode, but overall it is sufficient for an agent to call the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Although the input schema has 0% description coverage, the tool description directly explains the only parameter: 'specify a collection name or leave empty to list sources across all collections.' This fully clarifies the meaning and default behavior of the collection parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action ('List'), a specific resource ('indexed files'), and the output ('with chunk counts'). It is clearly distinct from sibling tools like search_docs and list_collections by describing an inventory-style listing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains the conditional behavior of the collection parameter ('In multi-collection mode... leave empty to list sources across all collections'), but it does not explicitly compare this tool with sibling tools or state when to prefer this over search_docs or list_collections. Usage is implied rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_docsA
Semantic search over indexed documents.
Returns the most relevant passages for the given query, with similarity scores and source files. In multi-collection mode, specify a collection name or leave empty to search across all collections.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| top_k | No | ||
| collection | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of disclosing behavior. It explains the search behavior and output contents, including similarity scores and source files, but does not explicitly state side effects, read-only guarantees, or error handling. This leaves some behavioral details unstated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well structured. It states the main purpose, summarizes the return content, and provides the key conditional usage note without unnecessary detail or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is mostly complete for a semantic search tool: it covers the query, collection behavior, and result content. However, the lack of explanation for top_k leaves a meaningful gap, since an agent cannot confidently know how many results to expect without inferring it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides no parameter descriptions, so the description must compensate. It explains the query and collection parameters reasonably, including multi-collection behavior, but does not explain top_k or its default meaning. This is a notable gap in parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool performs semantic search over indexed documents and returns relevant passages with similarity scores and source files. It is distinct from the sibling listing tools, which focus on enumerating sources and collections rather than searching content.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives practical guidance for multi-collection mode, telling users to specify a collection or leave it empty to search all collections. It does not explicitly name sibling tools as alternatives, but the conditional usage instruction is clear enough for typical search scenarios.
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.
3 tool updates
v0.1.0- First observed
list_collections - First observed
list_indexed_sources - First observed
search_docs
TDQS
Scored across 3 tools
Each tool has a clear, distinct purpose: search_docs performs semantic search, list_indexed_sources lists indexed files, and list_collections lists collections. No functional overlap or ambiguity.
All tool names follow a consistent verb_noun pattern in snake_case: search_docs, list_indexed_sources, list_collections. The naming is uniform and predictable.
Three tools is well-scoped for a documentation retrieval server, covering search and listing operations without unnecessary bloat.
The core retrieval workflows are covered: searching documents, listing sources, and listing collections. Minor gaps exist, such as retrieving a full document by ID, but the surface is reasonably complete for a search-focused server.
Maintenance
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
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Hosted MCP memory: save sessions/decisions once, search from Claude, Cursor, ChatGPT. EU-hosted FTS.
Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.
Private persistent memory for Claude, ChatGPT & Gemini via MCP - semantic search, zero-code setup.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables semantic search and retrieval from your local markdown brain (Remember.md) via MCP tools, running entirely offline with local embeddings.241MIT
- FlicenseNot gradedqualityDmaintenanceIndexes documentation sites by base URL and serves keyword search, optional semantic search, and Markdown page retrieval as MCP tools, all from a single SQLite file.-
- AlicenseAqualityDmaintenanceLocal-first RAG indexing and semantic search MCP server. Enables document retrieval and context-aware queries using local embedding models.316MIT
- AlicenseNot gradedqualityDmaintenanceLocal MCP server for indexing personal knowledge into SQLite with hybrid search, chunk-level citations, memory tools, and agent orchestration.4MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/romainsc/lore-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server