Docs RAG
Local RAG server that lets Claude, Copilot or Cursor search your own documents
Docs RAG is an open-source MCP server for files and documents. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, VS Code, macOS
- Runs
- Locally
- What it can do
- Can delete data (1 tool)
- Version
- 0.8.0
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add docs-rag-mcp --env DOCSRAG_API_KEY='<DOCSRAG_API_KEY>' --env DOCSRAG_RERANK_API_KEY='<DOCSRAG_RERANK_API_KEY>' -- dnx DocsRagMcp --yesAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"docs-rag-mcp": {
"command": "dnx",
"args": [
"DocsRagMcp",
"--yes"
],
"env": {
"DOCSRAG_API_KEY": "<DOCSRAG_API_KEY>",
"DOCSRAG_RERANK_API_KEY": "<DOCSRAG_RERANK_API_KEY>"
}
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"docs-rag-mcp": {
"command": "dnx",
"args": [
"DocsRagMcp",
"--yes"
],
"env": {
"DOCSRAG_API_KEY": "<DOCSRAG_API_KEY>",
"DOCSRAG_RERANK_API_KEY": "<DOCSRAG_RERANK_API_KEY>"
}
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"docs-rag-mcp": {
"command": "dnx",
"args": [
"DocsRagMcp",
"--yes"
],
"env": {
"DOCSRAG_API_KEY": "<DOCSRAG_API_KEY>",
"DOCSRAG_RERANK_API_KEY": "<DOCSRAG_RERANK_API_KEY>"
}
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"docs-rag-mcp": {
"type": "stdio",
"command": "dnx",
"args": [
"DocsRagMcp",
"--yes"
],
"env": {
"DOCSRAG_API_KEY": "<DOCSRAG_API_KEY>",
"DOCSRAG_RERANK_API_KEY": "<DOCSRAG_RERANK_API_KEY>"
}
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add docs-rag-mcp --env DOCSRAG_API_KEY='<DOCSRAG_API_KEY>' --env DOCSRAG_RERANK_API_KEY='<DOCSRAG_RERANK_API_KEY>' -- dnx DocsRagMcp --yesOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.docs-rag-mcp]
command = "dnx"
args = ["DocsRagMcp", "--yes"]
env = { DOCSRAG_API_KEY = "<DOCSRAG_API_KEY>", DOCSRAG_RERANK_API_KEY = "<DOCSRAG_RERANK_API_KEY>" }Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"docs-rag-mcp": {
"command": "dnx",
"args": [
"DocsRagMcp",
"--yes"
],
"env": {
"DOCSRAG_API_KEY": "<DOCSRAG_API_KEY>",
"DOCSRAG_RERANK_API_KEY": "<DOCSRAG_RERANK_API_KEY>"
}
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "docs-rag-mcp": { "command": "dnx", "args": [ "DocsRagMcp", "--yes" ], "env": { "DOCSRAG_API_KEY": "<DOCSRAG_API_KEY>", "DOCSRAG_RERANK_API_KEY": "<DOCSRAG_RERANK_API_KEY>" } } } }Or run: gemini mcp add -s user -e DOCSRAG_API_KEY='<DOCSRAG_API_KEY>' -e DOCSRAG_RERANK_API_KEY='<DOCSRAG_RERANK_API_KEY>' docs-rag-mcp dnx -- DocsRagMcp --yes
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "docs-rag-mcp": { "command": "dnx", "args": [ "DocsRagMcp", "--yes" ], "env": { "DOCSRAG_API_KEY": "<DOCSRAG_API_KEY>", "DOCSRAG_RERANK_API_KEY": "<DOCSRAG_RERANK_API_KEY>" } } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "docs-rag-mcp": { "command": "dnx", "args": [ "DocsRagMcp", "--yes" ], "env": { "DOCSRAG_API_KEY": "<DOCSRAG_API_KEY>", "DOCSRAG_RERANK_API_KEY": "<DOCSRAG_RERANK_API_KEY>" } } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "docs-rag-mcp": { "command": "dnx", "args": [ "DocsRagMcp", "--yes" ], "env": { "DOCSRAG_API_KEY": "<DOCSRAG_API_KEY>", "DOCSRAG_RERANK_API_KEY": "<DOCSRAG_RERANK_API_KEY>" } } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "docs-rag-mcp": { "command": "dnx", "args": [ "DocsRagMcp", "--yes" ], "env": { "DOCSRAG_API_KEY": "<DOCSRAG_API_KEY>", "DOCSRAG_RERANK_API_KEY": "<DOCSRAG_RERANK_API_KEY>" } } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "docs-rag-mcp": { "command": "dnx", "args": [ "DocsRagMcp", "--yes" ], "env": { "DOCSRAG_API_KEY": "<DOCSRAG_API_KEY>", "DOCSRAG_RERANK_API_KEY": "<DOCSRAG_RERANK_API_KEY>" } } } }The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.
Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "docs-rag-mcp": { "command": "dnx", "args": [ "DocsRagMcp", "--yes" ], "env": { "DOCSRAG_API_KEY": "<DOCSRAG_API_KEY>", "DOCSRAG_RERANK_API_KEY": "<DOCSRAG_RERANK_API_KEY>" } } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "docs-rag-mcp": { "command": "dnx", "args": [ "DocsRagMcp", "--yes" ], "env": { "DOCSRAG_API_KEY": "<DOCSRAG_API_KEY>", "DOCSRAG_RERANK_API_KEY": "<DOCSRAG_RERANK_API_KEY>" } } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
DOCSRAG_PROVIDEREmbedding provider: ollama (default), openai or azure.DOCSRAG_MODELEmbedding model, or the deployment name for Azure OpenAI. Defaults to nomic-embed-text (Ollama) or text-embedding-3-small (OpenAI).DOCSRAG_ENDPOINTService URL. Required for Azure OpenAI; optional for Ollama (http://localhost:11434) and OpenAI-compatible APIs.DOCSRAG_API_KEYAPI key for OpenAI or Azure OpenAI. Leave it out for Azure to sign in with Microsoft Entra ID.DOCSRAG_ALLOWED_PATHSFolders the server may index, separated by ; on Windows or : on macOS and Linux.DOCSRAG_DATABASEPath of the SQLite index file. Defaults to ~/.docs-rag-mcp/index.db.DOCSRAG_SEARCH_MODEhybrid (default) combines keyword and vector ranking; vector uses vector similarity only.DOCSRAG_WATCHtrue (default) watches indexed folders and indexes changes automatically; false indexes only when index_folder is called.DOCSRAG_RERANK_ENDPOINTOptional. URL of a Cohere-style /rerank endpoint (llama.cpp, Cohere, Jina, vLLM...), such as http://localhost:8012/v1/rerank. Turns on reranking of the best results with a cross-encoder model.DOCSRAG_RERANK_MODELReranking model, for rerank services that serve several, such as rerank-v3.5 for Cohere.DOCSRAG_RERANK_API_KEYAPI key for the rerank service, sent as a bearer token.DOCSRAG_RERANK_CANDIDATESHow many of the best results are sent to the reranker, from 1 to 100. Defaults to 20.
About Docs RAG
Docs RAG is a Model Context Protocol server written in C# that gives an AI assistant a searchable index of your own Markdown, text, HTML, Word and PDF files. Point it at a folder and it splits each file at headings or pages, embeds the passages and stores them in a single SQLite file, so answers can be drawn from your notes rather than from the model's general knowledge.
When you ask a question, the assistant calls the search tool and receives the closest passages together with their file path and section, so answers can cite where they came from. Search blends meaning-based and keyword ranking, which helps with exact terms like API names and error codes. Indexed folders are watched and re-synced when files change, and re-indexing only re-embeds files whose content changed.
The server can run fully locally with Ollama, or use OpenAI or Azure OpenAI embeddings. It is aimed at developers and teams who want to query documentation or personal notes from inside Claude Desktop, VS Code with Copilot or Cursor, and who want to limit which folders the server is allowed to read.
Tools this server provides (4)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 of 4 tools deletes data; 1 name doesn't say.
From the server's own tool labels and tool names; not verified by us.
- index_folder
- Indexes the Markdown, text, HTML, Word and PDF files in a folder and its subfolders.
- search_docsName suggests: reads
- Returns the passages closest in meaning to a question, with file, section and score.
- list_sourcesName suggests: reads
- Shows the index location, size, embedding model, indexed files and watched folders.
- remove_from_indexName suggests: deletes
- Removes a file or folder from the index and stops watching it.
What it does
- Local embeddings with Ollama
- Builds and queries the index with a local Ollama model so documents need not leave the machine.
- Hybrid meaning and keyword search
- Ranks passages by embedding similarity blended with full-text keyword matching.
- Source-cited passages
- Each result includes its file path and heading or PDF page so answers can be traced back.
- Automatic folder watching
- Watches indexed folders and picks up new, edited and deleted files without manual re-indexing.
- Indexed files as resources
- Clients that support MCP resources can list indexed files and attach whole documents to a conversation.
- Folder access limits
- An allowed-paths setting restricts which folders the server may index and read.
Good for
- Asking an assistant questions about a team handbook or internal policy documents
- Querying a folder of Markdown project notes or API docs from inside an editor
- Searching saved web pages or generated documentation sites by meaning
- Attaching a specific local document to a chat without copying it in by hand
- Keeping a private personal knowledge base searchable without sending files to a cloud service
Pricing
Open source
Free and MIT-licensed; OpenAI or Azure embedding usage is billed by those providers.
Docs RAG FAQ
Which document formats can Docs RAG index?
Markdown, plain text, HTML, Word (.docx) and PDF files, including files in subfolders.
Do my documents leave my machine?
With the default Ollama provider, documents and questions stay local. OpenAI and Azure OpenAI providers send text to those services for embeddings.
How do I install Docs RAG?
It is published on NuGet and the MCP Registry and is started with dnx, which comes with the .NET 10 SDK. Config snippets are provided for Claude Desktop, VS Code, Cursor and Claude Code.
Can Docs RAG modify my files?
No. It only reads files and writes its own index database.
Is Docs RAG free?
Yes. Docs RAG is open source, so you can use and self-host it for free.
How do I add Docs RAG to Claude Code?
Run this command in your terminal: claude mcp add docs-rag-mcp --env DOCSRAG_API_KEY='<DOCSRAG_API_KEY>' --env DOCSRAG_RERANK_API_KEY='<DOCSRAG_RERANK_API_KEY>' -- dnx DocsRagMcp --yes
What are the best alternatives to Docs RAG?
The closest alternatives to Docs RAG are Rag Vault, OmniClip RAG, MCP Local Rag, RootMind and OmniClip RAG.
Where this comes from
- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.