# Friendbuy MCP MCP

> Friendbuy MCP helps you automate your entire referral program. Use it to manage customer loyalty, track every conversion, and distribute rewards without logging into the dashboard. You can check a code's status instantly, log purchases after the fact, or list all recent reward payouts—all through natural conversation with any compatible AI client.

## Overview
- **Category:** marketing-automation
- **Price:** Free
- **Tags:** referral-marketing, loyalty-programs, conversion-tracking, reward-management, growth-marketing

## Description

This connector lets your agent run word-of-mouth campaigns and handle customer loyalty programs for e-commerce brands. You don’t have to manually check dashboards or update spreadsheets every time someone makes a purchase or signs up. Your agent handles the entire lifecycle: it can instantly create unique referral codes for customers, log conversions—even if they happen offline—and ensure that rewards are distributed correctly and on time. If you're building out your marketing automation tools, connecting Friendbuy through Vinkius gives your AI client access to this core logic right where you need it, allowing you to manage complex reward payouts just by asking a question.

## Tools

### get_referral_code_status
Checks if a given referral code is currently active and what its status is.

### create_referral_code
Generates a new, unique sharing code for a specific user to use in their referral campaign.

### check_api_connection
Tests the live connection status between your system and Friendbuy's APIs.

### list_tracked_purchases
Pulls a record of every purchase that has been officially attributed and tracked through the referral system.

### list_referral_rewards
Retrieves a list of all reward payouts, which you can filter to see who your top advocates are.

### list_webhooks
Displays all webhooks you have set up to ensure your internal systems receive real-time notifications.

### track_conversion_purchase
Records a purchase event and its value, which triggers the reward logic for the associated advocate.

### track_conversion_signup
Logs a new user sign-up as a conversion to ensure rewards are correctly distributed.

## Prompt Examples

**Prompt:** 
```
List all recent referral rewards distributed.
```

**Response:** 
```
Retrieving rewards... I found 5 recent referral rewards, including a $20 account credit for 'advocate@example.com'.
```

**Prompt:** 
```
Generate a new referral code for customer 'user_123' (jane@email.com).
```

**Response:** 
```
Code generated! Jane's unique referral code is 'JANE-REF-99'. She can now share this with friends to earn rewards.
```

**Prompt:** 
```
Track a $50 purchase for order 'ORD-987' from 'friend@email.com' using code 'JANE-REF-99'.
```

**Response:** 
```
Purchase tracked successfully! The $50 conversion for order ORD-987 has been logged, and the referral reward logic for advocate Jane has been triggered.
```

## Capabilities

### Check API connection
Verifies that the connection between your system and Friendbuy is active and authorized.

### Generate referral codes
Creates new, unique referral codes for specific customers to share with their network.

### Verify code status
Checks whether a given referral code is active and if it has already been used.

### List rewards paid out
Retrieves a list of all recent reward distributions, allowing you to filter results by the advocate who earned them.

### Log tracked purchases
Records purchase events and revenue totals into the referral system, triggering reward logic for advocates.

### Log signup conversions
Registers new user signups as a conversion event to ensure rewards are triggered correctly.

## Use Cases

### Tracking a large, recent campaign payout
A marketing lead asks: 'What rewards did we pay out last week?' Your agent runs `list_referral_rewards` and immediately returns the top 5 advocates and how much they earned. No spreadsheet needed.

### Logging a major offline sale
The ops team member knows about a big, in-store order but can't access the backend. They tell their agent to run `track_conversion_purchase` for $200 on 'Order XYZ', and the system logs it immediately.

### Investigating a suspicious code
Support needs to know if a customer's referral link is valid. They ask the agent to run `get_referral_code_status` with the provided code, and the system confirms its current status.

### Onboarding new partners
You need to give a new user their unique sharing link. You simply ask your agent to run `create_referral_code` for that user, and it returns the ready-to-share code.

## Benefits

- You stop clicking through dashboards. Need to know if a code works? Just ask your agent, and it runs the `get_referral_code_status` tool instantly.
- Logging purchases is fast. Instead of manual data entry, you use `track_conversion_purchase` to log sales immediately, ensuring advocates get paid without delay.
- Audit rewards with confidence. You can run `list_referral_rewards` through your agent and filter the results by advocate name to see who's doing the heavy lifting.
- Automation for signups is key. If a user signs up via an unconventional channel, running `track_conversion_signup` logs it instantly so rewards aren't forgotten.
- Visibility into system health. You can run `list_webhooks` to confirm your internal systems are set up to receive real-time notifications when conversions happen.

## How It Works

The bottom line is that you manage complex referral logic using plain language commands, without writing any backend code.

1. Subscribe to this MCP on Vinkius and provide your Friendbuy Access Key and Secret Key.
2. Connect your preferred AI client, like Cursor or Claude, to the catalog.
3. Ask your agent a direct question—like 'List all rewards for Jane'—and the MCP handles the rest.

## Frequently Asked Questions

**How do I get my API Keys for Friendbuy?**
Log in to your Friendbuy account, go to Settings > Developer, and you will find your Access Key and Secret Key.

**Can I manually log a purchase through the agent?**
Yes! Use the 'track_conversion_purchase' tool. Provide the Order ID, amount, and customer email. If you include the 'referralCode', it will trigger the advocate's reward.

**How do I verify if a referral code is still valid?**
Use the 'get_referral_code_status' tool. The agent will check the Developer API and return the active status and associated reward value.

**Is it possible to list webhooks?**
Yes, the 'list_webhooks' tool retrieves all active webhook configurations so you can verify where real-time reward notifications are being sent.

**How do I use the `list_referral_rewards` tool to identify my top promoters?**
You list all distributed rewards, then filter the results by advocate email. This lets you pinpoint which specific users are generating the most referrals and earning the most rewards.

**What is the best use case for `create_referral_code`?**
Use this tool when you need to generate a unique, personalized share code. It lets you give a specific customer their own referral link so they can start promoting immediately.

**How is the `track_conversion_signup` tool different from logging purchases?**
This tool records successful signups when an immediate purchase hasn't happened. It ensures that non-monetary leads or free trial registrations are still credited to the correct advocate.

**What data can I pull using `list_tracked_purchases`?**
It retrieves a complete list of all purchases associated with referral efforts. You can check purchase details, including order IDs and the specific code used for attribution.