rag-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@rag-mcpSearch my knowledge base for 'FastMCP'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
rag-mcp
基于 FastMCP 的 RAG 服务,通过标准 MCP 协议对外暴露文档检索能力。
已支持工具:
rag_rebuild_index— 索引指定目录的文档rag_index_status— 查看当前索引状态rag_search— 关键词 / 向量搜索rag_read_resource— 读取资源内容(rag://...URI)
说明:hybrid / rerank 为预留模式,尚未实现。
安装
uv syncRelated MCP server: ragi
配置
cp .env.example .env
# 编辑 .env,至少填入 EMBEDDING_API_KEY(vector 搜索必需)核心环境变量:
变量 | 默认值 | 说明 |
|
| 索引数据目录 |
|
| 传输模式: |
|
| SSE 模式监听地址( |
|
| SSE 模式监听端口( |
| — | vector 搜索必填 |
|
| Embedding 服务地址 |
|
| Embedding 模型 |
| 自动检测 | 向量维度(可选) |
|
| 请求超时秒数 |
|
| 默认返回结果数 |
|
| 关键词检索候选数 |
|
| 分块大小(字符数) |
|
| 分块重叠(字符数) |
运行
stdio 模式(默认,供 MCP 客户端接入)
uv run python main.pySSE 模式(HTTP 服务,供调试或 Web 客户端使用)
MCP_TRANSPORT=sse uv run python main.py验证:
curl http://127.0.0.1:8787/health
# {"status": "ok"}MCP 端点:http://127.0.0.1:8787/mcp
资源访问端点:http://127.0.0.1:8787/resource?uri=rag://...
接入 Claude Desktop
在 Claude Desktop 配置文件中添加:
{
"mcpServers": {
"rag-mcp": {
"command": "uv",
"args": ["run", "python", "main.py"],
"cwd": "/path/to/rag_mcp"
}
}
}典型用法
调用
rag_rebuild_index,传入文档目录路径(支持.md/.txt/.pdf)调用
rag_search,指定查询词和模式(keyword或vector)通过
rag_read_resource读取搜索结果中的资源 URI
测试
uv run pytest -qThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ma-fee/RAG_MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server