# Agentic RAG

> Agentic RAG is an open-source MCP server for files and documents. Local semantic search over your Markdown and text files for MCP-capable AI agents. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux, Windows, Self-hosted
- **Website:** https://mqfarooqi1.github.io/agentic-rag-mcp/
- **Repository:** https://github.com/mqfarooqi1/agentic-rag-mcp
- **MCP Registry name:** io.github.mqfarooqi1/agentic-rag-mcp
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents), [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory), [agent tooling](https://ai-powered.com/categories/agent-tooling)
- **Listing updated:** 2026-11-29

## About

Point it at a folder of .md, .txt or .rst files and it builds a local embedding index that an MCP client can query. Instead of one retrieval pass, the connected model decides when to search again with a sharper query, which suits questions whose answer is spread across several documents.

Indexing and search run on your machine through ONNX Runtime, and the server itself needs no API key. Embeddings are cached on disk and rebuilt for any chunk whose content changes, so unchanged folders load quickly.

The project also publishes a small offline evaluation comparing single-search retrieval with planned sub-queries over a demo corpus. It is aimed at developers who want documentation or notes searchable by an agent through a read-only, stdio-based server.

## Features

- **Local document indexing:** Indexes every Markdown, text and reStructuredText file under a chosen folder, with embeddings computed on your machine.
- **Three read-only search tools:** Exposes kb_search, kb_fetch and kb_sources so a client can search, read a chunk by id and list indexed sources.
- **Structured tool results:** Tools publish output schemas, and errors come back with explanations an agent can act on.
- **Disk-cached embeddings:** Vectors are keyed by a hash of each chunk, so stale embeddings are not reused and unchanged corpora load instantly.
- **Built-in offline evaluation:** An eval command measures how often one search retrieves every fact a question needs, with an optional agent-run mode.
- **Optional standalone agents:** With an Anthropic key, bundled ask commands run a single-search baseline, a tool-driven agent or a retriever-synthesizer-verifier pipeline.

## Good for

- Let Claude Code or Claude Desktop answer questions over a personal notes folder
- Make a project's documentation and changelog searchable by a coding agent
- Check whether single-pass retrieval misses facts that multi-step search would find
- Try agentic retrieval on bundled demo documents before connecting private files

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add agentic-rag-mcp -- uvx agentic-rag-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "agentic-rag-mcp": {
      "command": "uvx",
      "args": [
        "agentic-rag-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "agentic-rag-mcp": {
      "command": "uvx",
      "args": [
        "agentic-rag-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

```json
{
  "mcpServers": {
    "agentic-rag-mcp": {
      "command": "uvx",
      "args": [
        "agentic-rag-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "agentic-rag-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "agentic-rag-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add agentic-rag-mcp -- uvx agentic-rag-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.agentic-rag-mcp]
command = "uvx"
args = ["agentic-rag-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "agentic-rag-mcp": {
      "command": "uvx",
      "args": [
        "agentic-rag-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user agentic-rag-mcp uvx -- agentic-rag-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "agentic-rag-mcp": {
      "command": "uvx",
      "args": [
        "agentic-rag-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "agentic-rag-mcp": {
      "command": "uvx",
      "args": [
        "agentic-rag-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "agentic-rag-mcp": {
      "command": "uvx",
      "args": [
        "agentic-rag-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "agentic-rag-mcp": {
      "command": "uvx",
      "args": [
        "agentic-rag-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "agentic-rag-mcp": {
      "command": "uvx",
      "args": [
        "agentic-rag-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "agentic-rag-mcp": {
      "command": "uvx",
      "args": [
        "agentic-rag-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "agentic-rag-mcp": {
      "command": "uvx",
      "args": [
        "agentic-rag-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

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

```json
{
  "mcpServers": {
    "agentic-rag-mcp": {
      "command": "uvx",
      "args": [
        "agentic-rag-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 2 of 3 tools read data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `kb_search` (name suggests: reads): Returns the chunks closest in meaning to a query, with scores, source documents and chunk ids.
- `kb_fetch` (name suggests: reads): Returns the full text of one chunk by its id.
- `kb_sources`: Lists the indexed documents and the size of the index.

## FAQ

### Does the server need an API key?

No. Through MCP the connected client does the searching, and the server only answers search requests. An Anthropic key is only needed for the optional built-in agent commands.

### Where is my data processed?

Indexing and search run locally with ONNX embeddings, and no document is uploaded to build or query the index. Retrieved chunks do become part of the conversation with whichever model provider the client uses.

### Which file types are supported?

It indexes .md, .txt and .rst files. PDFs and office documents would need a separate parser and are not supported.

### How is the server started?

It runs over stdio with a one-line uvx command, and can be added to Claude Code or Claude Desktop with a short configuration entry.

### Is Agentic RAG free?

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

### How do I add Agentic RAG to Claude Code?

Run this command in your terminal: claude mcp add agentic-rag-mcp -- uvx agentic-rag-mcp

### What are the best alternatives to Agentic RAG?

The closest alternatives to Agentic RAG are MCP Local Rag, Rag MCP, Rag Vault, OmniClip RAG and Docs RAG.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [MCP Local Rag](https://ai-powered.com/mcp/mcp-local-rag-2): MCP Local Rag is an open-source MCP server for knowledge and memory.
- [Rag MCP](https://ai-powered.com/mcp/rag-mcp-2): Rag MCP is an open-source MCP server for knowledge and memory.
- [Rag Vault](https://ai-powered.com/mcp/rag-vault): Rag Vault is an open-source MCP server for knowledge and memory.
- [OmniClip RAG](https://ai-powered.com/mcp/omniclip-rag): OmniClip RAG is an open-source MCP server for files and documents.
- [Docs RAG](https://ai-powered.com/mcp/docs-rag): Docs RAG is an open-source MCP server for files and documents.
- [rag-mcp](https://ai-powered.com/mcp/rag-mcp): rag-mcp is an open-source MCP server for knowledge and memory.
- [OmniClip RAG](https://ai-powered.com/mcp/omniclip-rag-2): OmniClip RAG is an open-source MCP server for files and documents.
- [Rag](https://ai-powered.com/mcp/rag): Rag is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/agentic-rag
