Claude Code

# Set up an affiliate program with Claude Code.

To set up an affiliate program with Claude Code, add Affiligato’s MCP server with one command, approve it once in your browser, and ask Claude to “Install Affiligato on this site”: it creates the program, installs the tracking script, passes the referral to your checkout, connects Stripe and checks your live site, step by step.

[Set up free](https://app.affiligato.com/sign-in?next=%2Fnew)

## 1. Add the MCP server

```
claude mcp add --transport http affiligato https://app.affiligato.com/mcp
```

Run it once in your project’s terminal. It adds Affiligato’s MCP server to Claude Code; nothing is installed in your codebase.

## 2. Approve it in your browser

The first time Claude calls Affiligato, your browser opens; in Claude Code you can also run /mcp and choose Authenticate. Sign in or sign up, and click Allow. There is no key to copy, and you can remove the agent at any time under Integrations → AI agents.

## 3. Ask Claude to install Affiligato

Say “Install Affiligato on this site.” Claude reads the setup skill, reuses a program that already has your website or asks you a new one’s questions one at a time, and creates it. setup_plan then lists every step, who does it and the tool for it.

Tools: `list_programs`, `use_program`, `create_program`, `setup_plan`

## 4. What Claude changes in your codebase

Claude puts the tracking script in your site’s shared layout, with the consent call when your site asks visitors for consent, and passes the partner’s referral to your checkout: for Stripe subscriptions, in subscription_data.metadata.affiligato_ref. It adds a “Become a partner” link to your footer and styles your partner page from your site. A signup line is optional: a checkout that carries the referral needs nothing else.

Tools: `install_snippet`, `partner_link`, `set_portal_branding`

## 5. Connect Stripe

Claude gives you the Affiligato Stripe App’s link: you install it in your browser, with no key to copy. Without the app, you give a restricted key once (Webhook Endpoints: Write), Claude creates the webhook, and you delete the key.

Tools: `connect_stripe`, `create_stripe_webhook`

## 6. Deploy and verify

Deploy, and Claude checks a page of your live site with verify_install: the script found, billing connected, then the first visit through a partner link and the first referred payment.

Tools: `verify_install`

## 7. Switch to Production

Until you subscribe, the program is in Test mode on live data: partners can join and commissions are recorded, while payouts, partner email, custom domains and API keys wait. go_live says what the live program still needs; starting a plan under Billing switches it to Production.

Tools: `go_live`

## What Claude asks before acting

Affiligato’s MCP server has 189 tools. The 53 that delete, reject or move money show you what they will do and wait for your yes, in Claude Code or on one page in Affiligato. Every change is in your audit log under the agent’s name and yours.

The steps Claude follows are in the [setup skill](https://affiligato.com/SKILL.md), and every tool, what it takes and whether it asks first is in the [agent tools reference](https://affiligato.com/docs/agent-tools/).

## Launch your partner program today.

Set it up free in Test mode; pay when you switch to Production. Most programs are live in an afternoon.

[Set up free](https://app.affiligato.com/sign-in?next=%2Fnew) [Open the live demo](https://affiligato.com/demo/)
