Install
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
Windows / Linux path
%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"io-github-damoqiongqiu-mcp-local-rag": {
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag"
],
"env": {
"BASE_DIR": "cwd",
"BASE_DIRS": "<VALUE>",
"DB_PATH": "./lancedb/",
"CACHE_DIR": "./models/",
"MODEL_NAME": "all-MiniLM-L6-v2",
"MAX_FILE_SIZE": "100",
"RAG_MAX_DISTANCE": "<VALUE>",
"RAG_GROUPING": "<VALUE>",
"RAG_MAX_FILES": "<VALUE>",
"CHUNK_MIN_LENGTH": "50",
"RAG_DEVICE": "cpu",
"RAG_DTYPE": "fp32",
"RAG_HYBRID_WEIGHT": "0.6",
"RAG_WATCH": "<VALUE>",
"HF_ENDPOINT": "huggingface.co",
"HF_AUTO_MIRROR": "true",
"HTTPS_PROXY": "<VALUE>",
"HTTP_PROXY": "<VALUE>"
}
}
}
}
Restart Claude Desktop to activate the new server.
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
Windows / Linux path
.cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global).cursor/mcp.json (project) or ~/.cursor/mcp.json (global){
"mcpServers": {
"io-github-damoqiongqiu-mcp-local-rag": {
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag"
],
"env": {
"BASE_DIR": "cwd",
"BASE_DIRS": "<VALUE>",
"DB_PATH": "./lancedb/",
"CACHE_DIR": "./models/",
"MODEL_NAME": "all-MiniLM-L6-v2",
"MAX_FILE_SIZE": "100",
"RAG_MAX_DISTANCE": "<VALUE>",
"RAG_GROUPING": "<VALUE>",
"RAG_MAX_FILES": "<VALUE>",
"CHUNK_MIN_LENGTH": "50",
"RAG_DEVICE": "cpu",
"RAG_DTYPE": "fp32",
"RAG_HYBRID_WEIGHT": "0.6",
"RAG_WATCH": "<VALUE>",
"HF_ENDPOINT": "huggingface.co",
"HF_AUTO_MIRROR": "true",
"HTTPS_PROXY": "<VALUE>",
"HTTP_PROXY": "<VALUE>"
}
}
}
}
Cursor usually picks up config changes automatically; if the server does not appear, reload the window.
Add to .mcp.json (project) or ~/.claude.json (global)
Windows / Linux path
.mcp.json (project) or %USERPROFILE%\.claude.json (global).mcp.json (project) or ~/.claude.json (global){
"mcpServers": {
"io-github-damoqiongqiu-mcp-local-rag": {
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag"
],
"env": {
"BASE_DIR": "cwd",
"BASE_DIRS": "<VALUE>",
"DB_PATH": "./lancedb/",
"CACHE_DIR": "./models/",
"MODEL_NAME": "all-MiniLM-L6-v2",
"MAX_FILE_SIZE": "100",
"RAG_MAX_DISTANCE": "<VALUE>",
"RAG_GROUPING": "<VALUE>",
"RAG_MAX_FILES": "<VALUE>",
"CHUNK_MIN_LENGTH": "50",
"RAG_DEVICE": "cpu",
"RAG_DTYPE": "fp32",
"RAG_HYBRID_WEIGHT": "0.6",
"RAG_WATCH": "<VALUE>",
"HF_ENDPOINT": "huggingface.co",
"HF_AUTO_MIRROR": "true",
"HTTPS_PROXY": "<VALUE>",
"HTTP_PROXY": "<VALUE>"
}
}
}
}
The server will be available in the next Claude Code session.
Add to .vscode/mcp.json
Windows / Linux path
.vscode\mcp.json.vscode/mcp.json{
"servers": {
"io-github-damoqiongqiu-mcp-local-rag": {
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag"
],
"env": {
"BASE_DIR": "cwd",
"BASE_DIRS": "<VALUE>",
"DB_PATH": "./lancedb/",
"CACHE_DIR": "./models/",
"MODEL_NAME": "all-MiniLM-L6-v2",
"MAX_FILE_SIZE": "100",
"RAG_MAX_DISTANCE": "<VALUE>",
"RAG_GROUPING": "<VALUE>",
"RAG_MAX_FILES": "<VALUE>",
"CHUNK_MIN_LENGTH": "50",
"RAG_DEVICE": "cpu",
"RAG_DTYPE": "fp32",
"RAG_HYBRID_WEIGHT": "0.6",
"RAG_WATCH": "<VALUE>",
"HF_ENDPOINT": "huggingface.co",
"HF_AUTO_MIRROR": "true",
"HTTPS_PROXY": "<VALUE>",
"HTTP_PROXY": "<VALUE>"
}
}
}
}
Reload the VS Code window to activate.
Add to ~/.codeium/windsurf/mcp_config.json
Windows / Linux path
%USERPROFILE%\.codeium\windsurf\mcp_config.json~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"io-github-damoqiongqiu-mcp-local-rag": {
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag"
],
"env": {
"BASE_DIR": "cwd",
"BASE_DIRS": "<VALUE>",
"DB_PATH": "./lancedb/",
"CACHE_DIR": "./models/",
"MODEL_NAME": "all-MiniLM-L6-v2",
"MAX_FILE_SIZE": "100",
"RAG_MAX_DISTANCE": "<VALUE>",
"RAG_GROUPING": "<VALUE>",
"RAG_MAX_FILES": "<VALUE>",
"CHUNK_MIN_LENGTH": "50",
"RAG_DEVICE": "cpu",
"RAG_DTYPE": "fp32",
"RAG_HYBRID_WEIGHT": "0.6",
"RAG_WATCH": "<VALUE>",
"HF_ENDPOINT": "huggingface.co",
"HF_AUTO_MIRROR": "true",
"HTTPS_PROXY": "<VALUE>",
"HTTP_PROXY": "<VALUE>"
}
}
}
}
Restart Windsurf (or refresh its MCP servers panel) to activate the new server.
Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.
Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Windows / Linux path
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json{
"mcpServers": {
"io-github-damoqiongqiu-mcp-local-rag": {
"command": "npx",
"args": [
"-y",
"@damoqiongqiu/mcp-local-rag"
],
"env": {
"BASE_DIR": "cwd",
"BASE_DIRS": "<VALUE>",
"DB_PATH": "./lancedb/",
"CACHE_DIR": "./models/",
"MODEL_NAME": "all-MiniLM-L6-v2",
"MAX_FILE_SIZE": "100",
"RAG_MAX_DISTANCE": "<VALUE>",
"RAG_GROUPING": "<VALUE>",
"RAG_MAX_FILES": "<VALUE>",
"CHUNK_MIN_LENGTH": "50",
"RAG_DEVICE": "cpu",
"RAG_DTYPE": "fp32",
"RAG_HYBRID_WEIGHT": "0.6",
"RAG_WATCH": "<VALUE>",
"HF_ENDPOINT": "huggingface.co",
"HF_AUTO_MIRROR": "true",
"HTTPS_PROXY": "<VALUE>",
"HTTP_PROXY": "<VALUE>"
}
}
}
}
Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.
Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.
Configuration
Environment variables this server reads. Secrets stay on your machine.
| Name | Required | Description |
|---|---|---|
| BASE_DIR | No | Document root (security boundary). The folder you want to search. Default: cwd |
| BASE_DIRS | No | JSON array of roots, overrides BASE_DIR. Example: '["/path1","/path2"]' |
| DB_PATH | No | Vector database path. Default: ./lancedb/ |
| CACHE_DIR | No | Model cache directory. Recommend absolute path. Default: ./models/ |
| MODEL_NAME | No | HuggingFace model ID for embeddings. Default: all-MiniLM-L6-v2 |
| MAX_FILE_SIZE | No | Max file size in bytes. Default: 100 |
| RAG_MAX_DISTANCE | No | Maximum distance threshold for search results. |
| RAG_GROUPING | No | Grouping strategy: 'similar' or 'related'. |
| RAG_MAX_FILES | No | Limit results to top N files. |
| CHUNK_MIN_LENGTH | No | Minimum chunk length (1–10000 characters). Default: 50 |
| RAG_DEVICE | No | ONNX execution device (cpu or webgpu). Default: cpu |
| RAG_DTYPE | No | Quantization precision (fp32/fp16/q8). Default: fp32 |
| RAG_HYBRID_WEIGHT | No | Keyword boost weight: 0 = semantic only, 1 = keyword only. Default: 0.6 |
| RAG_WATCH | No | File watching (true/1 enables). |
| HF_ENDPOINT | No | Manual mirror override for HuggingFace. Default: huggingface.co |
| HF_AUTO_MIRROR | No | Auto-detection of mirror (true/1 enables, false disables). Default: true |
| HTTPS_PROXY | No | Model download proxy. Example: http://127.0.0.1:7890 |
| HTTP_PROXY | No | HTTP proxy URL for downloading embedding models. Fallback if HTTPS_PROXY is not set. |