
MiniRAG
io.github.KiMelody由 GitHub 账号 KiMelody 发布v0.1.0更新于 Oct 30, 2026
Lightweight self-hosted RAG knowledge base with hybrid retrieval and cited answers.
概览
MiniRAG 是自托管的 RAG 知识库,其 MCP 服务器让助手基于自有文档回答问题并给出引用,也可添加新文本。
- 可以做什么
- 针对知识库提问并得到带编号引用的回答,可选择向量、混合或重排检索模式
- 以文本形式向知识库添加文档,需要管理员密钥
- 检索为混合方式:内存余弦相似度加 SQLite FTS5 的 BM25,经 RRF 融合,可选 LLM 重排
- 除 MCP 外,同一进程还提供 REST API、流式网页界面和企业微信回调
- 适用场景
- 适合希望助手基于自己掌控的私有文档集作答、并能回溯引用来源,同时可随时补充新资料的场景。更适合小规模自托管部署,而非大规模检索基础设施。
- 运行要求
- 托管端点是一个远程 SSE 地址,需在 Authorization 头中使用 HTTP Basic 认证,凭据需向所有者索取。自托管需要 Docker 或 Java 21,以及聊天模型 API 密钥和嵌入 API 密钥(兼容 OpenAI 的端点,基础地址与嵌入模型可配置)。
安装
在 SourceWeft 中
- 打开 控制台中的 MiniRAG,将其添加到工作区。
- 连接 Authorization token 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 SSE。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/io.github.KiMelody%2Fminirag/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。
{
"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
来源:README.md,提交 94af130
工具
0版本历史
1- v0.1.0最新Oct 15, 2026
评分
已满足适用检查项的 85%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分