Skip to main content

AI Connectors and MCP

Connect AffiliateBase to ChatGPT, Claude, Cursor, Codex, or another MCP client

Table of Contents

AI Connectors and MCP

AffiliateBase can expose a scoped Model Context Protocol (MCP) connector so an AI client can help with setup and read program state.

Use this when you want ChatGPT, Claude, Cursor, Codex, or another MCP-compatible client to answer questions like:

  • What setup step is incomplete?
  • Which tracking instructions should I follow?
  • What test affiliate link should I open?
  • Has AffiliateBase seen a first click or conversion?
  • What campaigns, affiliates, referrals, commissions, or payouts exist?

Create a connector token

  1. Open AffiliateBase.
  2. Go to Settings -> AI Connectors.
  3. Click Create token.
  4. Copy the token immediately. It is only shown once.

The default setup-assistant token is scoped to:

  • setup status and setup guidance
  • setup integration confirmation
  • read-only reporting
  • read-only campaign and affiliate lists

It does not grant payout execution, commission voiding, affiliate deletion, API key creation, or account-wide destructive access.

MCP endpoint

Use this MCP URL:

https://app.affiliatebase.io/mcp

Most clients need:

  • the MCP URL
  • the connector token
  • your AffiliateBase account ID

Use the token as a bearer token:

Authorization: Bearer ab_live_your_connector_token
X-Account-Id: your_account_id

Example client config

For clients that accept a JSON MCP server config, use:

{
  "mcpServers": {
    "affiliatebase": {
      "url": "https://app.affiliatebase.io/mcp",
      "headers": {
        "Authorization": "Bearer ab_live_your_connector_token",
        "X-Account-Id": "your_account_id"
      }
    }
  }
}

Starter prompt

After connecting the MCP server, start with:

Use AffiliateBase MCP to read my setup status, get install instructions, and help me verify that Stripe Checkout receives client_reference_id before marking setup complete.

The AI should read setup state first, then recommend the simplest next action.

What the connector can do

Setup tools:

  • read_setup_status
  • get_setup_context
  • get_install_instructions
  • get_test_affiliate_link
  • verify_tracking_installation
  • mark_integration_confirmed

Read-only operating tools:

  • list_campaigns
  • list_affiliates
  • list_referrals
  • list_commissions
  • list_payouts
  • get_dashboard_summary

Safe write behavior

The only setup write in the default connector is mark_integration_confirmed.

Use it only after you have verified:

  1. an affiliate link was opened
  2. a Stripe checkout was started
  3. the Stripe Checkout Session has client_reference_id

The tool requires an idempotency key and records an onboarding event. It marks setup integration as confirmed; it does not execute payouts or change commission state.

Ask the AI client to:

  1. Call read_setup_status.
  2. Call get_setup_context.
  3. Call get_install_instructions with the right checkout path.
  4. Call get_test_affiliate_link.
  5. Help you update your checkout code or Payment Link.
  6. Call verify_tracking_installation.
  7. Call mark_integration_confirmed only after you confirm the Stripe proof.

For most Stripe Payment Link setups, the AI should keep you on the default path: install the tracking script, add data-affiliatebase to the Payment Link, then confirm client_reference_id in Stripe.

Security notes

  • Use AI connector tokens, not full-access REST API keys.
  • Revoke connector tokens you no longer use.
  • Create short-lived tokens for testing.
  • Do not paste tokens into public chats, shared documents, or issue trackers.
  • Use a disposable test account before testing setup writes.