Ragie Model Context Protocol Server

Official

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Ragie 模型上下文协议服务器

提供对 Ragie 知识库检索功能的访问的模型上下文协议 (MCP) 服务器。

描述

该服务器实现了模型上下文协议 (MCP),使 AI 模型能够从 Ragie 知识库中检索信息。它提供了一个名为“检索”的工具,允许查询知识库中的相关信息。

先决条件

  • Node.js >= 18
  • Ragie API 密钥

安装

服务器需要以下环境变量:

  • RAGIE_API_KEY (必需):您的 Ragie API 身份验证密钥

服务器将启动并在 stdio 上监听 MCP 协议消息。

使用 npx 安装并运行服务器:

RAGIE_API_KEY=your_api_key npx @ragieai/mcp-server

命令行选项

服务器支持以下命令行选项:

  • --description, -d <text> :使用自定义文本覆盖默认工具描述
  • --partition, -p <id> : 指定要查询的 Ragie 分区 ID

例子:

# With custom description RAGIE_API_KEY=your_api_key npx @ragieai/mcp-server --description "Search the company knowledge base for information" # With partition specified RAGIE_API_KEY=your_api_key npx @ragieai/mcp-server --partition your_partition_id # Using both options RAGIE_API_KEY=your_api_key npx @ragieai/mcp-server --description "Search the company knowledge base" --partition your_partition_id

游标配置

要将此 MCP 服务器与 Cursor 一起使用:

选项 1:创建 MCP 配置文件

  1. 保存一个名为mcp.json的文件
  • 对于特定于项目的工具,请在项目目录中创建一个.cursor/mcp.json文件。这允许您定义仅在该特定项目中可用的 MCP 服务器。
  • 对于想要在所有项目中使用的工具,请在主目录中创建一个~/.cursor/mcp.json文件。这样,MCP 服务器就可以在所有 Cursor 工作区中使用。

示例mcp.json

{ "mcpServers": { "ragie": { "command": "npx", "args": [ "-y", "@ragieai/mcp-server", "--partition", "optional_partition_id" ], "env": { "RAGIE_API_KEY": "your_api_key" } } } }

选项 2:使用 shell 脚本

  1. 在您的系统上保存一个名为ragie-mcp.sh的文件:
#!/usr/bin/env bash export RAGIE_API_KEY="your_api_key" npx -y @ragieai/mcp-server --partition optional_partition_id
  1. 授予文件执行权限: chmod +x ragie-mcp.sh
  2. 通过转到 Cursor UI 中的**“设置”** -> “Cursor 设置” -> **“MCP 服务器”**来添加 MCP 服务器脚本。

用您的实际 Ragie API 密钥替换your_api_key ,并根据需要选择设置分区 ID。

Claude桌面配置

要将此 MCP 服务器与 Claude 桌面一起使用:

  1. 创建 MCP 配置文件claude_desktop_config.json
  • 对于 MacOS:使用~/Library/Application Support/Claude/claude_desktop_config.json
  • 对于 Windows:使用%APPDATA%/Claude/claude_desktop_config.json

示例claude_desktop_config.json

{ "mcpServers": { "ragie": { "command": "npx", "args": [ "-y", "@ragieai/mcp-server", "--partition", "optional_partition_id" ], "env": { "RAGIE_API_KEY": "your_api_key" } } } }

用您的实际 Ragie API 密钥替换your_api_key ,并根据需要选择设置分区 ID。

  1. 重新启动 Claude 桌面以使更改生效。

Ragie 检索工具现在可在您的 Claude 桌面对话中使用。

特征

检索工具

服务器提供了一个retrieve工具,可用于搜索知识库。它接受以下参数:

  • query (字符串):用于查找相关信息的搜索查询

该工具返回:

  • 包含来自知识库的匹配文本的内容块数组

发展

该项目使用 TypeScript 编写,并使用以下主要依赖项:

  • @modelcontextprotocol/sdk :用于实现 MCP 服务器
  • ragie :用于与 Ragie API 交互
  • zod :用于运行时类型验证

开发设置

以开发模式运行服务器:

RAGIE_API_KEY=your_api_key npm run dev -- --partition optional_partition_id

构建项目:

npm run build

执照

MIT 许可证 - 详情请参阅 LICENSE.txt。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

MCP 服务器使 AI 模型能够通过简单的“检索”工具从 Ragie 的知识库中检索信息。

  1. Description
    1. Prerequisites
      1. Installation
        1. Command Line Options
      2. Cursor Configuration
        1. Option 1: Create an MCP configuration file
        2. Option 2: Use a shell script
      3. Claude Desktop Configuration
        1. Features
          1. Retrieve Tool
        2. Development
          1. Development setup
        3. License
          ID: nagpa0kp17