← All docs

The MCP server

Sprout Affiliate runs an MCP server, so an AI assistant can work with your affiliate program in plain language. Ask Claude which affiliates drove the most sales since your last payout, what commission is waiting to be approved, or to approve the three applications that came in overnight, and it looks the answer up in your store instead of you opening the admin.

The server is at https://app.sproutaffiliate.com/mcp. It uses the Streamable HTTP transport. It never sends money: it can preview a payout and record one you paid another way. To send PayPal payouts from an assistant, connect https://app.sproutaffiliate.com/mcp/payouts instead (see Sending payouts). Claude and ChatGPT connect with a Connect button that you approve in your Shopify admin; other assistants use a key you create in the app.

MCP is on the Professional plan, the same as the merchant API, because every tool is an API call made with your key. A store below Professional can still connect, and every tool answers with the reason it cannot run. Plans and billing.

Claude (web, desktop, and phone)

Claude connects with a Connect button. There is no key to copy.

  1. In Shopify, open Sprout Affiliate > Settings > Developer. In the MCP card, choose Claude and press Copy beside the server URL.
The MCP card in Settings, Developer, with the Claude tab selected, the server URL with a Copy button, the Claude steps, a Connected apps list, and Keys
Settings > Developer > MCP, with Claude selected
  1. In Claude on the web or the desktop app, open Customize > Connectors, press +, then Add custom connector.
  2. Name it Sprout Affiliate, paste the URL, and press Add. Leave the OAuth fields in Advanced settings empty.
  3. Press Connect on the new connector. Claude opens a Sprout Affiliate page. Press Continue in Shopify.
A Sprout Affiliate page reading Connect Claude to Sprout Affiliate, with a Continue in Shopify button and a box for a code
The page Claude opens
  1. In your Shopify admin, check the store name, choose Read only or Read and write, and press Approve.
The approval page in the Shopify admin: Connect Claude to Color Precision, the app, where it returns you, the store, Read only and Read and write choices, and Approve and Decline buttons
Approving in your Shopify admin
  1. Press Continue to Claude. You are back in Claude, connected, and Sprout Affiliate appears under Connectors.
Claude is approved, with a Continue to Claude button
After you approve

On a Team or Enterprise plan, an Owner adds the connector in Organization settings > Connectors, and each member presses Connect on it in Customize > Connectors.

Approving in the Shopify app on your phone

If the approval opens in the Shopify app instead of the browser Claude opened, approve there and press Continue. Sprout Affiliate shows a code. Go back to the Sprout Affiliate page Claude opened, type the code under Approved in the Shopify app?, and press Finish.

One more step: a Sprout Affiliate page showing an eight character code to type into the page Claude opened
The code to type on the page Claude opened

Only type the code yourself, into the page you opened from Claude or ChatGPT. Sprout Affiliate never asks you to send it to anyone.

ChatGPT

Developer mode is on chatgpt.com with a Plus, Pro, Business, Enterprise, or Edu plan.

  1. In Sprout Affiliate > Settings > Developer, choose ChatGPT and copy the server URL.
The MCP card with the ChatGPT tab selected and its steps
Settings > Developer > MCP, with ChatGPT selected
  1. In ChatGPT, open Settings > Security and login and turn on Developer mode.
  2. Go to Plugins and press +. Name it Sprout Affiliate, paste the URL, choose OAuth, and create it.
  3. ChatGPT opens the same Sprout Affiliate page as above. Press Continue in Shopify, choose the access, press Approve, then Continue to ChatGPT.

ChatGPT asks you to confirm each change before it makes one; the read tools are marked read only, so looking things up needs no confirmation.

How the Connect button works

Other assistants: get a key

  1. In Shopify, open Sprout Affiliate > Settings > Developer.
  2. In the MCP card, give the key a name you will recognise, such as Claude Code on my laptop.
  3. Choose Read only to let the assistant look things up, or Read and write to also let it approve applications and orders, change an affiliate, and add a bonus or a deduction.
  4. Press Create MCP key, then pick your assistant under Connect an assistant. The setup shown has your new key filled in. Copy it now: the key is shown once.

The key belongs to one store. Send it in the Authorization header, with or without Bearer in front.

The MCP card with the Claude Code tab selected, showing the claude mcp add command
After you create a key, the setup for each assistant has it filled in

Claude Code

Run this in a terminal:

claude mcp add --transport http sprout-affiliate https://app.sproutaffiliate.com/mcp \
  --header "Authorization: Bearer YOUR_MCP_KEY"

Then type /mcp in Claude Code. sprout-affiliate should say connected.

Cursor

Add this to ~/.cursor/mcp.json, or to .cursor/mcp.json in a project, then turn sprout-affiliate on in Cursor Settings > MCP.

{
  "mcpServers": {
    "sprout-affiliate": {
      "url": "https://app.sproutaffiliate.com/mcp",
      "headers": { "Authorization": "Bearer YOUR_MCP_KEY" }
    }
  }
}

VS Code

Add this to .vscode/mcp.json in your workspace and press Start above the entry. The tools appear in Copilot Chat in Agent mode.

{
  "servers": {
    "sprout-affiliate": {
      "type": "http",
      "url": "https://app.sproutaffiliate.com/mcp",
      "headers": { "Authorization": "Bearer YOUR_MCP_KEY" }
    }
  }
}

Claude Desktop

Open Settings > Developer > Edit Config, add this to claude_desktop_config.json, and restart Claude. It needs Node.js installed.

{
  "mcpServers": {
    "sprout-affiliate": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://app.sproutaffiliate.com/mcp",
               "--header", "Authorization:${SPROUT_AFFILIATE_KEY}"],
      "env": { "SPROUT_AFFILIATE_KEY": "Bearer YOUR_MCP_KEY" }
    }
  }
}

Antigravity

Open Settings > Customization > Installed MCP Servers > Open MCP Config, add this, save, and restart.

{
  "mcpServers": {
    "sprout-affiliate": {
      "serverUrl": "https://app.sproutaffiliate.com/mcp",
      "headers": { "Authorization": "Bearer YOUR_MCP_KEY" }
    }
  }
}

What an assistant can do

ToolKeyWhat it does
get_storereadThe store, its plan, currency, timezone, and what the key may do
list_affiliatesreadAffiliates and applications, by status or program
get_affiliatereadOne affiliate, and what they are owed
count_affiliatesreadHow many affiliates, in total and by status
list_programsreadPrograms, their commission, and their discount
list_referral_ordersreadReferral orders by status and date
get_commission_summaryreadCommission and sales split by pending, approved, paid, and rejected
get_performancereadThe Analytics page for a time frame: totals, the previous period, top affiliates, programs, and products
get_top_affiliatesreadBest or worst affiliates by referred sales
list_payoutsreadPast payouts, 10 at a time; one payout with who was in it
list_bonusesreadUnpaid bonuses
preview_payoutreadWho a payout would pay right now, how much, and who is held back
get_payout_schedulereadThe automatic payout schedule
approve_affiliate_applicationwriteApprove a pending application
decline_affiliate_applicationwriteDecline a pending application
approve_referral_orderwriteApprove a pending referral order
reject_referral_orderwriteReject a pending referral order
update_affiliatewriteChange an affiliate's rate, status, or note
add_bonuswriteGrant an affiliate a bonus
add_deductionwriteTake an amount off an affiliate's next payout, with a note the affiliate sees. Moves no money.
record_payoutwriteRecord a payout you made another way. Sends no money. /mcp only
send_payoutwriteSend a payout through PayPal, or record one paid another way. /mcp/payouts only
update_payout_schedulewriteTurn automatic PayPal payouts on or off, or change when they run. /mcp/payouts only

Lists return 25 rows at a time by default, so a store with thousands of affiliates does not fill the conversation. Ask for more and the assistant pages through.

A read only key is shown the read tools only. Every tool answers exactly what the matching API endpoint answers, with the same numbers, so what the assistant tells you matches the admin. The server asks the assistant to say what a change will do and wait for you to agree before making it.

How good the answers read depends on the assistant and the model behind it. The server hands it accurate figures; summarising them is the model's job.

Sending payouts

https://app.sproutaffiliate.com/mcp, the server in the Claude directory, never sends money. To let an assistant send PayPal payouts and turn automatic payouts on, add https://app.sproutaffiliate.com/mcp/payouts as its own connector or server, the same way as above, and approve it in Shopify. In Settings > Developer > MCP, choose Send PayPal payouts to see its URL and setup. Each server has its own connection: one never works on the other.

On /mcp/payouts, with read and write access, the assistant can pay your affiliates. It previews the payout first and tells you who gets paid and the PayPal total. It sends only after you agree, and it sends that exact total: if anything changed the total in between, such as a new approval or a bonus, nothing is sent and it previews again. A PayPal payout cannot be undone. A payout recorded as paid another way can be undone in the admin.

What it cannot do

Managing connections

Connected apps in the MCP card lists every Claude and ChatGPT connection, with its access, when it connected, and when it was last used. Revoke disconnects it at once; connect again from the assistant to get it back.

The Keys list below it shows each key, the assistant it last connected from, what it may do, and when it was last used. Revoke disconnects that assistant at once. To swap a key, create a new one, update the assistant, then revoke the old one.

Troubleshooting