Skip to main content
AgentRef is agent-native. You can manage your affiliate program – creating programs, inviting affiliates, checking stats, processing payouts – through any AI assistant that supports tool use. This page covers all four integration methods. Pick the one that fits your stack.
The MCP (Model Context Protocol) server is the fastest way to connect AgentRef to AI assistants. For Claude Code, Claude App, Codex, Cursor, and OpenClaw (mcporter), the recommended flow is OAuth-first: add the server once, finish the browser sign-in, and let your client store tokens for future sessions.Merchant server URL: https://www.agentref.co/api/mcp/merchantAffiliate server URL: https://www.agentref.co/api/mcp/affiliateRecommended auth: MCP OAuth 2.1 with dynamic client registrationFallback auth for custom clients: Authorization: Bearer ak_live_your_key_here

Claude Code

Then open /mcp in Claude Code, select agentref, and complete the OAuth flow once.

Claude App

  1. Open Customize -> Connectors -> + -> Add custom connector
  2. Enter agentref as the name
  3. Enter https://www.agentref.co/api/mcp/merchant as the remote MCP server URL
  4. Start a new conversation and send please make a test call to the agentref mcp
  5. Confirm the tool request, then click Reconnect on the AgentRef connector card to authorize access

Codex

Copy this prompt into Codex:
Codex runs the command for you. Allow command execution once, then complete OAuth in the browser.If AgentRef is already configured and you only need to re-authenticate:

Cursor

In Settings -> Tools & MCP -> Add Custom MCP, save this mcp.json entry:
Then restart Cursor once, open the MCP settings again, and click Connect on the AgentRef server card.

OpenClaw (mcporter)

Install or enable the mcporter skill in OpenClaw, then run:
Approve the browser prompt. On success, the callback page says Authorization successful. You can return to the CLI.

OpenClaw REST skill (fallback)

If you prefer OpenClaw without MCP, install the official skill from ClawHub:
Then create the appropriate AgentRef API key and store it in ~/.openclaw/.env before restarting the gateway:

Other MCP clients

Any remote MCP client that supports OAuth for Streamable HTTP servers can use the same endpoint. Prefer OAuth when available. If your client only supports manual headers, use the same endpoint with Authorization: Bearer ak_live_your_key_here.

Try it out

After connecting, try these prompts with your AI assistant:
  • “Check my onboarding status and tell me what is still blocking launch”
  • “Show me my affiliate program stats for the last 30 days”
  • “List all my affiliates and their performance”
  • “Create a new affiliate program called ‘Partner Program’ with 25% recurring commission”
  • “Check if my tracking script is installed correctly”

Copy for AI assistants

If your AI assistant does not support MCP, point it to https://www.agentref.co/docs/llms-full.txt first. That gives it the full published AgentRef documentation as plain Markdown.

MCP workflow groups

AgentRef’s MCP release surface is organized into workflow groups with snake_case inputs and outputs. Mutation tools accept idempotency_key when retries need to be safe. MCP includes some workflows that are broader than REST/SDK, especially onboarding status, tracking snippet/verify, invite revoke, payout exports/status updates, and advanced Marketing Resources operations.

merchant_setup

  • get_onboarding_status
  • update_merchant_profile
  • create_program
  • list_programs
  • update_program
  • get_stripe_connect_url
  • complete_onboarding
  • get_tracking_snippet
  • verify_tracking

merchant_growth

  • list_affiliates
  • list_applications
  • review_application
  • set_affiliate_status
  • list_invites
  • create_invite
  • revoke_invite
  • get_program_overview
  • list_conversions
  • list_flags
  • review_flag

merchant_payouts

  • list_pending_payouts
  • list_payouts
  • list_upcoming_payouts
  • create_payout
  • update_payout_status
  • export_payouts_csv

merchant_marketing_resources

  • list_marketing_resources
  • get_marketing_resource
  • create_marketing_collection
  • update_marketing_collection
  • publish_marketing_resource
  • unpublish_marketing_resource
  • archive_marketing_resource
  • create_marketing_social_post
  • update_marketing_social_post
  • create_marketing_social_post_media_upload_session
  • complete_marketing_social_post_media_upload
  • remove_marketing_social_post_media
  • update_marketing_social_post_media
  • reorder_marketing_social_post_media
  • replace_marketing_social_post_media
  • create_marketing_resource_download_url
  • create_marketing_external_link
  • create_marketing_upload_session
  • complete_marketing_upload_session
  • import_marketing_resource_from_url
  • notify_marketing_resource_affiliates

affiliate_workspace

  • discover_programs
  • apply_to_program
  • get_affiliate_overview
  • list_my_programs
  • list_links
  • create_link
  • get_earnings
  • get_click_stats
  • list_my_payouts
  • update_my_payout_profile

affiliate_marketing_resources

  • list_marketing_resources
  • get_marketing_resource
  • render_marketing_social_post
  • create_marketing_resource_download_url
See MCP Server Deep Dive for the full tool, resource, prompt, and setup reference.

What’s next

MCP Server Deep Dive

Advanced MCP configuration, scopes, and resource access.

Node.js SDK

Full SDK reference with all methods and types.

Python SDK

Full SDK reference for Python integrations.