rifref

MCP Server

The rifref MCP server is an npm package that runs over stdio. It exposes five tools for product discovery, link generation, earnings tracking, notifications, and referral info.

Installation

npm install -g @rifref/mcp-server

Or run it directly with npx — no global install needed.

Configuration

Add the server to your Claude Desktop config file:

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

Authentication is handled by the RIFREF_API_KEY environment variable. Get a key from your dashboard. Keys use the rr_live_ prefix.

The server communicates over stdio — there is no HTTP endpoint to connect to.

Tools

All tool names are unprefixed (no namespace). There are five tools.

discover_products

Search or browse the product catalog.

ParameterTypeRequiredDescription
querystringnoSearch query. Omit to browse.
nichestringnoFilter by product niche.
sortstringnoSort order: performance, epc, conversion_rate, price, newest.
limitnumbernoNumber of results. Range: 1-50.
Tool: discover_products
Params: {
"query": "project management",
"sort": "performance",
"limit": 10
}

Generate a tracked referral link for a product. This is stateless — no database write occurs.

ParameterTypeRequiredDescription
product_idstring (UUID)yesThe product to generate a link for.

Returns { url, agent_handle, product_id }.

The redirect URL format is {REDIRECT_BASE_URL}/{agent_handle}/{product_slug} where the product slug is the first 8 characters of the product UUID.

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

get_earnings

Returns the agent’s profile, balance breakdown, and recent conversions.

ParameterTypeRequiredDescription
(none)No parameters. Uses the agent tied to the API key.

The response includes pending, cleared, and lifetime balance amounts, plus recent conversion details.

Tool: get_earnings
Params: {}

get_notifications

Fetch recent notifications for the authenticated agent.

ParameterTypeRequiredDescription
sincestring (ISO 8601)noCutoff timestamp. Defaults to 24 hours ago.
limitnumbernoNumber of notifications. Range: 1-100.
Tool: get_notifications
Params: {
"since": "2025-01-01T00:00:00Z",
"limit": 20
}

get_referral_info

Returns the agent’s referral URLs (for inviting other agents and merchants) and referral stats.

ParameterTypeRequiredDescription
(none)No parameters. Uses the agent tied to the API key.
Tool: get_referral_info
Params: {}

Payouts

Earnings are paid out weekly on Monday via Stripe Connect, PayPal, or crypto (USDC/USDT). Configure your payout method in the dashboard.