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
- Open AffiliateBase.
- Go to Settings -> AI Connectors.
- Click Create token.
- 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 the generated referral ID as client_reference_id before marking setup complete. Do not use the ?via token as client_reference_id.
The AI should read setup state first, then recommend the simplest next action.
What the connector can do
Setup tools:
read_setup_statusget_setup_contextget_install_instructionsget_test_affiliate_linkverify_tracking_installationmark_integration_confirmed
Read-only operating tools:
list_campaignslist_affiliateslist_referralslist_commissionslist_payoutsget_dashboard_summary
Read complete lists and currency totals
List tools accept page (starting at 1), limit (1–50), and an optional exact id. Affiliate lists also accept state; referral, commission, and payout lists accept state and affiliate_id. Follow pagination.next_page until pagination.has_more is false. Responses include total_count, total_pages, and the current page and limit; the first 50 records are not the full account history.
Dashboard monetary totals are nested by currency, then state. For example, commission_totals_cents can contain {"USD":{"due":1000},"EUR":{"due":900}}. Keep currencies separate; these values do not represent a converted account-wide total. Setup-test records are excluded from operating lists and commission/payout summaries.
get_test_affiliate_link prefers an existing setup test link. Check setup_verification_link; if false, open the setup screen to obtain its dedicated test link before collecting confirmation evidence.
Safe write behavior
The only setup write in the default connector is mark_integration_confirmed.
Use it only after you have verified:
- an affiliate link was opened
- a Stripe checkout was started
- the Stripe Checkout Session has the generated referral ID as
client_reference_id
The tool requires an idempotency key of at least eight characters. Call it first with dry_run: true to check readiness. Confirmation uses the same stored setup-test referral and Stripe checkout evidence as the setup screen; a verbal confirmation alone is insufficient. If proof is missing, the tool returns verification_required. A successful confirmation records an onboarding event; retrying the same key returns the prior result. It does not execute payouts or change commission state.
Recommended setup flow
Ask the AI client to:
- Call
read_setup_status. - Call
get_setup_context. - Call
get_install_instructionswith the right checkout path. - Call
get_test_affiliate_link. - Help you update your checkout code or Payment Link.
- Call
verify_tracking_installation. - Call
mark_integration_confirmedwithdry_run: true, then confirm using the same idempotency key only after the readiness check succeeds.
For most Stripe Payment Link setups, the AI should keep you on the default path: install the tracking script on the same published page as the Payment Link, then confirm Stripe received the generated referral ID as client_reference_id.
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.