ragie-mcp-server
by: ragieai
Ragie Model Context Protocol Server
📌Overview
Purpose: The Ragie Model Context Protocol (MCP) server provides a means for AI models to access and retrieve information from a Ragie knowledge base efficiently.
Overview: This server implements the Model Context Protocol, enabling users to query a customizable knowledge base with a single retrieval tool. It supports flexible command line options and easy setup for integration in various development environments.
Key Features:
-
Retrieve Tool: A powerful search function that allows users to query the knowledge base with customizable parameters (query string, topK, rerank, and recencyBias) to obtain relevant information.
-
Flexible Installation: Simple installation process using Node.js, with options to integrate the server across different platforms (e.g., Cursor, Claude desktop) through configuration files or shell scripts.
Ragie Model Context Protocol Server
A Model Context Protocol (MCP) server that provides access to Ragie's knowledge base retrieval capabilities.
Description
This server implements the Model Context Protocol to enable AI models to retrieve information from a Ragie knowledge base. It provides a single tool called retrieve that allows querying the knowledge base for relevant information.
Prerequisites
- Node.js >= 18
- A Ragie API key
Installation
Set the required environment variable:
RAGIE_API_KEY
(required): Your Ragie API authentication key
Start the server on stdio for MCP protocol messages:
RAGIE_API_KEY=your_api_key npx @ragieai/mcp-server
Command Line Options
--description, -d <text>
: Override the default tool description with custom text--partition, -p <id>
: Specify the Ragie partition ID to query
Examples:
RAGIE_API_KEY=your_api_key npx @ragieai/mcp-server --description "Search the company knowledge base for information"
RAGIE_API_KEY=your_api_key npx @ragieai/mcp-server --partition your_partition_id
RAGIE_API_KEY=your_api_key npx @ragieai/mcp-server --description "Search the company knowledge base" --partition your_partition_id
Cursor Configuration
To use this MCP server with Cursor:
Option 1: Create an MCP configuration file
- Save a file called
mcp.json
- For tools specific to a project, create
.cursor/mcp.json
in your project directory. - For tools available across all projects, create
~/.cursor/mcp.json
in your home directory.
Example mcp.json
:
{
"mcpServers": {
"ragie": {
"command": "npx",
"args": [
"-y",
"@ragieai/mcp-server",
"--partition",
"optional_partition_id"
],
"env": {
"RAGIE_API_KEY": "your_api_key"
}
}
}
}
Option 2: Use a shell script
- Save a file
ragie-mcp.sh
:
#!/usr/bin/env bash
export RAGIE_API_KEY="your_api_key"
npx -y @ragieai/mcp-server --partition optional_partition_id
-
Make it executable:
chmod +x ragie-mcp.sh
-
Add the MCP server script in Cursor under Settings → Cursor Settings → MCP Servers.
Replace your_api_key
with your actual Ragie API key and set the partition ID if needed.
Claude Desktop Configuration
To use this MCP server with Claude desktop:
- Create the MCP config file
claude_desktop_config.json
at:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%/Claude/claude_desktop_config.json
Example config:
{
"mcpServers": {
"ragie": {
"command": "npx",
"args": [
"-y",
"@ragieai/mcp-server",
"--partition",
"optional_partition_id"
],
"env": {
"RAGIE_API_KEY": "your_api_key"
}
}
}
}
- Restart Claude desktop for changes to take effect.
The Ragie retrieval tool will then be available in your Claude desktop conversations.
Features
Retrieve Tool
The retrieve
tool searches the knowledge base with parameters:
query
(string): Search querytopK
(number, optional, default: 8): Max number of resultsrerank
(boolean, optional, default: true): Return most relevant inforecencyBias
(boolean, optional, default: false): Favor recent info
Returns an array of content chunks matching the query.
Development
This project is written in TypeScript using:
@modelcontextprotocol/sdk
: MCP server implementationragie
: Ragie API clientzod
: Runtime type validation
Development setup
Run server in development mode:
RAGIE_API_KEY=your_api_key npm run dev -- --partition optional_partition_id
Build project:
npm run build
License
MIT License - See LICENSE.txt for details.