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.
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.
[](https://agentmods.dev/skills/damoqiongqiu/mcp-local-rag/setup)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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_file 或 query_documents 调用会触发模型下载:
- Embedding 模型:
Xenova/all-MiniLM-L6-v2(默认),约 80MB - VLM 模型(可选):
fast:HuggingFaceTB/SmolVLM-256M-Instruct,约 250MBquality:onnx-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 自带三级镜像链,首次下载前自动探测:
huggingface.co(官方) → 3s 超时hf-mirror.com(社区镜像) → 文件下载 + API 双重验证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
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.
- 10d ago First seen · 216 lines · 27 tokens per session scan A 70e2da730240
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.
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.
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…
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.
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.
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"…
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.