Refgrow MCP Server
Allows for the management of affiliate coupons that can be linked to Stripe, including automated synchronization and removal of coupons from Stripe when they are deleted.
@refgrow/mcp
A Model Context Protocol (MCP) server that wraps the Refgrow REST API. This allows AI agents -- Claude Desktop, Cursor, ChatGPT, and other MCP-compatible clients -- to manage your affiliate program directly.
Prerequisites
Node.js 18+
A Refgrow account with an API key (generated in project settings)
API keys start with
rgk_
Related MCP server: syndicate-links-mcp
Installation
npm install @refgrow/mcpOr clone and build from source:
git clone https://github.com/refgrow/refgrow-mcp.git
cd refgrow-mcp
npm install
npm run buildConfiguration
The server requires two environment variables:
Variable | Required | Default | Description |
| Yes | -- | Your Refgrow API key (starts with |
| No |
| Base URL of your Refgrow instance |
Getting an API Key
Log in to Refgrow
Go to your project settings
Scroll to the API Keys section
Click Generate API Key
Copy the key (it starts with
rgk_and is shown only once)
Usage with Claude Desktop
Add this to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"refgrow": {
"command": "npx",
"args": ["-y", "@refgrow/mcp"],
"env": {
"REFGROW_API_KEY": "rgk_your_api_key_here"
}
}
}
}Or if installed globally / from source:
{
"mcpServers": {
"refgrow": {
"command": "node",
"args": ["/path/to/packages/mcp-server/dist/index.js"],
"env": {
"REFGROW_API_KEY": "rgk_your_api_key_here"
}
}
}
}Usage with Cursor
In Cursor settings, add an MCP server with:
Name: refgrow
Command:
npx -y @refgrow/mcpEnvironment:
REFGROW_API_KEY=rgk_your_api_key_here
Or add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"refgrow": {
"command": "npx",
"args": ["-y", "@refgrow/mcp"],
"env": {
"REFGROW_API_KEY": "rgk_your_api_key_here"
}
}
}
}Usage with Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"refgrow": {
"command": "npx",
"args": ["-y", "@refgrow/mcp"],
"env": {
"REFGROW_API_KEY": "rgk_your_api_key_here"
}
}
}
}Available Tools
Affiliates
Tool | Description |
| List all affiliates with stats (clicks, signups, purchases, earnings) |
| Get details for a specific affiliate by email |
| Create a new affiliate with optional custom referral code |
| Update affiliate email, referral code, status, or partner slug |
| Remove an affiliate from the project |
Referrals
Tool | Description |
| List referred users, filterable by affiliate or status |
| Get details for a specific referred user by email |
| Manually create a referred user record |
Conversions
Tool | Description |
| List conversions with filters for type, affiliate, date range, paid status |
| Get a specific conversion by ID |
| Create a conversion (signup/purchase) with auto-commission calculation |
| Update conversion details or mark as paid |
| Delete a conversion record |
Coupons
Tool | Description |
| List coupon codes with affiliate info |
| Get a specific coupon by ID |
| Create a coupon linked to an affiliate (with optional Stripe/LemonSqueezy IDs) |
| Update coupon details |
| Delete a coupon (also removes from Stripe if linked) |
Example Conversations
Once connected, you can ask your AI agent things like:
"Show me all active affiliates and their earnings"
"Create a new affiliate for partner@example.com with referral code PARTNER2025"
"List all unpaid conversions from the last 30 days"
"How many signups did we get through affiliate referrals this month?"
"Create a coupon code SAVE20 linked to affiliate ID 42"
"Mark conversion #123 as paid"
"Deactivate the affiliate with email old-partner@example.com"
Development
# Install dependencies
npm install
# Build
npm run build
# Watch mode for development
npm run dev
# Run the server (requires REFGROW_API_KEY env var)
REFGROW_API_KEY=rgk_your_key npm startDocumentation
Full setup guide with examples and troubleshooting: https://refgrow.com/docs/mcp-server
REST API reference (for direct HTTP integration): https://refgrow.com/docs/api-reference
License
MIT
Available Tools
18 toolscreate_affiliateC
Create a new affiliate in your Refgrow project. An affiliate receives a unique referral code and can start referring customers.
Inputs: email (required), referral_code, partner_slug.
create_conversionB
Manually create a conversion (signup or purchase). For purchases, the commission is auto-calculated from project settings if value is not provided. You can identify the affiliate by ID or referral code.
Inputs: type (required), value, base_value, affiliate_id, +7 more.
create_couponB
Create a new coupon code linked to an affiliate. Optionally tie it to a Stripe coupon ID or LemonSqueezy discount code for automatic attribution.
Inputs: affiliate_id (required), coupon_code (required), stripe_coupon_id, lemonsqueezy_discount_code, +1 more.
create_referralC
Manually create a referred user record, optionally linking them to a specific affiliate.
Inputs: email (required), affiliate_id, status.
delete_affiliateB
Delete an affiliate from your project. This also removes their associated referral data.
Inputs: email (required).
delete_conversionC
Delete a conversion record by its ID.
Inputs: id (required).
delete_couponA
Delete a coupon by its ID. If linked to a Stripe coupon, it will also be deleted from Stripe.
Inputs: id (required).
get_affiliate_detailsC
Get detailed information about a specific affiliate by their email address, including click count, signups, purchases, and earnings.
Inputs: email (required).
get_conversionC
Get details for a specific conversion by its ID.
Inputs: id (required).
get_couponC
Get details for a specific coupon by its ID.
Inputs: id (required).
get_referral_detailsC
Get details for a specific referred user by their email address.
Inputs: email (required).
list_affiliatesA
List all affiliates in your Refgrow project with their stats (clicks, signups, purchases, earnings). Supports filtering by status and pagination.
Inputs: status, limit, offset.
list_conversionsA
List conversions (signups and purchases) tracked in your affiliate program. Filter by type, affiliate, date range, or paid status.
Inputs: type, affiliate_id, paid, from, +3 more.
list_couponsB
List coupon codes associated with affiliates in your project. Filter by status, affiliate, or coupon code search.
Inputs: status, affiliate_id, coupon_code, limit, +1 more.
list_referralsB
List referred users (signups tracked through affiliate links). Filter by affiliate or conversion status. Shows which affiliate referred each user.
Inputs: affiliate_id, status, limit, offset.
update_affiliateC
Update an existing affiliate's details such as email, referral code, status, or partner slug.
Inputs: email (required), new_email, referral_code, status, +1 more.
update_conversionB
Update a conversion's details. Commonly used to mark a conversion as paid or update its value.
Inputs: id (required), value, base_value, type, +4 more.
update_couponC
Update an existing coupon's code, linked affiliate, payment provider IDs, or status.
Inputs: id (required), affiliate_id, coupon_code, stripe_coupon_id, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Every tool has a clearly distinct purpose with no ambiguity. Each tool targets a specific resource (affiliate, conversion, coupon, referral) and action (create, delete, get, list, update), making it easy for an agent to select the correct one. For example, create_affiliate and update_affiliate are clearly differentiated by their actions on the same resource.
Tool names follow a highly consistent verb_noun pattern throughout, such as create_affiliate, list_conversions, and update_coupon. All tools use snake_case with clear verbs (create, delete, get, list, update) and nouns (affiliate, conversion, coupon, referral), making the set predictable and readable.
With 18 tools, the count is well-scoped for an affiliate management domain, covering CRUD operations for four core resources (affiliate, conversion, coupon, referral). Each tool earns its place by providing necessary functionality without redundancy, such as detailed get operations alongside list views.
The tool surface offers complete CRUD/lifecycle coverage for the affiliate management domain, with no obvious gaps. All four resources have create, get, list, update, and delete operations (except referrals, which lack update and delete, but this is reasonable as referrals are typically immutable records). This ensures agents can handle full workflows without dead ends.
Maintenance
Related MCP Connectors
Hosted MySQL MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted X Ads MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Hosted WooCommerce MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceAn MCP server that provides AI assistants with access to the FirstPromoter affiliate management platform for managing referrals, promoters, campaigns, and commissions. It is designed for remote multi-user deployment and supports operations via HTTP/SSE transport.-
- AlicenseAqualityAmaintenanceMCP server for AI agent affiliate attribution and commission tracking. 7 tools for program discovery, conversion tracking, attribution token verification, and commission queries.7MIT
- AlicenseAqualityCmaintenanceManages affiliate programs, analytics, incentives, and payouts through MCP-compatible clients.3931 npmMIT
- AlicenseAqualityDmaintenanceMCP server for managing Youfiliate Smart Links from AI assistants like Claude Desktop, enabling creation of geo-targeted affiliate links, analytics, and YouTube description migrations.18MIT