CuratedMCP
Gemini CLI
npm

How to install mcp-local-rag in Gemini CLI

Easy-to-setup local RAG server with minimal configuration

Indexed, not yet reviewed

We found mcp-local-rag in the official MCP registry. Our automated check passed on Nov 1, 2026 (it confirms the server is published and reachable), but no one at CuratedMCP has reviewed its code, permissions or credentials handling. Check what it can access before you give it keys. Scan your machine free to see every MCP server you have installed.

Steps

  1. 1Install Node.js 18 or newer (for npx)
  2. 2Open ~/.gemini/settings.json (or .gemini/settings.json in your project)
  3. 3Add the entry below. If the file already has "mcpServers", add just the inner entry
  4. 4Restart Gemini CLI and run /mcp to confirm

Configuration

~/.gemini/settings.json
{
  "mcpServers": {
    "local-rag": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-local-rag"
      ]
    }
  }
}
Environment variableRequiredWhat it is
BASE_DIRNoBase directory for document storage (defaults to current working directory). Ignored when BASE_DIRS is set.
BASE_DIRSNoJSON array of base directories (e.g. '["/a","/b"]'). Takes precedence over BASE_DIR.
IGNORE_PATHSNoJSON array of glob patterns for files to keep out of the index, each matched against the file's path relative to its root (e.g. '["plugs/**","**/*.draft.md"]').
DB_PATHNoPath to LanceDB database directory (defaults to ./lancedb/)
CACHE_DIRNoDirectory where Transformers.js models are cached (defaults to ./models/)
HF_ENDPOINTNoHugging Face model download endpoint. Set this to a mirror URL when direct downloads are blocked (defaults to https://huggingface.co).
MODEL_NAMENoEmbedding model name (defaults to Xenova/all-MiniLM-L6-v2)
MAX_FILE_SIZENoMaximum file size in bytes (defaults to 104857600 / 100MB)
RAG_MAX_DISTANCENoMaximum 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_GROUPINGNoGrouping 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 gro
RAG_MAX_FILESNoMaximum 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. Un
CHUNK_MIN_LENGTHNoMinimum chunk length in characters (1-10000, defaults to 50). Chunks shorter than this threshold are filtered out during ingestion.
STORE_IMAGESNoStore supported PDF and DOCX images during ingestion and return them with matched chunks (defaults to false).
EMBED_TITLE_PREFIXNoEmbed each chunk together with its document title, which can help when passages don't restate the topic the title names (defaults to false). After changing it, use a new DB_PATH or delete the index an
EMBED_HEADING_PREFIXNoAdd section headings to chunk embeddings when they fit (defaults to false). Independent of EMBED_TITLE_PREFIX. Re-ingest documents after changing it.
RAG_DEVICENoExecution 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
RAG_DTYPENoEmbedding 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
RAG_HYBRID_WEIGHTNoKeyword 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_RERANK_CMDNoExternal reranker command template. Use {query} and {top} for query text and result count; unset disables reranking.
RAG_RERANK_TIMEOUT_MSNoTime budget per rerank call in milliseconds (100-600000, defaults to 10000). On timeout the spawned command is killed and the pre-rerank ordering is returned.

Install in other clients

About mcp-local-rag: repo, license and check results →

Maintain mcp-local-rag?

Claim this page to get a full CuratedMCP listing: edit your description, see listing analytics, and add our README badge. Listing is free, and a person checks every submission before it goes live. We'll pre-fill the form from the registry.

    How to install mcp-local-rag MCP server in Gemini CLI | CuratedMCP