Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add damoqiongqiu/mcp-local-rag --skill managegit clone --depth 1 https://github.com/damoqiongqiu/mcp-local-ragWrote 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/manage)<a href="https://agentmods.dev/skills/damoqiongqiu/mcp-local-rag/manage"><img src="https://agentmods.dev/badge/skills/damoqiongqiu/mcp-local-rag/manage/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/manage"><img src="https://agentmods.dev/badge/skills/damoqiongqiu/mcp-local-rag/manage.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.00025 | $0.00869 |
| Opus 5 | $0.00013 | $0.00434 |
| Sonnet 5 | $0.00005 | $0.00174 |
| Haiku 4.5 | $0.00003 | $0.00087 |
Grade A, and why
mcp-local-rag/manage 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 12d 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.
What it actually says
管理与维护
Tools
list_files —— 列出已摄入文件
list_files({ scope?: string | string[] })
scope可选,限定目录前缀(必须绝对路径)- 返回每个文件的摄入状态、chunk 数量等
ingest_data摄入的 sources 始终被列出,不受 scope 限制
delete_file —— 删除已摄入内容
delete_file({ filePath: string })
// 或
delete_file({ source: string })
filePath和source二选一- 幂等:目标不存在也返回成功
status —— 查看统计
status()
无参数。返回:文件总数、chunk 总数、数据库路径、已配置的根目录等。
诊断用途:当用户反馈搜索不到内容或摄入范围异常时,先调用 status 检查当前配置的根目录和有效 warning。
文档根目录(安全边界)
所有 ingest / list / delete / read_chunk_neighbors 操作均被限制在已配置的根目录内。
| 方式 | 说明 | 场景 |
|---|---|---|
BASE_DIR 环境变量 |
单路径 | 单根目录(兼容旧版) |
BASE_DIRS 环境变量 |
JSON 数组,如 '["/a","/b"]' |
多根目录 |
CLI --base-dir |
可重复参数 | CLI 多根目录,会覆盖环境变量 |
优先级:CLI --base-dir > BASE_DIRS > BASE_DIR > process.cwd()
配置警告(作为响应中的附加 content block 出现):
BASE_DIRS is set; BASE_DIR is ignored.→ 两者同时配置,BASE_DIR 被自动忽略Nested base directory pruned: <child> is inside <parent>.→ 配置了嵌套的根目录,子目录被裁剪
CLI 速查
| 操作 | CLI 命令 |
|---|---|
| 摄入文件 | npx @damoqiongqiu/mcp-local-rag ingest <path> [--visual] [--visual-quality fast|quality] |
| 摄入目录 | npx @damoqiongqiu/mcp-local-rag ingest <dir>(如 ./src/) |
| 搜索 | npx @damoqiongqiu/mcp-local-rag query <text> [--limit n] [--scope prefix] |
| 列出 | npx @damoqiongqiu/mcp-local-rag list [--base-dir path] [--scope prefix] |
| 状态 | npx @damoqiongqiu/mcp-local-rag status |
| 删除 | npx @damoqiongqiu/mcp-local-rag delete [--source url] [path] |
| 上下文 | npx @damoqiongqiu/mcp-local-rag read-neighbors --file-path <abs-path> --chunk-index <n> [--before n] [--after n] |
CLI 全局选项(--db-path, --cache-dir, --model-name)优先级:CLI 参数 > 环境变量 > 默认值。
Config 匹配:对已有数据库操作时,--model-name 等选项必须与 MCP server 配置一致。切换模型会改变向量空间,搜索质量无声降级。
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.
- 12d ago First seen · 90 lines · 25 tokens per session scan A c15ec0b62366
mcp-local-rag/manage is a skill published in the GitHub repository damoqiongqiu/mcp-local-rag (13 stars, last pushed 1mo ago), licensed MIT. It adds 25 tokens to every session and 869 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
markitdown
Convert heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.
llamaindex
Data framework for building LLM applications with RAG. Specializes in document ingestion (300+ connectors), indexing, and querying. Features vector indices, query engines, agents, and multi-modal support. Use for document Q&A, chatbots, knowledge retrieval, or building RAG pipelines. Best for data-centric LLM…
azure-ai
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
kb-retriever
A retrieval and question-answering assistant for a local folder of documents, including Markdown, text, PDFs, and spreadsheets.
bailian-kb
A command-line manager for Alibaba Cloud Bailian knowledge bases, which are collections of documents prepared for search and question answering. It handles the stored documents, search services, text chunks, and data-centre files rather than everyday searches.
azure-ai-contentunderstanding-py
Multimodal AI service that extracts semantic content from documents, video, audio, and image files for RAG and automated workflows.