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

In Refine, open Settings → API keys and click Generate key. The key is created for the brand currently selected in the dashboard and is shown only once: store it somewhere safe, like a password manager. You can hold up to 20 active keys.

The same screen fills the key into the connection snippets below, so for Claude Desktop, Claude Code, ChatGPT and Hermes you can copy from there and skip step 2.

Scripting it? The keys endpoint does the same thing while you are signed in (it is authenticated by your dashboard session cookie, not by a key). Omit brand_id to use your current brand.

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", "brand_id": "<brand-uuid>" }'

The response contains the plaintext key:

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

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

One click: in Settings → API keys, choose the Claude Desktop tab and download the connector. Double-click the .mcpb file and Claude Desktop installs it with your key already filled in, labelled with your brand (“Refine — Acme”), so several brands stay apart. To configure it by hand instead: 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"
      }
    }
  }
}

ChatGPT

Settings → Connectors → Add (MCP server), then paste two values: the server URL https://app.refine-app.com/api/mcp/mcp and the authorization header Bearer rfn_live_your_key_here.

Hermes Agent

Hermes can publish the next Refine article on your site every three days, on its own. On the machine where Hermes runs, save the key, install the refine-publisher skill and the schedule:

terminal
echo 'REFINE_MCP_KEY=rfn_live_your_key_here' >> ~/.hermes/.env
hermes skills install https://app.refine-app.com/hermes/refine-publisher/SKILL.md
hermes cron create "every 3 days" "Publish the next Refine article." --skill refine-publisher

Then add the server to ~/.hermes/config.yaml and run /reload-mcp in Hermes. The key stays in .env, never in the config file:

~/.hermes/config.yaml
mcp_servers:
  refine:
    url: "https://app.refine-app.com/api/mcp/mcp"
    headers:
      Authorization: "Bearer ${REFINE_MCP_KEY}"

Refine enforces a gap of 2 to 5 days between posts, so a more frequent schedule stays safe. See Publishing for how the loop works.

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#