← Index

io.github.shinpr/mcp-local-rag

io.github.shinpr/mcp-local-rag·v0.13.0·Memory & RAG
Quality Score
80
/100

Easy-to-setup local RAG server with minimal configuration

§01  Install
Claude Desktop (claude_desktop_config.json)
{
  "mcpServers": {
    "mcp-local-rag": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-local-rag"
      ],
      "env": {
        "BASE_DIR": "<base_dir>",
        "DB_PATH": "<db_path>",
        "CACHE_DIR": "<cache_dir>",
        "MODEL_NAME": "<model_name>",
        "MAX_FILE_SIZE": "<max_file_size>",
        "RAG_MAX_DISTANCE": "<rag_max_distance>",
        "RAG_GROUPING": "<rag_grouping>",
        "RAG_MAX_FILES": "<rag_max_files>",
        "CHUNK_MIN_LENGTH": "<chunk_min_length>"
      }
    }
  }
}
Cursor (.cursor/mcp.json)
{
  "mcpServers": {
    "mcp-local-rag": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-local-rag"
      ],
      "env": {
        "BASE_DIR": "<base_dir>",
        "DB_PATH": "<db_path>",
        "CACHE_DIR": "<cache_dir>",
        "MODEL_NAME": "<model_name>",
        "MAX_FILE_SIZE": "<max_file_size>",
        "RAG_MAX_DISTANCE": "<rag_max_distance>",
        "RAG_GROUPING": "<rag_grouping>",
        "RAG_MAX_FILES": "<rag_max_files>",
        "CHUNK_MIN_LENGTH": "<chunk_min_length>"
      }
    }
  }
}
Cline (cline_mcp_settings.json)
npx -y mcp-local-rag
§02  Environment variables
BASE_DIR

Base directory for document storage (defaults to current working directory)

DB_PATH

Path to LanceDB database directory (defaults to ./lancedb/)

CACHE_DIR

Directory where Transformers.js models are cached (defaults to ./models/)

MODEL_NAME

Embedding model name (defaults to Xenova/all-MiniLM-L6-v2)

MAX_FILE_SIZE

Maximum file size in bytes (defaults to 104857600 / 100MB)

RAG_MAX_DISTANCE

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)

RAG_GROUPING

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

RAG_MAX_FILES

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.

CHUNK_MIN_LENGTH

Minimum chunk length in characters (1-10000, defaults to 50). Chunks shorter than this threshold are filtered out during ingestion.

§03  MCP Quality Score  ·  methodology
freshness
25
completeness
10
installability
25
documentation
15
stability
5
§04  Alternatives in Memory & RAG