# Referly MCP

> Referly MCP Server connects your AI client directly to your affiliate program data. Manage partners, check conversion rates, and run complex growth workflows without ever leaving your chat window. You can list affiliates, track conversions in real-time, validate promo codes, and automate partner onboarding—all through natural conversation.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** referly, referrals, affiliate-marketing, growth-automation, conversion-tracking, referly-so, marketing-orchestration, coupons-api, mcp

## Description

Look, you're running an affiliate program; you don't wanna be glued to some dashboard just to check who sold what. This server lets your AI client handle all that messy work—managing partners, tracking conversions, kicking off campaigns—all from right here in the chat window.

### **Managing Your Network of Affiliates**

If you need to see who's on board, you can use `list_affiliates` to spit out a full list of every single partner account we manage. Need to know how one specific person is doing? Just run `get_affiliate_details`, and it’ll pull up their whole performance profile instantly. You gotta bring new talent into the fold? Use `create_affiliate` with just their name and email, and we'll get them set up in your system.

### **Tracking Money and Conversions**

When it comes to numbers, you need real-time data. Run `get_referral_analytics` for a high-level summary of the whole program—it’ll give you totals on revenue and conversions right away. You can also grab raw history logs by calling `list_referrals`, which pulls every single recorded referral event that's ever happened. If you need to manually log a new sale or sign-up, use `track_referral_event` to write that conversion into the system’s tracking log immediately.

### **Running and Controlling Automation**

You don't wanna wait for your welcome sequence workflow to finish; sometimes you gotta kick it off. Use `list_referral_workflows` to see all the pre-built automation jobs available. To force one of those processes to start, run `trigger_workflow`. If you need to know if that job finished right or if something went sideways, check the status using `get_workflow_status`. It'll tell you if the automated growth sequence succeeded or failed.

### **Marketing Assets and Campaigns**

For your campaigns, you gotta manage codes. Use `list_coupons` to fetch a complete list of every active discount coupon available for use right now. And before you let anyone use a code in a promotion, always run `validate_coupon` with the specific code they're using; that checks if it’s valid and hasn't expired.

This whole setup means your AI client handles all the complex data retrieval—listing partners, checking analytics, forcing workflows, validating codes—so you don't have to navigate a dozen dashboards or export messy CSV files. You just talk to it, and it gets you the answers.

## Tools

### create_affiliate
Adds a new affiliate partner account using their name and email address.

### get_affiliate_details
Retrieves the full performance profile for one specific, existing affiliate.

### get_referral_analytics
Pulls a high-level summary of referral program performance, including revenue and conversion totals.

### get_current_user
Provides basic details about the account currently authenticated to Referly.

### get_workflow_status
Checks if a specific automated growth workflow finished successfully or failed.

### list_affiliates
Generates a list of every affiliate partner currently managed within the account.

### list_coupons
Fetches and displays all active discount coupons available for use in campaigns.

### list_referrals
Retrieves raw data logs for every recorded referral event that has occurred.

### list_referral_workflows
Displays a list of all automated, pre-built referral processes configured.

### trigger_workflow
Forces an automation workflow to run immediately, useful for re-running failed processes.

### track_referral_event
Manually records a new conversion or sign-up event into the system's tracking log.

### validate_coupon
Checks if a given discount coupon code is valid and hasn't expired.

## Prompt Examples

**Prompt:** 
```
List all active affiliates in my Referly account.
```

**Response:** 
```
I've retrieved your affiliates. You have 3 active partners: 'Main Agency', 'Tech Reviewer' (ID: 991), and 'Vinkius Affiliate'. Which one would you like to see conversions for?
```

**Prompt:** 
```
Show me the performance of all active referral programs with conversion rates this month.
```

**Response:** 
```
4 active referral programs. "Customer Ambassador" leads with 234 referrals and 18% conversion (42 new paying customers). Revenue attributed: $12,600. "Partner Affiliate" generated 156 referrals with 24% conversion and $8,900 in commissions paid. "Employee Referral" submitted 12 candidates, 4 hired (33% success rate). "Influencer Program" produced 890 clicks and 34 signups. Total referral-driven revenue: $28,400. Top referrer: Sarah Chen with 23 successful conversions earning $1,380.
```

**Prompt:** 
```
Create a new referral campaign offering $50 credit for each successful customer referral.
```

**Response:** 
```
Referral campaign created: "Refer & Earn $50". Reward: $50 account credit per successful referral. Qualification: referred user must complete signup and make first purchase. Double-sided: referrer gets $50, referred friend gets $25. Tracking link generated for each participant. Email notification template configured. Landing page created with shareable social media buttons. Campaign status: Active. Budget cap: $5,000 (100 referrals).
```

## Capabilities

### Manage Affiliate Accounts
List all current partners, get specific details for one affiliate, or add a new partner profile.

### Track Conversions and Performance
Get real-time analytics summaries, list raw referral events, or log a new conversion to measure campaign success.

### Automate Workflows
Trigger pre-built automation jobs (like welcome sequences) and check their status without logging into the Referly dashboard.

### Validate Marketing Assets
Check if a discount code is active or list all available coupon codes for marketing teams.

## Use Cases

### The Quarterly Performance Review
A Growth Marketing Manager needs to report on total revenue. They first run `get_referral_analytics` to get the high-level numbers, then they use `list_affiliates` to identify which top partners drove the most sales, and finally, they pull specific data for a key partner using `get_affiliate_details` to build out their presentation slides. The whole process stays in one chat window.

### Fixing a Broken Funnel
The Operations Specialist notices conversion rates dropped suddenly. They first check the automation status with `get_workflow_status`. If it shows 'failed,' they use `trigger_workflow` to kick the process back on, then run `list_referrals` to see if any events were logged *before* the failure point.

### Rapid Campaign Setup
The Partnership Manager needs a new partner added immediately. They use `create_affiliate`, which handles the profile creation and necessary initial steps, saving them logging into the web portal. Next, they confirm the system is ready by running `list_coupons` to see what existing offers are available.

### Analyzing Campaign Failure Points
A marketer suspects a promo code might be expired or mistyped. Before wasting time on a full report, they run `validate_coupon`. If that fails, they then use `list_coupons` to see the master list and confirm the correct active codes.

## Benefits

- Get the full picture with `get_referral_analytics`. Instead of piecing together monthly reports from three different dashboards, you ask for a summary, and it delivers revenue totals, conversion rates, and top performers instantly.
- Automate partner growth using `create_affiliate` and `list_affiliates`. You can onboard new affiliates in the conversation—no need to jump into the web portal just to create a profile. It’s faster and keeps your workflow continuous.
- Keep campaigns running by checking status with `get_workflow_status` or manually restarting them using `trigger_workflow`. If an automation fails overnight, you don't waste time debugging where it broke; you just ask the agent to check its state.
- Ensure marketing material works before launch. Use `validate_coupon` right in your chat session to test if a promo code is active and valid without needing a separate testing environment or dedicated form.
- Never lose a conversion record again. By using `track_referral_event`, you can log specific sign-ups or sales that might have been missed by automated systems, ensuring the data integrity for your reports.

## How It Works

The bottom line is you run complex, multi-step marketing queries using natural language instead of clicking through five different web dashboards.

1. Subscribe to the server and enter your Referly Tenant ID and API Key from your dashboard at referly.so.
2. Ask your AI client a question—for example, 'Show me performance for last month' or 'List all active coupons'.
3. The AI executes the appropriate tool (like `get_referral_analytics` or `list_coupons`) and delivers the requested data summary directly into the chat.

## Frequently Asked Questions

**How do I list all active partners using `list_affiliates`?**
Just ask the agent: 'List all affiliates.' The tool pulls a roster of every managed partner, giving you their names and IDs without you having to navigate away from your chat.

**Can I check if a coupon is valid before telling clients? Use `validate_coupon`.**
Yes. Simply prompt the agent with: 'Validate this code for me.' The `validate_coupon` tool confirms if the discount code exists and is active right now, preventing embarrassing errors during launch.

**What's the difference between `list_referrals` and `get_referral_analytics`?**
`get_referral_analytics` gives you a summarized report (e.g., total revenue, top 3 performers). However, `list_referrals` pulls the raw event log—it shows *every single* conversion entry, which is better for deep debugging.

**How do I add a new partner using `create_affiliate`?**
You ask your agent to create them and provide the required name and email. The tool runs the creation process immediately, so you don't have to manually fill out forms in the web portal.

**How do I manually start an automation process using `trigger_workflow`?**
You pass the specific workflow ID to `trigger_workflow`. The server immediately begins the defined sequence of actions. Use this when you need a manual intervention—like launching a campaign—before the standard scheduled jobs run.

**What information can I retrieve about one specific partner using `get_affiliate_details`?**
It pulls comprehensive data for that affiliate ID, including their join date, total conversions, and recent performance metrics. This is faster than sifting through the full list of all partners.

**What parameters are required when I use `track_referral_event`?**
You must provide the unique referral code, the conversion timestamp, and the source ID. The server registers this event immediately against your account metrics.

**Is running `get_current_user` necessary to ensure my connection is authenticated?**
Yes. Running `get_current_user` confirms that the API key and tenant ID are correctly loaded and active. It returns your profile data, validating system connectivity before you run other tools.

**Can my AI automatically find if a specific discount code is valid in Referly?**
Yes! Use the `validate_coupon` tool. Provide the promo code, and your agent will return its eligibility status and technical metadata instantly.

**How do I find my Referly Tenant ID and API Key?**
Log in to your Referly dashboard at referly.so, navigate to **Settings** > **API Keys**, and you will find your unique Tenant ID and secret API key there.