Koskamo

mcp-local-rag

A local-first RAG server that indexes PDF, DOCX, Markdown, and text files on your machine. It combines semantic similarity with keyword matching to search code and technical docs without sending data to external APIs. It requires no API keys, Docker, Python, or external databases, working offline after the initial model download.

Package and access

Local package with source-attributed installation metadata. Koskamo does not execute packages during review.

mcp-local-rag logo, by shinprCommunity listingLocal stdioSource reviewed; not executedPublished by shinpr
Vendor documentation

Checks and signals

Each line is separate evidence, not a trust score.

  • Popularity 429 GitHub stars

What you can do with it

  • Search private documents from an MCP client or terminal
  • Index PDF, DOCX, Markdown, and text files locally
  • Perform semantic and keyword search on code and technical docs

Source and maintenance

Community listingRegistry 0.23.1MIT
Last repository push
Latest release
v0.23.1
Maintenance checked

Packages and installation

Source-provided package data. Koskamo has not executed or live-probed this package.

mcp-local-rag 0.23.1

npm
mcp-local-rag package definition
{
  "version": "0.23.1",
  "transport": "stdio",
  "identifier": "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": "IGNORE_PATHS",
      "format": "string",
      "description": "JSON 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\"]')."
    },
    {
      "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": "HF_ENDPOINT",
      "format": "string",
      "description": "Hugging Face model download endpoint. Set this to a mirror URL when direct downloads are blocked (defaults to https://huggingface.co)."
    },
    {
      "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": "STORE_IMAGES",
      "format": "string",
      "description": "Store supported PDF and DOCX images during ingestion and return them with matched chunks (defaults to false)."
    },
    {
      "name": "EMBED_TITLE_PREFIX",
      "format": "string",
      "description": "Embed 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 and re-ingest."
    },
    {
      "name": "EMBED_HEADING_PREFIX",
      "format": "string",
      "description": "Add section headings to chunk embeddings when they fit (defaults to false). Independent of EMBED_TITLE_PREFIX. Re-ingest documents after changing it."
    },
    {
      "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_RERANK_CMD",
      "format": "string",
      "description": "External reranker command template. Use {query} and {top} for query text and result count; unset disables reranking."
    },
    {
      "name": "RAG_RERANK_TIMEOUT_MS",
      "format": "string",
      "description": "Time 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."
    }
  ]
}

Tools

Reported by the attributed source; not independently observed by Koskamo.

No tool definitions available.

Maintenance history

Public check and source-refresh events. Editorial and ownership records remain private.

  • · repository · passed · metadata changed · updated
  • · backfill · recorded · Pre-expansion baseline; unobserved rich metadata remains unknown

Connect from your client

Each snippet configures the same source-provided package; replace placeholders before use.

This server is operated by the named third party. Listing and endpoint checks are not an endorsement or a security audit. Review the operator's permissions, terms, and data handling before connecting. How listings are checked and corrected.

Cursor

Merge this local stdio configuration, replace every placeholder environment value, and restart Cursor. Koskamo has not executed this package.
Cursor configuration
{
  "mcpServers": {
    "mcp-local-rag": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-local-rag@0.23.1"
      ],
      "env": {
        "BASE_DIR": "<YOUR_BASE_DIR>",
        "BASE_DIRS": "<YOUR_BASE_DIRS>",
        "IGNORE_PATHS": "<YOUR_IGNORE_PATHS>",
        "DB_PATH": "<YOUR_DB_PATH>",
        "CACHE_DIR": "<YOUR_CACHE_DIR>",
        "HF_ENDPOINT": "<YOUR_HF_ENDPOINT>",
        "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>",
        "STORE_IMAGES": "<YOUR_STORE_IMAGES>",
        "EMBED_TITLE_PREFIX": "<YOUR_EMBED_TITLE_PREFIX>",
        "EMBED_HEADING_PREFIX": "<YOUR_EMBED_HEADING_PREFIX>",
        "RAG_DEVICE": "<YOUR_RAG_DEVICE>",
        "RAG_DTYPE": "<YOUR_RAG_DTYPE>",
        "RAG_HYBRID_WEIGHT": "<YOUR_RAG_HYBRID_WEIGHT>",
        "RAG_RERANK_CMD": "<YOUR_RAG_RERANK_CMD>",
        "RAG_RERANK_TIMEOUT_MS": "<YOUR_RAG_RERANK_TIMEOUT_MS>"
      }
    }
  }
}

Cline

Merge this local stdio configuration, replace every placeholder environment value, and restart Cline. Koskamo has not executed this package.
Cline configuration
{
  "mcpServers": {
    "mcp-local-rag": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-local-rag@0.23.1"
      ],
      "env": {
        "BASE_DIR": "<YOUR_BASE_DIR>",
        "BASE_DIRS": "<YOUR_BASE_DIRS>",
        "IGNORE_PATHS": "<YOUR_IGNORE_PATHS>",
        "DB_PATH": "<YOUR_DB_PATH>",
        "CACHE_DIR": "<YOUR_CACHE_DIR>",
        "HF_ENDPOINT": "<YOUR_HF_ENDPOINT>",
        "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>",
        "STORE_IMAGES": "<YOUR_STORE_IMAGES>",
        "EMBED_TITLE_PREFIX": "<YOUR_EMBED_TITLE_PREFIX>",
        "EMBED_HEADING_PREFIX": "<YOUR_EMBED_HEADING_PREFIX>",
        "RAG_DEVICE": "<YOUR_RAG_DEVICE>",
        "RAG_DTYPE": "<YOUR_RAG_DTYPE>",
        "RAG_HYBRID_WEIGHT": "<YOUR_RAG_HYBRID_WEIGHT>",
        "RAG_RERANK_CMD": "<YOUR_RAG_RERANK_CMD>",
        "RAG_RERANK_TIMEOUT_MS": "<YOUR_RAG_RERANK_TIMEOUT_MS>"
      }
    }
  }
}

VS Code

Merge this local stdio configuration, replace every placeholder environment value, and restart VS Code. Koskamo has not executed this package.
VS Code configuration
{
  "servers": {
    "mcp-local-rag": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-local-rag@0.23.1"
      ],
      "env": {
        "BASE_DIR": "<YOUR_BASE_DIR>",
        "BASE_DIRS": "<YOUR_BASE_DIRS>",
        "IGNORE_PATHS": "<YOUR_IGNORE_PATHS>",
        "DB_PATH": "<YOUR_DB_PATH>",
        "CACHE_DIR": "<YOUR_CACHE_DIR>",
        "HF_ENDPOINT": "<YOUR_HF_ENDPOINT>",
        "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>",
        "STORE_IMAGES": "<YOUR_STORE_IMAGES>",
        "EMBED_TITLE_PREFIX": "<YOUR_EMBED_TITLE_PREFIX>",
        "EMBED_HEADING_PREFIX": "<YOUR_EMBED_HEADING_PREFIX>",
        "RAG_DEVICE": "<YOUR_RAG_DEVICE>",
        "RAG_DTYPE": "<YOUR_RAG_DTYPE>",
        "RAG_HYBRID_WEIGHT": "<YOUR_RAG_HYBRID_WEIGHT>",
        "RAG_RERANK_CMD": "<YOUR_RAG_RERANK_CMD>",
        "RAG_RERANK_TIMEOUT_MS": "<YOUR_RAG_RERANK_TIMEOUT_MS>"
      }
    }
  }
}

Claude Desktop

Merge this local stdio configuration, replace every placeholder environment value, and restart Claude Desktop. Koskamo has not executed this package.
Claude Desktop configuration
{
  "mcpServers": {
    "mcp-local-rag": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-local-rag@0.23.1"
      ],
      "env": {
        "BASE_DIR": "<YOUR_BASE_DIR>",
        "BASE_DIRS": "<YOUR_BASE_DIRS>",
        "IGNORE_PATHS": "<YOUR_IGNORE_PATHS>",
        "DB_PATH": "<YOUR_DB_PATH>",
        "CACHE_DIR": "<YOUR_CACHE_DIR>",
        "HF_ENDPOINT": "<YOUR_HF_ENDPOINT>",
        "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>",
        "STORE_IMAGES": "<YOUR_STORE_IMAGES>",
        "EMBED_TITLE_PREFIX": "<YOUR_EMBED_TITLE_PREFIX>",
        "EMBED_HEADING_PREFIX": "<YOUR_EMBED_HEADING_PREFIX>",
        "RAG_DEVICE": "<YOUR_RAG_DEVICE>",
        "RAG_DTYPE": "<YOUR_RAG_DTYPE>",
        "RAG_HYBRID_WEIGHT": "<YOUR_RAG_HYBRID_WEIGHT>",
        "RAG_RERANK_CMD": "<YOUR_RAG_RERANK_CMD>",
        "RAG_RERANK_TIMEOUT_MS": "<YOUR_RAG_RERANK_TIMEOUT_MS>"
      }
    }
  }
}

Let your agent find its tools

Find servers like mcp-local-rag from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.