# MiniRAG

> MiniRAG is an open-source MCP server for knowledge and memory. Self-hosted RAG knowledge base with hybrid retrieval, cited answers and an MCP server. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** self-hosted, CLI, Web
- **Repository:** https://github.com/kimelody/minirag
- **MCP Registry name:** io.github.KiMelody/minirag
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory), [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm)
- **Listing updated:** 2026-11-18

## About

Everything runs in one Spring Boot process with SQLite storage, so there is no vector database or message queue. Retrieval fuses in-memory cosine similarity with SQLite FTS5 BM25 using reciprocal rank fusion, with optional LLM reranking, and answers carry clickable citations showing only the sources actually cited. The README says it runs in about 250 MB of memory on a 1 GB VPS.

The MCP server uses SSE transport and exposes two tools: query asks a question and returns a cited answer, with an optional retrieval mode, and ingest_text adds a document using an admin key. A REST API, streaming web UI and WeChat Work callback sit alongside it. You supply your own chat endpoint, defaulting to DeepSeek, and an OpenAI-compatible embeddings endpoint, defaulting to SiliconFlow's BGE-M3.

The repository includes an evaluation harness; the README reports hybrid with rerank reaching 100 percent top-1 on its demo set and includes a 20-question labour-law evaluation. Run it with Docker or build with Java 21. It is MIT licensed, and the hosted demo needs credentials from the owner.

## Features

- **Hybrid retrieval:** Vector and BM25 results fused with RRF, plus optional rerank.
- **Cited answers:** Clickable citations list only the sources used.
- **Single process:** SQLite storage with no vector database or queue.
- **MCP tools:** query for answers and ingest_text to add documents.
- **Evaluation harness:** Labelled question sets with Top-1, Recall and MRR scoring.
- **Multiple interfaces:** MCP over SSE, REST API, web UI and WeChat Work.

## Good for

- Stand up a private document Q&A on a small server
- Give an assistant cited answers from internal notes
- Ingest text documents through an API
- Compare vector, hybrid and rerank retrieval on your own data

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport sse minirag https://minirag.kimelody.de5.net/sse
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://minirag.kimelody.de5.net/sse
```

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

```json
{
  "mcpServers": {
    "minirag": {
      "url": "https://minirag.kimelody.de5.net/sse"
    }
  }
}
```

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

```json
{
  "servers": {
    "minirag": {
      "type": "sse",
      "url": "https://minirag.kimelody.de5.net/sse"
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "minirag": {
      "serverUrl": "https://minirag.kimelody.de5.net/sse"
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "minirag": {
      "type": "sse",
      "url": "https://minirag.kimelody.de5.net/sse"
    }
  }
}
```

## Tools

- `query`: Asks a question and returns a cited answer, with an optional retrieval mode.
- `ingest_text`: Adds a document by id and text using an admin key.

## FAQ

### What does it need?

Docker or Java 21, plus API keys for a chat model and an embeddings endpoint.

### Which model does it use by default?

DeepSeek for chat and BAAI/bge-m3 embeddings via SiliconFlow, both configurable.

### How do I add documents?

With the ingest_text MCP tool or the REST ingest endpoints, using an admin key.

### How much memory does it use?

About 250 MB RSS according to the README.

### Is MiniRAG free?

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

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

Run this command in your terminal: claude mcp add --transport sse minirag https://minirag.kimelody.de5.net/sse

### What are the best alternatives to MiniRAG?

The closest alternatives to MiniRAG are Codebase Memory, XERJ, headroom, omniget and next-ai-draw-io.

## Where this comes from

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

## 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.
- [headroom](https://ai-powered.com/mcp/headroom-3): headroom is an open-source MCP server for ai models and llm tooling.
- [omniget](https://ai-powered.com/mcp/omniget): omniget is an open-source MCP server for ai models and llm tooling.
- [next-ai-draw-io](https://ai-powered.com/mcp/next-ai-draw-io-2): next-ai-draw-io is an open-source MCP server for ai models and llm tooling.
- [mcp-for-blender](https://ai-powered.com/mcp/mcp-for-blender): mcp-for-blender is an open-source MCP server for design and media.
- [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.
- [unity-mcp](https://ai-powered.com/mcp/unity-mcp-2): unity-mcp is an open-source MCP server for ai models and llm tooling.

---
Source: https://ai-powered.com/mcp/minirag
