mcp-local-rag MCP
A local-first RAG server providing semantic and keyword search for code and technical documentation. It features AST-level code chunking via tree-sitter, semantic search with keyword boosting, and 15 MCP tools for ingestion, search, and code intelligence. It runs entirely locally without API keys or cloud dependencies, supporting offline use after initial model download.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
What you can do with it
- Perform semantic and keyword search on code and technical docs
- Navigate code definitions and references using AST intelligence
- Ingest project directories for local indexing
- Query codebase for specific implementation details
Source and maintenance
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
@damoqiongqiu/mcp-local-rag 0.21.0
{
"version": "0.21.0",
"transport": "stdio",
"identifier": "@damoqiongqiu/mcp-local-rag",
"registryType": "npm",
"registryBaseUrl": "https://registry.npmjs.org",
"environmentVariables": [
{
"name": "BASE_DIR",
"format": "string",
"description": "Base directory for document storage (defaults to current working directory). Ignored when BASE_DIRS is set."
},
{
"name": "BASE_DIRS",
"format": "string",
"description": "JSON array of base directories (e.g. '[\"/a\",\"/b\"]'). Takes precedence over BASE_DIR."
},
{
"name": "DB_PATH",
"format": "string",
"description": "Path to LanceDB database directory (defaults to ./lancedb/)"
},
{
"name": "CACHE_DIR",
"format": "string",
"description": "Directory where Transformers.js models are cached (defaults to ./models/)"
},
{
"name": "MODEL_NAME",
"format": "string",
"description": "Embedding model name (defaults to Xenova/all-MiniLM-L6-v2)"
},
{
"name": "MAX_FILE_SIZE",
"format": "string",
"description": "Maximum file size in bytes (defaults to 104857600 / 100MB)"
},
{
"name": "RAG_MAX_DISTANCE",
"format": "string",
"description": "Maximum 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)"
},
{
"name": "RAG_GROUPING",
"format": "string",
"description": "Grouping 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 filter"
},
{
"name": "RAG_MAX_FILES",
"format": "string",
"description": "Maximum 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."
},
{
"name": "CHUNK_MIN_LENGTH",
"format": "string",
"description": "Minimum chunk length in characters (1-10000, defaults to 50). Chunks shorter than this threshold are filtered out during ingestion."
},
{
"name": "RAG_DEVICE",
"format": "string",
"description": "Execution 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."
},
{
"name": "RAG_DTYPE",
"format": "string",
"description": "Embedding 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."
},
{
"name": "RAG_HYBRID_WEIGHT",
"format": "string",
"description": "Keyword 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."
},
{
"name": "RAG_WATCH",
"format": "string",
"description": "Enable automatic file watcher to detect changes and re-index modified files (true/1 to enable). Useful during active development."
},
{
"name": "HF_ENDPOINT",
"format": "string",
"description": "Explicit 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."
},
{
"name": "HF_AUTO_MIRROR",
"format": "string",
"description": "Enable 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."
},
{
"name": "HTTPS_PROXY",
"format": "string",
"description": "HTTPS proxy URL for downloading embedding models (e.g. http://proxy:8080). Required only if behind a corporate proxy."
},
{
"name": "HTTP_PROXY",
"format": "string",
"description": "HTTP proxy URL for downloading embedding models. Fallback if HTTPS_PROXY is not set."
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"mcp-local-rag-mcp": {
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag@0.21.0"
],
"env": {
"BASE_DIR": "<YOUR_BASE_DIR>",
"BASE_DIRS": "<YOUR_BASE_DIRS>",
"DB_PATH": "<YOUR_DB_PATH>",
"CACHE_DIR": "<YOUR_CACHE_DIR>",
"MODEL_NAME": "<YOUR_MODEL_NAME>",
"MAX_FILE_SIZE": "<YOUR_MAX_FILE_SIZE>",
"RAG_MAX_DISTANCE": "<YOUR_RAG_MAX_DISTANCE>",
"RAG_GROUPING": "<YOUR_RAG_GROUPING>",
"RAG_MAX_FILES": "<YOUR_RAG_MAX_FILES>",
"CHUNK_MIN_LENGTH": "<YOUR_CHUNK_MIN_LENGTH>",
"RAG_DEVICE": "<YOUR_RAG_DEVICE>",
"RAG_DTYPE": "<YOUR_RAG_DTYPE>",
"RAG_HYBRID_WEIGHT": "<YOUR_RAG_HYBRID_WEIGHT>",
"RAG_WATCH": "<YOUR_RAG_WATCH>",
"HF_ENDPOINT": "<YOUR_HF_ENDPOINT>",
"HF_AUTO_MIRROR": "<YOUR_HF_AUTO_MIRROR>",
"HTTPS_PROXY": "<YOUR_HTTPS_PROXY>",
"HTTP_PROXY": "<YOUR_HTTP_PROXY>"
}
}
}
}Cline
{
"mcpServers": {
"mcp-local-rag-mcp": {
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag@0.21.0"
],
"env": {
"BASE_DIR": "<YOUR_BASE_DIR>",
"BASE_DIRS": "<YOUR_BASE_DIRS>",
"DB_PATH": "<YOUR_DB_PATH>",
"CACHE_DIR": "<YOUR_CACHE_DIR>",
"MODEL_NAME": "<YOUR_MODEL_NAME>",
"MAX_FILE_SIZE": "<YOUR_MAX_FILE_SIZE>",
"RAG_MAX_DISTANCE": "<YOUR_RAG_MAX_DISTANCE>",
"RAG_GROUPING": "<YOUR_RAG_GROUPING>",
"RAG_MAX_FILES": "<YOUR_RAG_MAX_FILES>",
"CHUNK_MIN_LENGTH": "<YOUR_CHUNK_MIN_LENGTH>",
"RAG_DEVICE": "<YOUR_RAG_DEVICE>",
"RAG_DTYPE": "<YOUR_RAG_DTYPE>",
"RAG_HYBRID_WEIGHT": "<YOUR_RAG_HYBRID_WEIGHT>",
"RAG_WATCH": "<YOUR_RAG_WATCH>",
"HF_ENDPOINT": "<YOUR_HF_ENDPOINT>",
"HF_AUTO_MIRROR": "<YOUR_HF_AUTO_MIRROR>",
"HTTPS_PROXY": "<YOUR_HTTPS_PROXY>",
"HTTP_PROXY": "<YOUR_HTTP_PROXY>"
}
}
}
}VS Code
{
"servers": {
"mcp-local-rag-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag@0.21.0"
],
"env": {
"BASE_DIR": "<YOUR_BASE_DIR>",
"BASE_DIRS": "<YOUR_BASE_DIRS>",
"DB_PATH": "<YOUR_DB_PATH>",
"CACHE_DIR": "<YOUR_CACHE_DIR>",
"MODEL_NAME": "<YOUR_MODEL_NAME>",
"MAX_FILE_SIZE": "<YOUR_MAX_FILE_SIZE>",
"RAG_MAX_DISTANCE": "<YOUR_RAG_MAX_DISTANCE>",
"RAG_GROUPING": "<YOUR_RAG_GROUPING>",
"RAG_MAX_FILES": "<YOUR_RAG_MAX_FILES>",
"CHUNK_MIN_LENGTH": "<YOUR_CHUNK_MIN_LENGTH>",
"RAG_DEVICE": "<YOUR_RAG_DEVICE>",
"RAG_DTYPE": "<YOUR_RAG_DTYPE>",
"RAG_HYBRID_WEIGHT": "<YOUR_RAG_HYBRID_WEIGHT>",
"RAG_WATCH": "<YOUR_RAG_WATCH>",
"HF_ENDPOINT": "<YOUR_HF_ENDPOINT>",
"HF_AUTO_MIRROR": "<YOUR_HF_AUTO_MIRROR>",
"HTTPS_PROXY": "<YOUR_HTTPS_PROXY>",
"HTTP_PROXY": "<YOUR_HTTP_PROXY>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"mcp-local-rag-mcp": {
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag@0.21.0"
],
"env": {
"BASE_DIR": "<YOUR_BASE_DIR>",
"BASE_DIRS": "<YOUR_BASE_DIRS>",
"DB_PATH": "<YOUR_DB_PATH>",
"CACHE_DIR": "<YOUR_CACHE_DIR>",
"MODEL_NAME": "<YOUR_MODEL_NAME>",
"MAX_FILE_SIZE": "<YOUR_MAX_FILE_SIZE>",
"RAG_MAX_DISTANCE": "<YOUR_RAG_MAX_DISTANCE>",
"RAG_GROUPING": "<YOUR_RAG_GROUPING>",
"RAG_MAX_FILES": "<YOUR_RAG_MAX_FILES>",
"CHUNK_MIN_LENGTH": "<YOUR_CHUNK_MIN_LENGTH>",
"RAG_DEVICE": "<YOUR_RAG_DEVICE>",
"RAG_DTYPE": "<YOUR_RAG_DTYPE>",
"RAG_HYBRID_WEIGHT": "<YOUR_RAG_HYBRID_WEIGHT>",
"RAG_WATCH": "<YOUR_RAG_WATCH>",
"HF_ENDPOINT": "<YOUR_HF_ENDPOINT>",
"HF_AUTO_MIRROR": "<YOUR_HF_AUTO_MIRROR>",
"HTTPS_PROXY": "<YOUR_HTTPS_PROXY>",
"HTTP_PROXY": "<YOUR_HTTP_PROXY>"
}
}
}
}Let your agent find its tools
Find servers like mcp-local-rag MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.