Skip to main content

Connect your AI agent to ReferralCandy (MCP)

Connect your AI agent to read ReferralCandy campaign data, ask about performance, and manage or turn off its access.

Written by Adam

Connect an AI agent installed on your computer, such as Claude Code, Codex or Cursor, to ask about your ReferralCandy campaigns and performance in your own words. The connection uses MCP (Model Context Protocol) to let your agent read your referral and affiliate program data. It cannot change your program.

For the AI assistant inside the ReferralCandy dashboard, see Referral Expert.


Connect your AI agent

To connect your AI agent to ReferralCandy:

  1. Open ReferralCandy. On Shopify, go to Apps > ReferralCandy in your Shopify admin. On other platforms, sign in to your ReferralCandy dashboard.

  2. Go to Account and open AI agents. In the Shopify app, the tab may be under More views.

  3. On the AI agent connection page, select Connect an AI agent. ReferralCandy creates a connection key and shows Setup not finished. Keep this page open until you are connected.

  4. Select Copy setup prompt and paste the prompt into a new chat in your AI agent. The prompt tells your agent how to connect and asks it to give you a secure place to enter your key outside the chat.

  5. Select Copy connection key in ReferralCandy, then paste the key into the secure location your agent specifies. Keep the key out of the chat. ReferralCandy only shows the key once.

  6. Ask your agent to list your active referral campaigns. The ReferralCandy page updates automatically to Connected when your agent uses the key.

The Connected status means your agent has used the connection key at least once. Check Last used on the same page to see when it last accessed your account.

Important: Anyone with your connection key can read the ReferralCandy data available through this connection, including advocate and referred-friend names and email addresses. Use the key only with an agent you trust.

For manual setup, select See details on the setup page to view the server address and authorization-header instructions.


What you can ask your agent

Your connected AI agent can read your referral and affiliate campaigns, campaign performance, individual referrals, referral-funnel activity and reward-spend information. Name the campaign and date range when asking a question. For example:

  • “List my active referral campaigns.”

  • “How much referred revenue did this campaign bring in last month compared with the month before?”

  • “Show me this campaign's qualified referrals from last week.”

  • “Where are advocates dropping off between sharing and a friend making a purchase?”

  • “Summarize cash and store credit rewards for this campaign last month.”

Your agent can also send feedback about problems with ReferralCandy's tools to the ReferralCandy team. The team reads these reports but does not reply through your agent.


Manage your connection key

Replace a lost or exposed key

If you lose your connection key or think someone else has seen it, return to Account > AI agents. Select Replace key, then confirm. If setup is unfinished and the key is no longer displayed, select Create a new key and confirm. To discard a key still displayed during setup, use Cancel setup and confirm, then start again.

Replacing your connection key stops the old key from working immediately. Give your agent the new key in its secure storage location, then ask it to list your referral campaigns again. Update the existing ReferralCandy connection in your agent instead of adding another one.

Turn off AI access

To stop AI access through the MCP connection, go to Account > AI agents, select Turn off AI access, then confirm with Turn off access. The page returns to Not connected, and the key stops working immediately. Your referral program and its data stay unchanged.

If you have started setup but want to stop before connecting, select Cancel setup and confirm. This also turns off the key you created. You can start again later with a new key.


Troubleshoot the connection

If the page still says Setup not finished

Setup not finished means a connection key exists but your agent has not used it yet. Check that you completed your agent's setup instructions and stored the key where it requested. Close and reopen your AI agent, then ask it to list your referral campaigns.

If you replaced the key, update the key in your agent too. For a manual connection, check the server address and authorization-header format under See details in ReferralCandy.

If your agent reports that the connection key was rejected

If your agent reports that the MCP credential was rejected, check that it has your current connection key. A key you replaced or turned off will no longer work. If the error mentions Account > MCP, open Account > AI agents in ReferralCandy.

If you cannot find AI agents

Check More views on the Account page for the AI agents tab. If it is still missing, our support team can look into availability for your account — just let us know.

Did this answer your question?