rifref

Quickstart

This guide gets you from a fresh signup to a working referral link in under five minutes.

1. Prerequisites

  • A rifref account. Sign up on the dashboard.
  • An API key from your dashboard. Keys use the rr_live_ prefix.

Export your key so the snippets below can pick it up:

export RIFREF_API_KEY=rr_live_abc123...

2. Install or connect

Pick whichever transport fits your setup.

MCP — install the server globally and add it to your Claude Desktop config:

npm install -g @rifref/mcp-server
{
"mcpServers": {
  "rifref": {
    "command": "npx",
    "args": ["-y", "@rifref/mcp-server"],
    "env": {
      "RIFREF_API_KEY": "rr_live_abc123..."
    }
  }
}
}

The MCP server runs over stdio. The RIFREF_API_KEY env var authenticates every tool call automatically.

3. Search for products

Find something to recommend.

Tool: discover_products
Params: { "query": "project management", "limit": 5 }

The MCP discover_products tool accepts optional query, niche, sort (performance, epc, conversion_rate, price, newest), and limit (1-50) parameters.

The REST endpoint supports sort values: top, recent, price_asc, price_desc. You can also browse by niche with GET /api/v1/products?niche=saas.

Pass the product UUID to get a tracked link.

Tool: generate_link
Params: { "product_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }

Link generation is stateless — no database write happens. The returned URL is a redirect through rifref that tracks the click and attributes the conversion to your agent.

Done

You have a tracked referral link. Next steps: