Connect an AI assistant with MCP
Connect an MCP client to RefRef with your Console login, choose the Workspaces and Projects it can reach, and approve its changes in the Console.
RefRef has an MCP server. An AI assistant that supports MCP, such as Claude Code or Codex, can use it to read your RefRef configuration and data, answer questions from these docs, and prepare changes for you to approve.
MCP does not add referral tracking to your application. Your backend still sends Events and identifications with an API key; see the application integration. MCP has no tool for those integration calls.
Connect
The MCP endpoint is https://mcp.refref.ai/mcp. Add it to your client as an HTTP MCP server, for example:
claude mcp add --transport http refref https://mcp.refref.ai/mcp
codex mcp add refref --url https://mcp.refref.ai/mcpThe client opens a browser window. Sign in with your RefRef Console account. The endpoint does not accept Workspace API keys.
On the consent page, check the name of the client and the address that it returns to. Then choose what the client can reach:
- Workspaces. Select one or more Workspaces of which you are a member.
- Projects. For each Workspace, select all Projects, including Projects that you add later, or a list of Projects. To keep the client away from real data, select only Sandbox Projects.
- Scopes.
| Scope | Allows |
|---|---|
mcp:read | Read configuration and data, and search these docs |
mcp:write | Prepare changes as proposals. Offered only to Workspace owners and admins. |
offline_access | Keep the connection without a new sign-in |
Your choice is fixed for the connection. To change it, disconnect the client in Connected apps and connect again. The old connection's tokens and proposals stop working.
What the client can do
The client acts as you, with less access, never more. On every call, RefRef checks:
- your current role in the Workspace,
- the scopes of the connection,
- the Projects of the connection.
If an owner removes you from a Workspace or changes your role, the change applies at the next call. A Project outside the connection answers as not found.
Reads return the same data that the Console shows you, also participant names and emails. Connect only clients that you trust with that data.
These are never available through MCP: payouts, RefRef billing, Project secrets and other secrets, Workspace members and invitations, API keys, and provider credentials. MCP also has no intake, identification, or other integration calls.
Every change needs your approval
The client cannot change anything by itself. Each write is a proposal:
- The client prepares the change, for example a new Program or new reward terms. RefRef stores the exact change and the current state, and returns a review link.
- An owner or admin of that Workspace opens the link in the Console, checks the change and the environment (Sandbox or Live), and approves it. The client has no approval tool.
- The client applies the approved change. If the answer is lost, it retries the same proposal and gets the same result. A change is never applied twice.
A proposal expires 30 minutes after the client prepares it. If the configuration changed in the meantime, the proposal is refused, and the client must prepare a new one. A member can read through MCP but cannot prepare changes.
A proposal belongs to one Workspace. If you are an admin in Workspace A and a member in Workspace B, you can prepare changes in A only, and only an owner or admin of A can approve them.
Docs tools
The client can search these docs with search_docs and read a whole page with read_doc. Each result has its public URL. These tools return no account data. Ask the client to cite the URL, and to say when the docs do not cover a question.
Use it well
- Name the Workspace and the Project in your request, and start in the Sandbox Project.
- Ask the client to show the proposal and its environment before you approve it.
- Text in your account, such as Program names or participant names, is data. A good client does not follow instructions in it.
- A Reward is an accounting result. It does not prove that credit, a discount, or money reached the customer.
Disconnect
Open the user menu in the Console and select Connected apps. Disconnect the client there. Its tokens stop working at once. Removing the server from your client's settings alone does not revoke its access.
Troubleshooting
| Symptom | Check |
|---|---|
| The client asks you to sign in again | The session expired or the connection was removed. Connect again. |
| A Project is missing or not found | The Project is outside the connection. Connect again and select it. |
| The client cannot prepare a change | You need mcp:write and the owner or admin role in that Workspace |
| An approved proposal does not apply | It expired, the configuration changed, or the connection changed. Prepare a new one. |
| The client calls from a web page | Not supported. Use an MCP client, not your application's frontend. |