
MiniRAG
io.github.KiMelodyPublished by GitHub account KiMelodyv0.1.0Updated Oct 30, 2026
Lightweight self-hosted RAG knowledge base with hybrid retrieval and cited answers.
Overview
MiniRAG is a self-hosted RAG knowledge base whose MCP server lets an assistant ask cited questions over your own documents and add new text.
- What you can do
- Ask questions against the knowledge base and get answers with numbered citations, choosing vector, hybrid or rerank retrieval mode
- Add documents to the knowledge base as text, which requires the admin key
- Retrieval is hybrid: in-memory cosine similarity plus SQLite FTS5 BM25 fused with RRF, with optional LLM reranking
- Beyond MCP, the same process exposes a REST API, a streaming web UI and a WeChat Work callback
- When to use it
- Useful when you want an assistant to answer from a private document collection you control, with citations back to the sources, and to add new material to that collection as you go. Suited to small self-hosted deployments rather than large-scale search infrastructure.
- Requirements
- The hosted endpoint is a remote SSE URL that requires HTTP Basic auth in the Authorization header, with credentials obtained from the owner. Self-hosting needs Docker or Java 21, plus a chat model API key and an embeddings API key (OpenAI-compatible endpoints, configurable base URLs and embedding model).
Installation
In SourceWeft
- Open MiniRAG in the dashboard and add it to a workspace.
- Connect Authorization token credentials. They are stored privately and never shown on public pages.
- Enable the server for the chats that should use its tools.
Web executable via SSE. Remote servers run from the web runtime once configured in a workspace.
Use with an agent
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/io.github.KiMelody%2Fminirag/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Other MCP clients
Add this to your client's mcpServers config.
{
"mcpServers": {
"minirag": {
"type": "sse",
"url": "https://minirag.kimelody.de5.net/sse",
"headers": {
"Authorization": "Bearer <YOUR_TOKEN>"
}
}
}
}README
MiniRAG
[Build] [License: MIT] [Java] [RSS]
A self-hosted RAG knowledge base in a single Spring Boot process: SQLite storage, hybrid retrieval, cited answers, and a built-in MCP server. No vector database, no message queue.
Live demo (ask the owner for the access code) · Evaluation report
Features
- Hybrid retrieval — in-memory cosine + SQLite FTS5 (BM25), fused with RRF; optional LLM rerank
- Cited answers — clickable
[n]citations; only sources actually cited are displayed - Streaming web UI — SSE, typewriter rendering, markdown, retrieval-mode switcher (vector / hybrid / rerank)
- Small footprint — single process, ~250MB RSS, runs on a 1GB VPS
- Multiple interfaces — MCP server (SSE transport), REST API, web UI, WeChat Work callback integration
Quick start
Open http://localhost:18090 and start asking. Data lives in ./data (SQLite, created automatically).
Configuration
MCP
Listed on the official MCP Registry as io.github.KiMelody/minirag. Two tools: query(question, mode?) — ask and get a cited answer; ingest_text(docId, text, adminKey) — add a document.
The hosted demo endpoint requires basic auth: https://minirag.kimelody.de5.net/sse (ask the owner for credentials).
REST API
Evaluation
An eval harness ships in eval/: labeled question sets, Top-1 / Recall / MRR scoring over three retrieval modes — hybrid+rerank reaches Top-1 100% / MRR 1.0 on the demo set (report); a 20-question labor-law evaluation with corpus-cleaning scripts lives in eval/law/. Bring your own corpus; raw source texts are not redistributed.
Build from source
Requires Java 21. API keys can be put in a .env file in the working directory (git-ignored).
中文说明
单进程私有化 RAG 知识库:SQLite 存储 + 混合检索(向量 + BM25,RRF 融合,可选 LLM 重排),回答带可点击引用角标,自带网页演示、REST API 与 MCP server(SSE),内存占用约 250MB,1GB 小服务器可跑。在线演示(访问码联系作者)。
License
Source: README.md at commit 94af130
Tools
0Version history
1- v0.1.0LatestOct 15, 2026
Score
85% 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 daysRequired25 pts
- Auth declaredRequired10 pts
- 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