Local-first RAG MCP server: hybrid search over a folder of your own documents
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A local-first RAG (retrieval-augmented generation) MCP server. Point it at a folder of documents and it gives your MCP client (Claude Code, Cursor, Codex, ...) hybrid search β semantic vector similarity plus a keyword boost for exact terms β over that content.
Nothing leaves your machine except two things: the one-time embedding-model
download on first use, and the explicit ingest_url call when you ask it to
fetch a web page. Ingesting local files, indexing, and querying never touch
the network.
It is a Python, MCP-native analog of shinpr/mcp-local-rag (TypeScript), built on fastmcp, fastembed, and LanceDB.
markitdown (PDF, DOCX, PPTX, XLSX,
HTML, CSV, EPUB, Jupyter notebooks, Markdown, and plain text), plus direct
text/markdown/HTML ingestion and URL fetching.[ocr] extra β image-only PDFs are recognized
page by page and standalone images become documents, locally, on the CPU.
See OCR for scanned documents.status always answers.Every client below launches the same process; only the config format differs.
Replace /absolute/path/to/docs with the folder you want indexed.
The invocation is uvx minirag-mcp. It resolves and caches the package on
first run, so start-up is slow once and fast afterwards.
uvx resolves that name from PyPI, so the snippets below work from release
0.1.0 onward; on an earlier revision use From an unreleased
revision instead. That distinction is worth
checking before you paste: claude mcp add writes the entry without ever
running the command, so an unresolvable package looks like a successful setup
and only fails later, silently, when the client tries to launch the server.
Edit the config file β create it if it does not exist:
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Then quit Claude Desktop completely (Cmd+Q on macOS, not just closing the
window) and reopen it. The config is read at launch; closing the window leaves
the old process running with the old config.
Two things that catch people out:
Give command an absolute path. Desktop apps do not inherit your shell's
PATH. uvx usually lives in ~/.local/bin, which is not on the PATH a
GUI-launched process sees, so a bare "uvx" fails with nothing useful in the
UI. Run which uvx and paste the result. The other snippets on this page can
use a bare uvx because a terminal-launched client has your PATH.
Merge, do not replace. If the file already exists it holds your other
servers and preferences under the same top-level object β add minirag inside
the existing mcpServers, and leave everything else alone. Back the file up
first; a malformed JSON file makes Desktop start with no servers at all and
says little about why.
To check the config before restarting, run the same command by hand β it should print your configuration and exit:
~/.cursor/mcp.json)~/.codex/config.toml)To run a revision that hasn't been released to PyPI β an unreleased fix, or one
specific commit β install from this repository instead. In any snippet above,
replace uvx minirag-mcp with:
As an argument list, that is ["--from", "git+https://github.com/sfrangulov/minirag-mcp", "minirag-mcp"].
Append @<tag-or-sha> to the URL to pin a revision.
For development, or to run the CLI against a working tree you can edit:
The index starts empty β nothing is scanned until you ask for it:
sync_start, then poll
sync_status until it reports succeeded). From a terminal you can do
the same thing synchronously: minirag-mcp sync --base-dir /absolute/path/to/docs.query_documents).The first sync (or the first ingest of any kind) downloads the embedding model β see Requirements.
uvx)Files under the document root(s) with one of these 12 extensions are picked
up by sync_start/sync and ingest_file/ingest, converted to Markdown by
markitdown:
.md .markdown .txt .pdf .docx .pptx .xlsx .html .htm .csv
.epub .ipynb
A scan skips dot-prefixed names and the ~$β¦ lock files Word, Excel and
PowerPoint keep beside every open document. Such a lock file carries the
extension of the document it guards but holds none of its content, so before it
was skipped a sync failed on it and sync exited 1 while somebody had a
document open.
Embedded pictures are not indexed. markitdown inlines each one as an
 placeholder β on one measured corpus of
office documents that was 8.5% of all chunks β so the placeholder is removed before
chunking and only its alt text is kept. Image links that point at a path or an
http URL are references, not inlined pictures, and stay as written, as does a
data: URI inside a fenced code block.
A PDF that is a scan carries no text to convert, and image files are not in that
list at all. Both need the optional [ocr] extra β see OCR for scanned
documents.
Two more ways to get content in without a file on disk:
ingest_data β hand the server text, Markdown, or HTML content
directly (format: text|markdown|html), under a source id you choose.ingest_url β the server fetches an http/https URL itself via
markitdown's convert_url (YouTube, Wikipedia, and RSS get
format-specific handling automatically). This is the one tool that reaches
the network. Private and local hosts are refused unless
ALLOW_PRIVATE_URLS says otherwise β see
Security and Operation.A scanned PDF is a picture of a page. markitdown finds no text in it, so the
document reaches the index empty β which is to say it does not reach the index at
all. The optional [ocr] extra reads those pages locally, on the CPU
(RapidOCR on the same ONNX runtime the
embedding model already uses), and turns standalone image files into documents.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/minirag-mcp)<a href="https://allmcps.com/mcp/minirag-mcp"><img src="https://allmcps.com/api/badge/minirag-mcp?style=directory" alt="Minirag MCP on AllMCPs" /></a>