MCP Local Rag
Semantic code & doc search with keyword boost. AST code nav, auto HF mirror, local…
- Pricing
- Open source
- Runs
- Locally
- Version
- 0.21.0
- Listing updated
- 4 days ago
About MCP Local Rag
MCP Local Rag is an open-source MCP server for knowledge and memory. It runs locally on your machine and is started by your AI client.
Semantic code & doc search with keyword boost. AST code nav, auto HF mirror, local, privacy-first.
Install
Run in a terminal
claude mcp add mcp-local-rag -- npx -y @damoqiongqiu/mcp-local-ragAdd to claude_desktop_config.json
{
"mcpServers": {
"mcp-local-rag": {
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-local-rag": {
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"mcp-local-rag": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-local-rag": {
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-local-rag": {
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag"
]
}
}
}Configuration
BASE_DIRBase directory for document storage (defaults to current working directory). Ignored when BASE_DIRS is set.BASE_DIRSJSON array of base directories (e.g. '["/a","/b"]'). Takes precedence over BASE_DIR.DB_PATHPath to LanceDB database directory (defaults to ./lancedb/)CACHE_DIRDirectory where Transformers.js models are cached (defaults to ./models/)MODEL_NAMEEmbedding model name (defaults to Xenova/all-MiniLM-L6-v2)MAX_FILE_SIZEMaximum file size in bytes (defaults to 104857600 / 100MB)RAG_MAX_DISTANCEMaximum distance threshold for filtering search results. Results with distance greater than this value will be excluded. Lower values mean stricter filtering (e.g., 0.5 for high relevance only)RAG_GROUPINGGrouping mode for quality filtering. 'similar' returns only the most similar group (stops at first distance jump). 'related' includes related groups (stops at second distance jump). Unset means no grouping filterRAG_MAX_FILESMaximum number of files to keep in search results. Results are filtered to include only chunks from the top N best-scoring files. For example, 1 returns only the single best-matching file's chunks. Unset means no file filtering.CHUNK_MIN_LENGTHMinimum chunk length in characters (1-10000, defaults to 50). Chunks shorter than this threshold are filtered out during ingestion.RAG_DEVICEExecution device for the embedder (defaults to cpu). Passed straight to ONNX Runtime; see the Transformers.js device source for the supported backend names. If the requested device fails to initialize, the server throws an error.RAG_DTYPEEmbedding quantization dtype for the embedder (defaults to fp32). Opt-in and pass-through; accepts any dtype the chosen model provides (fp32, fp16, q8, int8, ...). If the model has no variant for the requested dtype, the server throws an error. Changing this changes the embedding space — re-ingest existing data.RAG_HYBRID_WEIGHTKeyword boost factor for hybrid search (0.0-1.0, defaults to 0.6). 0 means semantic similarity only; higher values increase the keyword-match contribution to the final score.RAG_WATCHEnable automatic file watcher to detect changes and re-index modified files (true/1 to enable). Useful during active development.HF_ENDPOINTExplicit HuggingFace endpoint URL to use for model downloads. When set, auto-mirror detection is skipped and this URL is used directly. Useful when you have a full-featured mirror.HF_AUTO_MIRROREnable automatic mirror detection for HuggingFace downloads (defaults to true). Set to "false" or "0" to disable and use huggingface.co directly. The mirror chain is: huggingface.co → hf-mirror.com → modelscope.cn.HTTPS_PROXYHTTPS proxy URL for downloading embedding models (e.g. http://proxy:8080). Required only if behind a corporate proxy.HTTP_PROXYHTTP proxy URL for downloading embedding models. Fallback if HTTPS_PROXY is not set.
Pricing
Open source
MCP Local Rag FAQ
Is MCP Local Rag free?
Yes. MCP Local Rag is open source, so you can use and self-host it for free.
How do I add MCP Local Rag to Claude Code?
Run this command in your terminal: claude mcp add mcp-local-rag -- npx -y @damoqiongqiu/mcp-local-rag
What are the best alternatives to MCP Local Rag?
The closest alternatives to MCP Local Rag are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and note1.
Alternatives to MCP Local Rag

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Claude Code Ultimate Guide
MCP serverMCP server for searching the Claude Code Ultimate Guide from any MCP client
Runs locally- Open source
- 6.5K GitHub stars
- AI models and LLM tooling

Nautilus Compass Memory
MCP serverLocal-first long-term memory layer for AI agents, served over MCP
Not checked yet- 5 tools
- Remote
- Open source
- 1.3K GitHub stars
- Knowledge and memory

note1
MCP serverMCP server giving AI assistants search and summaries across your note1 meetings
- 4 tools
- Remote
- Free trial
- 1 GitHub star
- Productivity
MedXpert 图书馆连接器(通用版)
MCP serverLocal MCP server that searches and answers questions over your own Markdown wiki
Runs locally- 4 tools
- Open source
- Knowledge and memory