MCP Setup
Use Raghim from Claude, Cursor and other MCP clients
MCP_SERVER_ENABLED=true on self-hosted installs).1. Create an access token
In Raghim open Security Settings → MCP access tokens, name the token, pick scopes and an expiry, and copy it. It starts with rgh_ and is shown once. Tokens belong to you, carry your organization and role, and can be revoked at any time.
read
List and search your collections, list and inspect flows.
run
Run flows you own that are marked MCP-safe.
build
Draft and edit flows. Nothing is ever deployed from MCP.
2. Add the server to your client
Pick your client. Then ask your assistant to run whoami to confirm the connection.
One command:
claude mcp add --transport http raghim https://app.raghim.com/mcp \
--header "Authorization: Bearer rgh_YOUR_TOKEN"Add to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):
{
"mcpServers": {
"raghim": {
"url": "https://app.raghim.com/mcp",
"headers": { "Authorization": "Bearer rgh_YOUR_TOKEN" }
}
}
}Then enable the server under Cursor Settings → MCP.
Codex CLI and the Codex IDE extension share ~/.codex/config.toml. Export your token, then reference it by variable name so it is not stored in the file:
export RAGHIM_TOKEN=rgh_YOUR_TOKEN
# ~/.codex/config.toml
[mcp_servers.raghim]
url = "https://app.raghim.com/mcp"
bearer_token_env_var = "RAGHIM_TOKEN"Restart Codex, then run /mcp to confirm the server is listed. Older Codex versions may need remote-server support enabled first; if the server does not load, update Codex.
Claude Desktop's connector screen only supports OAuth sign-in, so use the mcp-remote bridge in claude_desktop_config.json:
{
"mcpServers": {
"raghim": {
"command": "npx",
"args": ["mcp-remote", "https://app.raghim.com/mcp",
"--header", "Authorization: Bearer rgh_YOUR_TOKEN"]
}
}
}Requires Node.js. Claude.ai web connectors are not supported yet (they need OAuth login).
VS Code, Windsurf, Cline, Zed and any other client that supports remote MCP servers over streamable HTTP with custom headers work the same way. Enter:
- URL:
https://app.raghim.com/mcp - Header:
Authorization: Bearer rgh_YOUR_TOKEN
Config file names and field names (url, serverUrl, headers) vary by client, so check its MCP docs. Clients that only speak stdio can use the mcp-remote bridge shown under Claude Desktop.
3. Tools
whoami: who the token acts as, and its scopes.list_collections,search_collection: browse and search your knowledge bases. Your client's own model writes the answer from the returned passages.list_flows,get_flow: inspect your agent flows (get_flowincludes the graph with a build-scope token).run_flow: run a flow server-side. Only flows you own and have marked MCP-safe can run, so an assistant cannot trigger a flow that sends messages or touches outside systems unless you allowed it.draft_flow,update_flow: create or edit a flow. Drafts are saved undeployed, live flows cannot be edited, and an edit never grants MCP-safe.deploy_flow: never deploys. It points you to the flow editor, where a person presses Deploy.
4. Credits and your own OpenAI key
On plans with credits, search costs 1 credit and flow runs and drafts use credits as in the app. Org admins can supply their own OpenAI key under Security Settings → LLM key: flow runs and drafts then use that key for generation. If the key fails, the call fails with a clear error and never falls back to the platform key. Embeddings always stay on the platform, and with your own key your prompts go to OpenAI under your account.
5. Self-hosted notes
Use your own host in the URL. Cloud-hosted clients such as claude.ai connectors must be able to reach it over the internet. An air-gapped install can only be used from local clients on the same network.