Skip to Content
Klarefi
API reference

Connect an AI assistant

Add Klarefi's MCP server to your assistant or editor

Klarefi's Streamable HTTP MCP endpoint is https://www.klarefi.com/mcp.

For customer tools, create a test API key under Settings → Developers → API keys. Choose the scopes for the tools you need. For example, list_workflows needs workflows:read. Store the key in the client's credential settings or its launch environment. Use a key with the same environment as the cases you want to see.

For applicant tools, use a signed intake link. With manual client setup, omit the Authorization header or the Codex --bearer-token-env-var flag. See Agent intake for the tool list and the credentials each call needs.

In the examples below, KLAREFI_API_KEY is an environment variable containing your key.

Codex

Add the remote server in a terminal that has KLAREFI_API_KEY set:

codex mcp add klarefi --url https://www.klarefi.com/mcp --bearer-token-env-var KLAREFI_API_KEY

Start a fresh session and run /mcp to list the tools. The Codex IDE extension shares the CLI's configuration. Restart it with the same variable in its launch environment. If Codex reports a missing environment variable, set the key in its launch environment and restart. Remove the server with codex mcp remove klarefi.

Claude Code

Add this entry to your project .mcp.json. Claude Code expands the variable when it starts.

{
  "mcpServers": {
    "klarefi": {
      "type": "http",
      "url": "https://www.klarefi.com/mcp",
      "headers": { "Authorization": "Bearer ${KLAREFI_API_KEY}" }
    }
  }
}

Start Claude Code with KLAREFI_API_KEY set, approve the project server if prompted, then open /mcp. Remove the entry to disconnect.

Claude web and remote connectors

In Customize → Connectors, select Add custom connector and name it Klarefi. Enter https://www.klarefi.com/mcp, choose No sign in, and add a request header named Authorization with the value Bearer <your key>. On a managed workspace, the owner configures the connector. A header set at workspace level gives each user of that connection the same credential and access.

This setup is documented by Claude and has yet to be tested with Klarefi's remote connector. Claude custom connector setup

Claude Desktop

Use the remote connector setup in Claude Desktop to add the hosted server.

Gemini CLI

Add this entry to ~/.gemini/settings.json and start Gemini CLI with KLAREFI_API_KEY set:

{
  "mcpServers": {
    "klarefi": {
      "httpUrl": "https://www.klarefi.com/mcp",
      "headers": { "Authorization": "Bearer ${KLAREFI_API_KEY}" }
    }
  }
}

Open a fresh session, trust the folder when Gemini CLI prompts, then run /mcp list to see the tools. Gemini CLI disables MCP servers in untrusted folders.

Cursor

Start Cursor with KLAREFI_API_KEY in its environment, then use Add Klarefi to Cursor. Review the server before installing. Or merge this entry into ~/.cursor/mcp.json and open Customize → MCPs.

{
  "mcpServers": {
    "klarefi": {
      "url": "https://www.klarefi.com/mcp",
      "headers": { "Authorization": "Bearer ${env:KLAREFI_API_KEY}" }
    }
  }
}

The config and install link have yet to be tested in Cursor.

VS Code

Open Klarefi's MCP setup in VS Code and review the server before installing. For native Copilot, run MCP: Add Server and select Global → Copilot Global. The workspace-root .mcp.json destination appears when chat.mcp.workspaceRootConfig.enabled is on. Start the Copilot runtime with KLAREFI_API_KEY set and merge this entry into the selected native configuration.

{
  "mcpServers": {
    "klarefi": {
      "type": "http",
      "url": "https://www.klarefi.com/mcp",
      "headers": { "Authorization": "Bearer ${KLAREFI_API_KEY}" }
    }
  }
}

The older editor-managed Local mode uses .vscode/mcp.json with a top-level servers object and ${env:KLAREFI_API_KEY} in the header. The install link opens a review prompt. Use the native config above if your VS Code session runs on the Copilot harness. These paths have yet to be tested in VS Code. Microsoft MCP configuration reference

Windsurf

Start the editor with KLAREFI_API_KEY set. In Windsurf, open the raw Cascade MCP settings, or edit ~/.codeium/windsurf/mcp_config.json. Add:

{
  "mcpServers": {
    "klarefi": {
      "serverUrl": "https://www.klarefi.com/mcp",
      "headers": { "Authorization": "Bearer ${env:KLAREFI_API_KEY}" }
    }
  }
}

Refresh the MCP list after saving. This configuration has yet to be tested in Windsurf.

Devin Desktop

Start the editor with KLAREFI_API_KEY set. In Customize → MCPs → This computer, open the MCP config and add:

{
  "mcpServers": {
    "klarefi": {
      "url": "https://www.klarefi.com/mcp",
      "headers": { "Authorization": "Bearer ${env:KLAREFI_API_KEY}" }
    }
  }
}

Refresh the MCP list after saving. This configuration has yet to be tested in Devin Desktop.

Grok Build

Set KLAREFI_API_KEY in the CLI's environment and add this to ~/.grok/config.toml:

[mcp_servers.klarefi]
url = "https://www.klarefi.com/mcp"
headers = { Authorization = "Bearer ${KLAREFI_API_KEY}" }

Run grok mcp doctor klarefi to check the connection and tool discovery. In a session, use /mcps to see the server. Grok Build MCP setup

ChatGPT and the Gemini app

ChatGPT and the Gemini app support custom MCP servers. Their documented setup flows have no bearer-key field for Klarefi customer tools. For API-key access, use Codex or Gemini CLI. ChatGPT MCP authentication · Gemini custom apps

Troubleshooting

Set KLAREFI_API_KEY in the client's launch environment and restart it. With the variable unset, Gemini CLI sends an empty bearer value, while Claude Code and Grok Build send the literal placeholder. grok mcp doctor can still report a healthy connection in that case.

On this page