mcp-local-rag/setup

mcp-local-rag/setup is a skill for Claude Code, Codex from damoqiongqiu/mcp-local-rag. It costs 27 tokens per session (2,218 once invoked), scanned A, original, from a forked repository, MIT.

Installation and configuration instructions for a local code and document search tool, including model downloads, environment settings, and troubleshooting.

In plain words
What is it for?
Setting up the local search service, configuring its index and model cache, choosing search settings, and diagnosing installation issues.
Why use it?
They explain how to install the tool, configure its project folders, handle first-use model downloads, and work around network access problems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/me/docs.

Good fit Setting up the local search service, configuring its index and model cache, choosing search settings, and diagnosing installation issues.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-local-rag/setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/damoqiongqiu/mcp-local-rag/setup/github.svg)](https://agentmods.dev/skills/damoqiongqiu/mcp-local-rag/setup)
Your own site
<a href="https://agentmods.dev/skills/damoqiongqiu/mcp-local-rag/setup"><img src="https://agentmods.dev/badge/skills/damoqiongqiu/mcp-local-rag/setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-local-rag/setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/damoqiongqiu/mcp-local-rag/setup"><img src="https://agentmods.dev/badge/skills/damoqiongqiu/mcp-local-rag/setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,218 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin fork From a forked repository.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.02218
Opus 5 $0.00014 $0.01109
Sonnet 5 $0.00005 $0.00444
Haiku 4.5 $0.00003 $0.00222

Measured 10d ago against content hash 70e2da730240, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

mcp-local-rag/setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/mcp-local-rag/setup/SKILL.md · 216 lines

How it starts

The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.

安装与排障


安装

全局安装(推荐)

npm install -g @damoqiongqiu/mcp-local-rag

按需运行

不安装也行,通过 npx @damoqiongqiu/mcp-local-rag 按需拉取运行。

WorkBuddy 配置

在 WorkBuddy 中配置为 MCP Connector(stdio transport),按需设置环境变量即可。无需额外安装步骤。

推荐配置(代码项目)

{
  "mcpServers": {
    "mcp-local-rag": {
      "command": "npx",
      "args": ["-y", "@damoqiongqiu/mcp-local-rag"],
      "env": {
        "BASE_DIR": "/path/to/your/project",
        "RAG_HYBRID_WEIGHT": "0.7"
      }
    }
  }
}

RAG_HYBRID_WEIGHT: 0.7 是代码场景的推荐值——在语义理解和精确符号匹配之间取得平衡。纯文档场景可降至 0.4


首次运行与模型下载

首次 ingest_filequery_documents 调用会触发模型下载:

  • Embedding 模型Xenova/all-MiniLM-L6-v2(默认),约 80MB
  • VLM 模型(可选)
    • fastHuggingFaceTB/SmolVLM-256M-Instruct,约 250MB
    • qualityonnx-community/Qwen2.5-VL-3B-Instruct-ONNX,约 2.9GB
  • 缓存位置CACHE_DIR(默认 ./models/),模型下载后缓存复用,不再需要联网

模型仅在首次使用时下载,后续离线可用。


🇨🇳 国内网络注意事项

mcp-local-rag 依赖 HuggingFace(huggingface.co)下载模型。国内网络环境下可能无法直接访问。v0.18.5 提供了三层保障:

⚡ 推荐:配置代理(最简单可靠)

如果你已经在本地运行 ClashX / V2Ray 等代理工具,只需设置 HTTPS_PROXY,一切自动工作:

export HTTPS_PROXY=http://127.0.0.1:7890

在 MCP connector 配置中:

{
  "mcpServers": {
    "mcp-local-rag": {
      "command": "npx",
      "args": ["-y", "@damoqiongqiu/mcp-local-rag"],
      "env": {
        "BASE_DIR": "/path/to/your/project",
        "HTTPS_PROXY": "http://127.0.0.1:7890"
      }
    }
  }
}

💡 v0.18.5 改进:Node.js 22 内置的 undici HTTP 库默认不读取 HTTPS_PROXY。v0.18.5 通过 setGlobalDispatcher 全局注入代理,确保所有模型下载请求都走代理,无需额外配置。

🔄 自动镜像回退(无需代理)

如果你没有本地代理,mcp-local-rag 自带三级镜像链,首次下载前自动探测:

  1. huggingface.co (官方) → 3s 超时
  2. hf-mirror.com (社区镜像) → 文件下载 + API 双重验证
  3. modelscope.cn (魔搭社区) → 完整托管所有 ONNX 权重文件

整个过程会清晰打印日志:

Embedder: Using proxy "http://127.0.0.1:7890" for all network requests
Embedder: Downloading model from https://huggingface.co ...

如果代理未设置且直连失败:

Embedder: huggingface.co is unreachable, auto-switching to mirror https://hf-mirror.com
Embedder: Mirror https://hf-mirror.com is reachable but Hub API is unavailable
Embedder: Auto-switching to mirror https://modelscope.cn

Read the full file on GitHub · 216 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 216 lines · 27 tokens per session scan A 70e2da730240

Subscribe to this mod's changes

mcp-local-rag/setup is a skill published in the GitHub repository damoqiongqiu/mcp-local-rag (13 stars, last pushed 1mo ago), licensed MIT. It adds 27 tokens to every session and 2,218 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It comes from a forked repository.

Related

Other skills, from other repositories

citation-system

A Chinese-language guide for designing systems that show where information comes from, such as document question-answering or search-based answers. It covers inline source markers, keeping citations during rewrites, and making factual claims traceable.

kangarooking/system-prompt-skills · 101 tokens

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

9router-embeddings

Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.

decolua/9router · 66 tokens

azure-search-documents-dotnet

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…

microsoft/skills · 102 tokens

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 tokens