RefCampaign/docs

MCP server (Claude Desktop)

Connect Claude Desktop to RefCampaign and pilot your affiliate program in natural language.

RefCampaign hosts a Model Context Protocol (MCP) endpoint so you can manage your program directly from Claude Desktop and other MCP-compatible LLM clients. No download, no Node install — just paste a URL.

What you can do

Twelve tools exposed:

ToolUse case
get_dashboard_summary"How's my program this month?"
list_campaigns, get_campaignQuick overview of a specific campaign
list_conversions, get_conversions_summaryDrill-down on conversions, period-over-period
list_commissionsTriage what needs review
approve_commissions (bulk), reject_commissions (bulk)"Approve all PENDING under €50 from May"
list_affiliates, get_affiliateInspect a specific affiliate's stats
list_pending_applicationsFind applicants awaiting review
accept_application, reject_applicationOnboard or refuse a single applicant
accept_applications (bulk)Mass-onboard applicants

Bulk write tools default to a dry-run preview showing how many rows would be affected. Pass confirm: true to execute. Combined with Claude Desktop's per-tool permission prompt, this gives you a double safety net before anything is mutated.

Setup

  1. 1

    Generate an API key

    Go to Settings → API keys and create a new key. Copy it once — it's hash-stored and won't be shown again.

  2. 2

    Edit your Claude Desktop config

    Open the file:

    • macOS : ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows : %APPDATA%\Claude\claude_desktop_config.json

    Add the RefCampaign entry under mcpServers:

    {
      "mcpServers": {
        "refcampaign": {
          "url": "https://app.refcampaign.com/api/mcp",
          "headers": {
            "Authorization": "Bearer rcm_live_xxxxxxxxxxxx"
          }
        }
      }
    }

    Replace rcm_live_... with your API key.

  3. 3

    Restart Claude Desktop

    The 12 RefCampaign tools should appear in the tool picker. Type a request in natural language, e.g.

    "Approve all my pending commissions under €50 from May."

    Claude will pick the right tool, run a dry-run first, then ask your permission before executing.

Authentication, scopes & rate limits

  • Every request requires Authorization: Bearer <api-key> — no anonymous access.
  • Per-account rate limit : 1000 requests / minute, sliding window. The MCP client retries once on a 429 if Retry-After is short ; otherwise it surfaces the error to the LLM.
  • Request body capped at 1 MB — JSON-RPC payloads are tiny in practice, the cap is a safety margin.
  • All actions are scoped to your merchant account — there is no risk of leaking data across merchants.

API key scopes

If your API key has scopes attached :

  • mcp:read — required for the read tools (list / get / summary).
  • mcp:write — required for the bulk approve / reject / accept tools.
  • * (wildcard) or no scopes set — full access (backward-compatible default).

Scope-restricted keys are useful when you want to give Claude Desktop read-only access for reporting without risking accidental approvals. Generate a mcp:read-only key alongside your main key and swap the header when you want strict read-only mode.

Troubleshooting

"Invalid API key" on first call → the key was either revoked, never generated, or copied with a typo. Regenerate at Settings → API keys.

No tools appear after install → check Claude Desktop's developer logs (Help → Show Logs). Most issues are typos in claude_desktop_config.json ; validate the JSON with cat $config | jq first.

429 Too Many Requests → you've exceeded 1000 requests / minute on the API key. Wait a minute or generate a separate key for a different integration.

Privacy

The hosted MCP endpoint sees only the requests your Claude Desktop sends. We log requests at the same level as the rest of our API (account ID, tool name, response status — never the prompts you typed in Claude Desktop). The conversation between you and Claude stays between you and Anthropic.

On this page