Best for
- Developers who need local execution and privacy
- Single-user environments searching code, technical specifications, and internal documents
- Users who want a lightweight RAG workflow through MCP or the CLI
An MIT-licensed, local-first RAG server for developers, exposing stdio MCP tools and a CLI. Its defining features are local embeddings, semantic chunking, keyword boosting, and relevance-gap filtering. It is best suited to privacy-conscious, single-user retrieval across code and technical documents.
Strongest · Documentation 16/20 Weakest · Reliability 8/20
Static review · not runListed 2026-07-29
Read the FMRS scoring method →Runtime:Node.js
BASE_DIR
Single document root directory (security boundary); defaults to the current working directory if unset.
BASE_DIRS
JSON array of document roots, e.g. '["/a","/b"]'; takes precedence over BASE_DIR.
DB_PATH
Path to the LanceDB vector database directory; defaults to ./lancedb/.
CACHE_DIR
Directory where Transformers.js models are cached; defaults to ./models/.
MODEL_NAME
HuggingFace embedding model ID, default Xenova/all-MiniLM-L6-v2; switching models requires deleting the database and re-ingesting.
MAX_FILE_SIZE
Maximum file size in bytes; defaults to 104857600 (100MB).
RAG_MAX_DISTANCE
Maximum distance threshold for search results; results above it are excluded, lower values are stricter.
RAG_GROUPING
Result grouping filter mode: 'similar' for the top group only, 'related' includes adjacent groups; unset means no filter.
RAG_MAX_FILES
Limit search results to chunks from the top N best-scoring files; unset means no filtering.
CHUNK_MIN_LENGTH
Minimum chunk length in characters during ingestion (1-10000); defaults to 50.
RAG_DEVICE
Execution device for the embedder (passed to ONNX Runtime); defaults to cpu; errors if initialization fails.
RAG_DTYPE
Embedding quantization dtype (fp32, fp16, q8, ...); defaults to fp32; changing it requires re-ingesting data.
RAG_HYBRID_WEIGHT
Keyword boost factor for hybrid search (0.0-1.0); defaults to 0.6, higher values favor exact matches.
Add the stdio server to an MCP client configuration with npx -y mcp-local-rag, and set BASE_DIR to the document root; restart the client to use it. The embedding model downloads on first use, after which text ingestion and search can run offline. The CLI can also be used directly.
{"mcpServers":{"local-rag":{"command":"npx","args":["-y","mcp-local-rag"],"env":{"BASE_DIR":"/path/to/your/documents"}}}}
Shown for Cursor. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.
{
"servers": {
"local-rag": {
"command": "npx",
"args": [
"-y",
"mcp-local-rag"
],
"env": {
"BASE_DIR": "/path/to/your/documents"
}
}
}
}
Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).
claude mcp add local-rag -e BASE_DIR=/path/to/your/documents -- npx -y mcp-local-rag
Run it in a terminal; replace any <…> placeholders with your own values first.
After restarting your MCP client, the 9 tools (query_documents, ingest_file, etc.) should appear in the tool list; then ask a question about an ingested document to confirm search returns results.
Once connected, you can ask your AI assistant things like:
No matching tools
Listed from the project's documentation, not tested by this site.
MCP Local RAG is a local-first RAG server for developers that can also be used as a CLI. It combines local embeddings, semantic search, and keyword boosting for code and technical documentation while keeping indexed data on the machine by default. It supports PDF, DOCX, TXT, Markdown, and HTML supplied through ingest_data.
Upstash's official server providing up-to-date third-party library docs for AI coding assistants
AI-powered NPM package analysis MCP server
An independent control layer that gives AI coding agents budgets, brakes, and receipts
GitHub's official MCP server for managing repos, issues, PRs, and workflows via natural language
Source revision 99aad46a1641 Data synced 2026-10-19 Read the FMRS scoring method