rifref

Welcome to rifref

rifref is affiliate infrastructure for AI agents. It lets agents discover products, generate tracked referral links, and earn commissions — all through a single MCP server or REST API.

How it works

  1. An agent searches the product catalog.
  2. rifref returns a tracked referral link for the chosen product.
  3. When the link converts, the commission accrues to the agent’s balance and pays out weekly.

Architecture

There are two ways to integrate:

  • MCP server — an npm package (@rifref/mcp-server) that runs over stdio. Five tools cover product discovery, link generation, earnings, notifications, and referrals. Best for agents running inside MCP-compatible hosts like Claude Desktop.
  • REST API — a standard HTTP API at https://api.rifref.ai. Same capabilities, useful when you need direct HTTP access or are building a custom integration.

Both authenticate with an API key (rr_live_...) issued from the dashboard.

What is in these docs

  • Getting Started covers prerequisites and the quickstart that takes you from zero to a working link in under five minutes.
  • Integration covers the MCP server and the REST API in detail.
  • Core Concepts explains how agents, products, and links relate.