MetorialDocs

Set up Referral Rock in Metorial for Claude, ChatGPT and Cursor

Share Referral Rock with your team in Claude, ChatGPT and Cursor through Metorial: API keys sign-in, 23 tools (8 read-only).

To give your team Referral Rock in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Referral Rock integration in a Metorial portal, and each person connects with API keys. Agents can manage referral marketing programs, members, referrals, rewards, and payouts. The integration has 23 tools, 8 read-only, 12 write and 3 destructive, plus 5 triggers.

What you'll learn

  • How an admin shares Referral Rock in a portal and how each person connects
  • What Referral Rock asks for when you connect, and where to find it
  • How to keep the 8 read-only tools and reject the other 15

Before you start

Sign-in method

MethodTypeWhat a person provides
API KeysCustom credentialspublicKey and privateKey

API Keys

To connect, a person enters these values:

  • publicKey: Your Referral Rock public API key
  • privateKey: Your Referral Rock private API key

Admin: share Referral Rock in a portal

In the dashboard

Open Shared Resources

Open Workforce, choose the portal, and select Shared Resources under Access.

Share a new integration

Select Share a Resource, then New Integration, and choose Referral Rock. For how members connect, choose Each person connects so everyone enters their own API keys, or Shared connection to enter the API keys once for everyone.

Limit the tools

Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Referral Rock.

Choose who gets it

Add the access groups that should see Referral Rock. When a person asks for access from the portal, the request appears under Access Requests.

With the CLI

The CLI cannot create the per-user Referral Rock integration. Once it exists, check which groups have it:

metorial-admin portals access list <portal-id> --type provider_template --search "referral rock"

Employee: connect Referral Rock

In the portal

Open Referral Rock in the catalog

Sign in to your portal and open Referral Rock. The status reads Available.

Authenticate

Under Quick setup, select Authenticate. In the setup window, enter your API keys (publicKey and privateKey).

Confirm

The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.

With the CLI

metorial catalog search "referral rock"
metorial setup <catalog-item-id>

catalog search prints the catalog item ID.

Add it to your AI client

metorial install adds your Referral Rock connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.

metorial list "referral rock"
metorial client list
metorial install <client-identifier> <integration-id>

For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.

Make it read-only

Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 8 read-only tools, such as get_payouts and list_members, and lose the 12 write tools, such as issue_reward or create_member, and the 3 destructive tools, such as remove_member or remove_reward.

Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.

Check it worked

metorial list "referral rock"
metorial tools <integration-id>
metorial call <integration-id> get_payouts -d '{"view":"types"}'

metorial tools lists the 23 tools, minus any you rejected. get_payouts needs view, so replace the placeholders. It retrieves payout information including payout types, pending payouts, and transaction history.

To see every input a tool takes, run metorial schema <integration-id> <tool-key>.

Tools

Read-only tools (8)

  • get_reward_rules: Retrieve the member reward rules configured for a specific program. Needs programId.
  • get_payouts: Retrieve payout information including payout types, pending payouts, and transaction history. Needs view.
  • list_rewards: List rewards across programs, members, or referrals.
  • list_programs: Retrieve referral programs configured in your account.
  • list_referrals: List and filter referrals across programs.
  • list_members: List and search members (advocates) in referral programs.
  • get_member_access_urls: Generate pre-authenticated share links, portal access URLs, and social sharing URLs for a member.
  • get_member_stats: Get sharing, referral, and reward statistics for a member over a chosen period.

Write tools (12)

  • issue_reward: Issue a pending reward to its recipient. Needs rewardId.
  • create_reward: Create a new reward for a member or referral. Needs amount.
  • create_referral_action: Create a referral action to trigger recurring reward processing for a referral. Needs amount and referralQuery.
  • create_member: Add a new member (advocate) to a referral program. Needs programId, firstName and email.
  • process_payout: Process a payout transaction to transfer pending reward funds to a recipient. Needs payoutId.
  • update_member: Update an existing member's profile in a referral program.
  • create_referral: Add a new referral to a program using a member's referral code. Needs referralCode.
  • update_referral: Update an existing referral's details or status.
  • manage_email_subscriptions: Manage the email unsubscribe list. Needs action.
  • send_invite_feed: Send one or more contacts to be used with the automatic invite feature. Needs contacts.
  • update_reward: Update a reward amount, payout type, eligibility date, or description.
  • submit_customer_feed: Submit up to 10 customers to approve matching referrals and trigger configured rewards.

Destructive tools (3)

  • remove_reward: Delete one or more rewards by their IDs. Needs rewardIds.
  • remove_member: Remove a member from a referral program.
  • remove_referral: Remove a referral from a program.

Triggers

Referral Rock has 5 triggers, which fire on events in Referral Rock:

  • program_events: Triggered when a referral program is added, updated (activation changes), or deleted.
  • email_events: Triggered when an email address is unsubscribed from referral communications.
  • member_events: Triggered when a member (advocate) is added, updated, or deleted from a referral program.
  • reward_events: Triggered when a reward is added, updated, deleted, or issued.
  • referral_events: Triggered when a referral is added, updated, deleted, or when its status changes.

Next steps