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_
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/refgrow/refgrow-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server