mcp local rag for VS Code
io.github.shinpr/mcp-local-rag
Easy-to-setup local RAG server with minimal configuration
client:VS Code
transport:stdio
runtime:npm
Install mcp local rag in VS Code
.vscode/mcp.json
{
"inputs": [
{
"type": "promptString",
"id": "base-dir",
"description": "BASE_DIR",
"password": true
},
{
"type": "promptString",
"id": "base-dirs",
"description": "BASE_DIRS",
"password": true
},
{
"type": "promptString",
"id": "db-path",
"description": "DB_PATH",
"password": true
},
{
"type": "promptString",
"id": "cache-dir",
"description": "CACHE_DIR",
"password": true
},
{
"type": "promptString",
"id": "hf-endpoint",
"description": "HF_ENDPOINT",
"password": true
},
{
"type": "promptString",
"id": "model-name",
"description": "MODEL_NAME",
"password": true
},
{
"type": "promptString",
"id": "max-file-size",
"description": "MAX_FILE_SIZE",
"password": true
},
{
"type": "promptString",
"id": "rag-max-distance",
"description": "RAG_MAX_DISTANCE",
"password": true
},
{
"type": "promptString",
"id": "rag-grouping",
"description": "RAG_GROUPING",
"password": true
},
{
"type": "promptString",
"id": "rag-max-files",
"description": "RAG_MAX_FILES",
"password": true
},
{
"type": "promptString",
"id": "chunk-min-length",
"description": "CHUNK_MIN_LENGTH",
"password": true
},
{
"type": "promptString",
"id": "store-images",
"description": "STORE_IMAGES",
"password": true
},
{
"type": "promptString",
"id": "rag-device",
"description": "RAG_DEVICE",
"password": true
},
{
"type": "promptString",
"id": "rag-dtype",
"description": "RAG_DTYPE",
"password": true
},
{
"type": "promptString",
"id": "rag-hybrid-weight",
"description": "RAG_HYBRID_WEIGHT",
"password": true
},
{
"type": "promptString",
"id": "rag-rerank-cmd",
"description": "RAG_RERANK_CMD",
"password": true
},
{
"type": "promptString",
"id": "rag-rerank-timeout-ms",
"description": "RAG_RERANK_TIMEOUT_MS",
"password": true
}
],
"servers": {
"mcp-local-rag": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-local-rag"
],
"env": {
"BASE_DIR": "${input:base-dir}",
"BASE_DIRS": "${input:base-dirs}",
"DB_PATH": "${input:db-path}",
"CACHE_DIR": "${input:cache-dir}",
"HF_ENDPOINT": "${input:hf-endpoint}",
"MODEL_NAME": "${input:model-name}",
"MAX_FILE_SIZE": "${input:max-file-size}",
"RAG_MAX_DISTANCE": "${input:rag-max-distance}",
"RAG_GROUPING": "${input:rag-grouping}",
"RAG_MAX_FILES": "${input:rag-max-files}",
"CHUNK_MIN_LENGTH": "${input:chunk-min-length}",
"STORE_IMAGES": "${input:store-images}",
"RAG_DEVICE": "${input:rag-device}",
"RAG_DTYPE": "${input:rag-dtype}",
"RAG_HYBRID_WEIGHT": "${input:rag-hybrid-weight}",
"RAG_RERANK_CMD": "${input:rag-rerank-cmd}",
"RAG_RERANK_TIMEOUT_MS": "${input:rag-rerank-timeout-ms}"
}
}
}
}
VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs