# RAG for your documents

> RAG for your documents is an open-source MCP server for knowledge and memory. Search a local folder of documents and check answers against them, with no API key. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI
- **Website:** https://devilsdev.github.io/rag-pipeline-utils/
- **Repository:** https://github.com/devilsdev/rag-pipeline-utils/tree/HEAD/packages/rag-mcp-server
- **MCP Registry name:** io.github.DevilsDev/rag-mcp-server
- **Categories:** knowledge and memory, files and documents
- **Listing updated:** 2026-11-14

## About

Point this server at a folder and it builds an in-memory index at startup using an offline TF-IDF embedder, so there is no database, no network call and no key. The assistant stays the language model; the server never calls one. It reads Markdown, HTML, CSV and text files.

Search returns ranked passages with a source file and chunk id, and passages sharing no terms with the query are dropped. The second tool is aimed at hallucination: it takes an answer, optionally with the question and a list of source passages, and checks the answer against them. Without sources it retrieves from your folder.

It belongs to the rag-pipeline-utils Node project, which also offers citations, evaluation and guardrails as a library. Start it with an absolute folder path via npx; it needs Node.js 22 or later.

## Features

- **Offline indexing:** Indexes a folder at startup with no key, database or network.
- **Passage search:** Returns ranked passages with source file and chunk id.
- **Answer checking:** Tests an answer against retrieved or supplied sources.
- **Adjustable limits:** topK and question size can be set by input or flag.
- **Stdio transport:** The client starts the server directly.

## Good for

- Ask questions about a policy folder
- Verify that an assistant's answer is supported by your files
- Prototype document search without cloud services
- Keep sensitive documents local while using an AI client

## Install

### Claude Code (Terminal)

```sh
claude mcp add rag-mcp-server -- npx -y @devilsdev/rag-mcp-server
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "rag-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@devilsdev/rag-mcp-server"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "rag-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@devilsdev/rag-mcp-server"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "rag-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@devilsdev/rag-mcp-server"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "rag-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@devilsdev/rag-mcp-server"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "rag-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@devilsdev/rag-mcp-server"
      ]
    }
  }
}
```

## Tools

- `search_documents`: Search the indexed folder and return ranked passages
- `check_answer`: Check an answer against source passages

## FAQ

### Does it call an LLM?

No. The connected assistant is the language model.

### Does it need an API key?

No key, database or network is needed.

### Which Node version is required?

Node.js 22 or later.

### How do I add it to Claude Code?

Run claude mcp add docs -- npx -y @devilsdev/rag-mcp-server with your folder path.

### Is RAG for your documents free?

Yes. RAG for your documents is open source, so you can use and self-host it for free.

### How do I add RAG for your documents to Claude Code?

Run this command in your terminal: claude mcp add rag-mcp-server -- npx -y @devilsdev/rag-mcp-server

### What are the best alternatives to RAG for your documents?

The closest alternatives to RAG for your documents are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and note1.

## Alternatives

- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Nautilus Compass Memory](https://ai-powered.com/mcp/nautilus-compass-memory): Nautilus Compass Memory is an open-source MCP server for knowledge and memory.
- [note1](https://ai-powered.com/mcp/note1): note1 is an MCP server for productivity.
- [ASTra](https://ai-powered.com/mcp/astra): ASTra is a freemium MCP server for files and documents.
- [CARTESIAN ECU](https://ai-powered.com/mcp/cartesian-ecu): CARTESIAN ECU is a paid MCP server for files and documents.
- [MedXpert 图书馆连接器（通用版）](https://ai-powered.com/mcp/medxpert): MedXpert 图书馆连接器（通用版） is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/rag-for-your-documents
