AgentHubAgentHub

mcp-local-rag

MCP ServerMCP Registry官方收录

io.github.shinpr/mcp-local-rag · v0.15.0

Easy-to-setup local RAG server with minimal configuration

概览

mcp-local-rag 是一个MCP Server,收录自 官方 MCP Registry。支持 stdio 传输。本页提供 Cursor、Claude Code 等客户端的安装配置片段。

安装

选择你的平台查看安装方式

{
  "mcpServers": {
    "mcp-local-rag": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-local-rag"
      ]
    }
  }
}

环境变量

BASE_DIR可选

Base directory for document storage (defaults to current working directory). Ignored when BASE_DIRS is set.

BASE_DIRS可选

JSON array of base directories (e.g. '["/a","/b"]'). Takes precedence over BASE_DIR.

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.

RAG_DEVICE可选

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.

RAG_HYBRID_WEIGHT可选

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.

相关资源

统一 Manifest

{
  "id": "io.github.shinpr/mcp-local-rag",
  "type": "mcp-server",
  "version": "0.15.0",
  "displayName": "mcp-local-rag",
  "description": "Easy-to-setup local RAG server with minimal configuration",
  "repository": {
    "url": "https://github.com/shinpr/mcp-local-rag",
    "source": "github"
  },
  "distribution": {
    "packages": [
      {
        "registryType": "npm",
        "identifier": "mcp-local-rag",
        "version": "0.15.0",
        "transport": "stdio",
        "environmentVariables": [
          {
            "name": "BASE_DIR",
            "description": "Base directory for document storage (defaults to current working directory). Ignored when BASE_DIRS is set."
          },
          {
            "name": "BASE_DIRS",
            "description": "JSON array of base directories (e.g. '[\"/a\",\"/b\"]'). Takes precedence over BASE_DIR."
          },
          {
            "name": "DB_PATH",
            "description": "Path to LanceDB database directory (defaults to ./lancedb/)"
          },
          {
            "name": "CACHE_DIR",
            "description": "Directory where Transformers.js models are cached (defaults to ./models/)"
          },
          {
            "name": "MODEL_NAME",
            "description": "Embedding model name (defaults to Xenova/all-MiniLM-L6-v2)"
          },
          {
            "name": "MAX_FILE_SIZE",
            "description": "Maximum file size in bytes (defaults to 104857600 / 100MB)"
          },
          {
            "name": "RAG_MAX_DISTANCE",
            "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",
            "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",
            "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",
            "description": "Minimum chunk length in characters (1-10000, defaults to 50). Chunks shorter than this threshold are filtered out during ingestion."
          },
          {
            "name": "RAG_DEVICE",
            "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_HYBRID_WEIGHT",
            "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."
          }
        ]
      }
    ],
    "remotes": []
  },
  "dependencies": [],
  "installTargets": [
    "claude-code",
    "claude-desktop",
    "cursor",
    "vscode"
  ],
  "keywords": [],
  "provenance": {
    "origin": "official-mcp-registry",
    "originalId": "io.github.shinpr/mcp-local-rag",
    "originalUrl": "https://registry.modelcontextprotocol.io/v0.1/servers/io.github.shinpr%2Fmcp-local-rag/versions/latest",
    "isOfficial": true,
    "status": "active"
  }
}
mcp-local-rag — MCP Server 安装与配置 · AgentHub