- MCP Server
- Node.js SDK
- Python SDK
- REST API
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 (Then open 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:Then restart Cursor once, open the MCP settings again, and click Connect on the AgentRef server card.OpenClaw (
Install or enable the Approve the browser prompt. On success, the callback page says Then create the appropriate AgentRef API key and store it in
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.Server URL: https://www.agentref.co/api/mcpRecommended auth: MCP OAuth 2.1 with dynamic client registrationFallback auth for custom clients: Authorization: Bearer ak_live_your_key_hereClaude Code
/mcp in Claude Code, select agentref, and complete the OAuth flow once.Claude App
- Open
Customize -> Connectors -> + -> Add custom connector - Enter
agentrefas the name - Enter
https://www.agentref.co/api/mcpas the remote MCP server URL - Start a new conversation and send
please make a test call to the agentref mcp - Confirm the tool request, then click Reconnect on the AgentRef connector card to authorize access
Codex
Copy this prompt into Codex:Cursor
InSettings -> Tools & MCP -> Add Custom MCP, save this mcp.json entry:OpenClaw (mcporter)
Install or enable the mcporter skill in OpenClaw, then run:Authorization successful. You can return to the CLI.OpenClaw REST skill (fallback)
If you prefer OpenClaw without MCP, install the official skill from ClawHub:~/.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 withAuthorization: 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 tohttps://www.agentref.co/docs/llms-full.txt first. That gives it the full published AgentRef documentation as plain Markdown.
Compact AgentRef context block for non-MCP chats
Compact AgentRef context block for non-MCP chats
MCP workflow groups
AgentRef’s MCP release surface is organized into four workflow groups with snake_case inputs and outputs. Mutation tools acceptidempotency_key when retries need to be safe.
merchant_setup
get_onboarding_statusupdate_merchant_profilecreate_programlist_programsupdate_programget_stripe_connect_urlcomplete_onboardingget_tracking_snippetverify_tracking
merchant_growth
list_affiliatesset_affiliate_statuslist_invitescreate_inviterevoke_inviteget_program_overviewlist_conversionslist_flagsreview_flag
merchant_payouts
list_pending_payoutslist_payoutslist_upcoming_payoutscreate_payoutupdate_payout_statusexport_payouts_csv
affiliate_workspace
discover_programsapply_to_programlist_my_programslist_linkscreate_linkget_earningsget_click_statslist_my_payoutsupdate_my_payout_profile
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.