mcp-local-rag
БесплатноБез исполняемых скриптовНе проверенSearches, saves, and maintains a local document index through a local RAG MCP server. Use when user says "search my docs", "save this page", "read around that…
Об этом скилле
MCP Local RAG Skills
Tools
| MCP Tool | CLI Equivalent | Use When |
|---|---|---|
ingest_file |
npx mcp-local-rag ingest <path> [--visual] |
Local files (PDF, DOCX, TXT, MD). CLI for bulk/directory. PDF visual mode: see Visual content (PDFs). |
ingest_data |
— | Raw content (HTML, text) with source URL |
query_documents |
npx mcp-local-rag query <text> |
Semantic + keyword hybrid search; optional scope to limit to a path prefix |
delete_file |
npx mcp-local-rag delete <path> |
Remove ingested content |
list_files |
npx mcp-local-rag list [--scope <prefix>] |
File ingestion status; optional scope to limit to a path prefix (reachable scan path) |
status |
npx mcp-local-rag status |
Database stats |
read_chunk_neighbors |
npx mcp-local-rag read-neighbors |
Read N chunks adjacent to a known chunkIndex (context expansion; call after query_documents or grep) |
sync_start |
npx mcp-local-rag sync [path] |
Reconcile the index with disk after files changed outside this session. See Index sync |
sync_status |
— | Poll a sync_start job for progress and its final outcome |
Workflow
- Search: query, then filter by score and topical relevance. Expand a hit with
read_chunk_neighborsonly when it alone cannot ground the answer. - Ingest:
ingest_filefor local files,ingest_datafor raw or web content. - Reconcile:
sync_startonce, then pollsync_status, instead of re-runningingest_filefile by file.
Search: Core Rules
Hybrid search combines vector (semantic) and keyword (BM25) by default.
Score Interpretation
Lower = better match, but the array order is the ranking: with an external reranker configured the first result can carry a worse score than one below it. The bands hold for the default embedding model and keyword weight; under a different configuration, judge each hit against the others in the same response.
| Score | Action |
|---|---|
| < 0.3 | Use directly |
| 0.3-0.5 | Include if it mentions the same concept/entity |
| 0.5-0.7 | Include only if directly relevant to the question |
| > 0.7 | Skip unless no better results |
Score ranks lexical and semantic proximity, not usefulness: drop a hit that shares keywords with the query but not its intent, whatever it scored.
When two hits contradict each other, settle it on source, stated version, and surrounding context — not on score, which says nothing about which one is current or correct — and report the discrepancy when that does not settle it. When a query returns nothing, check list_files before answering that the corpus has no such content — an empty result also means never ingested.
Limit Selection
| Intent | Limit |
|---|---|
| Specific answer (function, error) | 5 |
| General understanding | 10 |
| Comprehensive survey | 20 |
Scope (Optional)
Use scope when one database mixes multiple corpora and you want results from only one. Pass an absolute path prefix, or a list (results are unioned); it matches a filePath equal to or under the prefix.
| Intent | scope |
|---|---|
| Search everything | omit |
| One corpus/folder | absolute prefix, e.g. /Users/me/docs/api |
| Several corpora | list of absolute prefixes |
Prefixes must be absolute, in the server's OS path style — relative prefixes match nothing. If the user gives a relative path, derive an absolute prefix from a filePath in an earlier query_documents/list_files result, or omit scope when no absolute prefix is known.
Query Formulation
The BM25 half matches literally, so carry the user's exact identifiers, error strings, and API names into the query rather than paraphrasing them. The vector half needs enough words to have a topic, so a bare term gains from surrounding context.
When the results do not carry enough evidence to answer the question, add 2-4 variants after the original term. More than that drifts off topic.
fileTitle
Each result carries fileTitle, the title extracted from the document, or null when extraction failed — so group and attribute chunks by filePath/source rather than by title alone.
Stored images
PDF and DOCX query results may include stored image attachments independently of PDF visual ingest.
Treat each image and its chunk text as one evidence unit. For CLI results, decode each data value
according to mimeType and pass the bytes as image input alongside that result's text. See the
CLI reference for CLI image ingestion, output, and sync behavior.
Context Expansion (read_chunk_neighbors)
read_chunk_neighbors (CLI: read-neighbors) is an on-demand context expansion utility. Use it when a query_documents hit lacks enough surrounding context for a grounded answer. Chunks in this index are semantic units — sentences or paragraphs grouped by topic via Max-Min semantic chunking, not fixed-size
Установить mcp-local-rag в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл mcp-local-rag?
Searches, saves, and maintains a local document index through a local RAG MCP server. Use when user says "search my docs", "save this page", "read around that chunk", "sync my index", or invokes `npx mcp-local-rag`.
Как установить скилл mcp-local-rag?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mcp-local-rag запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic