Refine AIRefine Docs
Get started

Quickstart

Connect Refine to your AI assistant in three steps: create an API key, point your client at the server, and ask it something about your brand.

Prerequisites

A Refine account on a paid plan (Visibility or Autopilot) with at least one brand. Don’t have one yet? Open your dashboard.
1

Create an API key

Each key is tied to a single brand and is shown only once at creation — store it somewhere safe, like a password manager. You can hold up to 20 active keys.

Create a key by calling the keys endpoint while signed in to your dashboard (the request is authenticated by your session cookie):

Create a key
curl -X POST https://app.refine-app.com/api/mcp/keys \
  -H "Content-Type: application/json" \
  -H "Cookie: <your dashboard session cookie>" \
  -d '{ "name": "Claude Desktop" }'

The response contains the plaintext key:

Response
{
  "key": {
    "id": "…",
    "name": "Claude Desktop",
    "key_prefix": "rfn_live_abc1",
    "created_at": "…"
  },
  "plaintext": "rfn_live_abc1xyz…"   // shown once — copy it now
}

Copy the plaintext value — it begins with rfn_live_. See Authentication for the full key lifecycle and how to revoke a key.

2

Connect your client

Refine is a remote Streamable HTTP MCP server. Pick your client below and drop in the key from step 1.

Claude Desktop

Settings → Developer → Edit Config, then add an entry under mcpServers:

claude_desktop_config.json
{
  "mcpServers": {
    "refine": {
      "type": "http",
      "url": "https://app.refine-app.com/api/mcp/mcp",
      "headers": {
        "Authorization": "Bearer rfn_live_your_key_here"
      }
    }
  }
}

Claude Code (CLI)

terminal
claude mcp add --transport http refine \
  https://app.refine-app.com/api/mcp/mcp \
  --header "Authorization: Bearer rfn_live_your_key_here"

Cursor

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json in your project:

mcp.json
{
  "mcpServers": {
    "refine": {
      "url": "https://app.refine-app.com/api/mcp/mcp",
      "headers": {
        "Authorization": "Bearer rfn_live_your_key_here"
      }
    }
  }
}

Other clients

Any MCP client that supports remote Streamable HTTP servers works. Point it at https://app.refine-app.com/api/mcp/mcp and send your key as the Authorization: Bearer header.
3

Verify the connection

Restart your client. It should now list the Refine tools. Try a prompt like:

“Using Refine, what’s my brand’s visibility over the last 30 days?”

Prefer to test from the terminal first? List the available tools directly:

Test with curl
curl -X POST https://app.refine-app.com/api/mcp/mcp \
  -H "Authorization: Bearer rfn_live_your_key_here" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list",
    "params": {}
  }'

A 200 with a JSON-RPC result listing the tools means you’re connected. A 401 means the key is missing, malformed or revoked.

Next steps#