Practical overview
When it fits
Use it when you have supported local documents to search and want a semantic-plus-keyword retrieval workflow through an MCP client or terminal.
Who it is for
- Developers who want to search private technical documentation or code-related reference material locally.
- People using an MCP client who want document search as part of their client workflow.
- Terminal users who want to ingest and query a local document index through a CLI.
Documented uses
- Find documentation passages relevant to a question while also matching exact technical terms.
- Search local PDF, DOCX, Markdown and text collections without sending documents to an embedding API.
- Inspect surrounding chunks and use available source locations to check a result against its original document.
- Refresh an index after documents are added, edited or removed.
Requirements & limits
Requires Node.js 22 or later. First use requires internet access to download the npm package and embedding model; subsequent text ingestion and search work offline after the model is cached. The repository identifies the project as MIT-licensed.
- Combines semantic similarity with keyword matching rather than relying only on one search method.
- Indexes PDF, DOCX, TXT and Markdown files; HTML must be fetched by the client before it is passed to the server.
- Requires an explicit document root for MCP use;
BASE_DIRis also the file-operation boundary. - Search results can include passages and, where available, headings, line numbers or page numbers.
- Sync skips unchanged files and removes entries for deleted files; repeat sync after collection changes.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up an MCP document index
Configure an MCP client to index a local directory and search its supported documents.
Before you start
- Node.js 22 or later
- Internet access on first use to download the npm package and embedding model
- A directory of documents and its absolute path
- An MCP client with a configuration format supported by the project
Steps
Set
BASE_DIRto the absolute path of the document directory in the MCP server configuration.Register the command below as the local MCP server using the configuration format for your client.
npx -y mcp-local-ragRestart the client and request a sync of all documents in the configured root.
After sync completes, ask the client a question about the indexed documents.
Expected outcome
The MCP client can search the indexed local documents using semantic matching and keyword search.
Guide limitations
- The first sync downloads the default embedding model, about 90 MB, and may take 1–2 minutes before ingestion starts.
- MCP file paths must be absolute and inside a configured document root.
- Supported file ingestion covers PDF, DOCX, TXT and Markdown; HTML must already have been fetched by the client.
Ingest and query documents with the CLI
Use the terminal to ingest a document directory and search its index.
Before you start
- Node.js 22 or later
- Internet access on first use to download the npm package and embedding model
- A directory containing supported documents
Steps
Open a terminal in the document directory.
Run the command below to ingest the selected directory.
npx mcp-local-rag ingest ./docs/Run the command below to search it.
npx mcp-local-rag query "authentication API"
Expected outcome
The CLI returns search results from the ingested documents, matching semantic relevance and keywords.
Guide limitations
- The CLI uses the current directory as its document root by default; run ingestion and query from the same directory or set
BASE_DIRandDB_PATHexplicitly. - File ingestion supports PDF, DOCX, TXT and Markdown, not Excel, PowerPoint, standalone images or source-code file extensions.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 13 October 2026
- Original website title
- shinpr/mcp-local-rag · Official homepage title · retained in its source language

