
RAG for your documents
io.github.DevilsDevPublished by GitHub account DevilsDevv3.8.1Updated Nov 7, 2026
Search a folder of documents and check answers against them. Offline: no API key or database.
Overview
A local MCP server that indexes a folder of documents and lets an assistant search them and check answers against them, fully offline.
- What you can do
- Search indexed documents with a natural-language query and get ranked passages with source file and chunk ids.
- Check a proposed answer against retrieved or supplied passages, returning groundedness score, unsupported sentences and citations.
- Index Markdown, HTML, CSV and text files from a folder and its subfolders, skipping node_modules and .git.
- Tune how many passages come back per call with topK or a startup option.
- When to use it
- Useful when you want an assistant to answer questions from a private or local document set without sending content to an embedding API or database, and when you want a quick lexical check of whether an answer is supported by those documents.
- Requirements
- Node.js 22 or later; run via npx with an absolute path to the document folder. No API key, database or network access is needed. The index is in memory and rebuilt at startup, so restart the server after changing documents.
Installation
In SourceWeft
- Open RAG for your documents in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
@devilsdev/rag-mcp-server
An MCP server for your documents. Point it at a folder and Claude, or any other MCP client, can search the documents and check answers against them:
It indexes the folder when it starts, with the offline TF-IDF embedder and an in-memory retriever from @devilsdev/rag-pipeline-utils. It needs no API key, no database and no network. The assistant is the language model, so the server never calls one.
Requires Node.js 22 or later.
Connect a client
The server speaks MCP over stdio, so the client starts it. Use an absolute path to your folder.
Claude Code:
Claude Desktop, Cursor and other clients that use an mcpServers config (for Claude Desktop: Settings → Developer → Edit Config, then restart):
Then ask something your documents answer, such as "How many vacation days do employees get?".
Tools
search_documents
Returns { passages: [{ id, source, score, text }] }, best first, as structured content and as JSON text. source is the file relative to the folder and id is <source>#<chunk number>. Passages that share no terms with the query are left out.
check_answer
Runs the library's checkAnswer and returns { grounded, groundedness, unsupported, citations, sources }: whether every sentence is supported, the share of supported sentences (0 to 1), the unsupported sentences, the ids of the sources supporting each sentence, and the sources that were checked. The check is lexical and makes no model calls, so a correct paraphrase can come back unsupported; treat it as a flag to look again, not a verdict.
Both tools are read-only. Passage text is content from your files, and the tool descriptions tell the client to treat it as data, not instructions. A file can still contain text written to manipulate an assistant, so index folders you trust.
Files
Markdown (.md, .markdown), HTML (.html, .htm, visible text only), CSV (.csv, one passage per row) and text (.txt) files, in the folder and its subfolders, handled the way the library's loaders handle them; prose is split into sentence chunks of up to 500 characters. Other files, node_modules and .git are skipped. The index lives in memory and is rebuilt each time the server starts, so restart the client's server after changing the documents.
Options
Everything the server logs goes to stderr; stdout carries the protocol.
Build your own
For other embedders (OpenAI, Ollama), a persistent index or a vector database, start from the MCP server example, which builds the same kind of server from the library in about 100 lines.
Documentation: https://devilsdev.github.io/rag-pipeline-utils/
Source: packages/rag-mcp-server/README.md at commit 5cdc1eb
Tools
0Version history
3- v3.8.1LatestNov 7, 2026
- v3.7.1Nov 6, 2026
- v3.6.0Nov 5, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts