
Ragie Model Context Protocol Server

2025.05.07
0
JavaScript知识库检索AI模型支持开发效率
Ragie Model Context Protocol Server 是一个实现了模型上下文协议(MCP)的服务器,提供对Ragie知识库检索能力的访问。它通过一个名为"retrieve"的工具,允许AI模型从Ragie知识库中查询相关信息。
View on GitHub
Overview
基本能力
产品定位
Ragie Model Context Protocol Server 是一个知识库检索服务,专为AI模型设计,用于从Ragie知识库中检索相关信息。
核心功能
- 提供
retrieve
工具,用于搜索知识库 - 参数:
query
(字符串):搜索查询topK
(数字,可选,默认:8):返回的最大结果数rerank
(布尔值,可选,默认:true):是否仅返回最相关信息recencyBias
(布尔值,可选,默认:false):是否偏向于更近期的信息
- 返回:
- 包含匹配文本的内容块数组
适用场景
- AI模型需要从知识库中检索信息
- 开发者需要为AI模型提供知识库检索能力
工具列表
retrieve
:用于从Ragie知识库中检索信息
常见问题解答
- 无明确常见问题解答部分
使用教程
使用依赖
- Node.js >= 18
- Ragie API key
安装教程
- 设置环境变量:
bash export RAGIE_API_KEY=your_api_key
- 使用npx安装并运行服务器:
bash RAGIE_API_KEY=your_api_key npx @ragieai/mcp-server
调试方式
- 开发模式下运行:
bash RAGIE_API_KEY=your_api_key npm run dev -- --partition optional_partition_id
- 构建项目:
bash npm run build
命令行选项
--description, -d <text>
:覆盖默认工具描述--partition, -p <id>
:指定要查询的Ragie分区ID
Cursor配置
- 创建
mcp.json
文件 - 项目特定工具:
.cursor/mcp.json
- 全局工具:
~/.cursor/mcp.json
- 示例配置:
json { "mcpServers": { "ragie": { "command": "npx", "args": [ "-y", "@ragieai/mcp-server", "--partition", "optional_partition_id" ], "env": { "RAGIE_API_KEY": "your_api_key" } } } }
Claude Desktop配置
- 创建
claude_desktop_config.json
文件 - MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%/Claude/claude_desktop_config.json
- 示例配置:
json { "mcpServers": { "ragie": { "command": "npx", "args": [ "-y", "@ragieai/mcp-server", "--partition", "optional_partition_id" ], "env": { "RAGIE_API_KEY": "your_api_key" } } } }