Connecting
Point your MCP client at the Streamable HTTP endpoint:RAGEN_API_KEY environment variable instead of a header. See Running the server locally over stdio.
Available Tools
The Ragen MCP Server exposes three tools. Each call runs with the permissions of the person who created the API key — see Authentication.Omit
assistant_id unless you have one. The API key carries a scope: a key created for one assistant answers for it without being told, and a key scoped to the whole knowledge base rejects a request naming any assistant with 403. ragen_list_assistants shows what the key you connected with can reach. See Authentication.ragen_chat — Send a message to an assistant
ragen_chat — Send a message to an assistant
Send a message to a Ragen assistant and receive a grounded answer drawn from its knowledge base. This is the MCP equivalent of ResponseOn success:On failure:A
POST /v1/chat.Parametersstring
The ID of the Ragen assistant (project) to send the message to. Optional — the key decides by itself, and naming an assistant it is not scoped to is refused. Use
ragen_list_assistants to see what this key can reach.string
required
The message to send. Must be at least one character.
string
Optional additional context to include alongside the message — for example, the content of the page the user is currently viewing. Helps the assistant give more relevant answers.
string
OpenAI-style reasoning effort level:
low, medium, or high. Only honored by reasoning-capable models; silently ignored otherwise.403 means the key and the request disagree — you named an assistant the key is not scoped to, or named one at all on a knowledge-base key. A 404 is the other case, an assistant that does not exist for this organization:ragen_chat is always non-streaming. MCP tool calls return a single result, not a Server-Sent Events stream. If you need token-by-token streaming, call the Chat API directly with stream: true.ragen_list_assistants — List available assistants
ragen_list_assistants — List available assistants
List the assistants your API key can reach. A knowledge-base key sees every assistant its organization owns; a key created for one assistant sees that one. Use this to discover assistant IDs before calling On failure:Scoping is automatic and follows the key: the organization’s assistants for a knowledge-base key, the single bound one for an assistant-scoped key. There is no separate access configuration required.
ragen_chat — or, if exactly one comes back, to confirm you can omit the parameter.ParametersThis tool takes no parameters.ResponseOn success:ragen_search_knowledge_base — Retrieve document chunks without an answer
ragen_search_knowledge_base — Retrieve document chunks without an answer
Search the knowledge base and return the most relevant document chunks, with no model call. This is the MCP equivalent of ResponseOn success:On error:
POST /v1/search: use it when your agent should reason over the documents itself.Parametersstring
The assistant (project) whose knowledge base to search. Optional — the key decides by itself, and naming an assistant it is not scoped to is refused.
string
required
The search query. Must be at least one character.
integer
Maximum number of chunks to return, a whole number from 1 to 20. Defaults to the organization’s configured retrieval count.
Configuring Claude Desktop
To add Ragen to Claude Desktop, open yourclaude_desktop_config.json file and add a ragen entry under mcpServers:
claude_desktop_config.json
claude_desktop_config.json launches local processes over stdio; it has no field for a remote URL or request headers. mcp-remote is the bridge: Claude Desktop starts it as a process, and it forwards every call to your Ragen MCP endpoint over Streamable HTTP with the Authorization header attached. Replace https://your-ragen-instance.example.com/mcp with your actual $RAGEN_MCP_URL/mcp value.
To run the server on your own machine instead, without mcp-remote, start it over stdio. See Running the server locally over stdio.
The header goes through an environment variable, written as
Authorization:${RAGEN_AUTH} with no space after the colon: some clients split arguments on spaces, and Bearer YOUR_API_KEY inside args would arrive as two arguments.Step-by-Step Usage Example
Once your MCP client is connected, follow these steps to query your knowledge base:1
List your assistants
Call
ragen_list_assistants with no parameters to see which assistants are available to your API key.2
Pick an assistant ID
Identify the
id of the assistant whose knowledge base you want to query. In the example above, you’d use "11111111-1111-4111-8111-111111111111" to reach the Support Bot.3
Ask your question with ragen_chat
Call
ragen_chat with your chosen assistant_id and the question you want answered.Current Scope
Today the Ragen MCP Server exposes three tools:
ragen_chat, ragen_list_assistants and ragen_search_knowledge_base. File upload and full thread history via MCP are on the roadmap — they follow the same pattern and will be added as additional tools in a future release.Chat API Quickstart
Use the TypeScript SDK or REST API directly for streaming and advanced control.
TypeScript SDK Reference
Full method reference for
@webamigos/ragen-sdk-ts, including file upload and error handling.