io.github.refgrow/mcp

السجل الرسمي الذكاء الاصطناعي والوكلاء

Model Context Protocol server for Refgrow affiliate program management API

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package @refgrow/mcp
Claude Code
claude mcp add io-github-refgrow-mcp -e 'REFGROW_API_KEY=<your refgrow_api_key>' -e 'REFGROW_API_URL=<REFGROW_API_URL>' -- npx -y @refgrow/mcp@1.3.0
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "io-github-refgrow-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@refgrow/mcp@1.3.0"
            ],
            "env": {
                "REFGROW_API_KEY": "<your refgrow_api_key>",
                "REFGROW_API_URL": "<REFGROW_API_URL>"
            }
        }
    }
}

متغيرات البيئة

  • REFGROW_API_KEY إلزامي سري Your Refgrow API key (starts with rgk_)
  • REFGROW_API_URL Refgrow API base URL

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. @refgrow/mcp
  2. Prerequisites
  3. Installation
  4. Configuration
  5. Usage with Claude Desktop
  6. Usage with Cursor
  7. Usage with Claude Code
  8. Available Tools
  9. Example Conversations
  10. Development
  11. Documentation
  12. License

@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/mcp

Or clone and build from source:

git clone https://github.com/refgrow/refgrow-mcp.git
cd refgrow-mcp
npm install
npm run build

Configuration

The server requires two environment variables:

VariableRequiredDefaultDescription
REFGROW_API_KEYYes--Your Refgrow API key (starts with rgk_)
REFGROW_API_URLNohttps://refgrow.comBase URL of your Refgrow instance
Getting an API Key
  1. Log in to Refgrow
  2. Go to your project settings
  3. Scroll to the API Keys section
  4. Click Generate API Key
  5. 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/mcp
  • Environment: 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
ToolDescription
list_affiliatesList all affiliates with stats (clicks, signups, purchases, earnings)
get_affiliate_detailsGet details for a specific affiliate by email
create_affiliateCreate a new affiliate with optional custom referral code
update_affiliateUpdate affiliate email, referral code, status, or partner slug
delete_affiliateRemove an affiliate from the project
Referrals
ToolDescription
list_referralsList referred users, filterable by affiliate or status
get_referral_detailsGet details for a specific referred user by email
create_referralManually create a referred user record
Conversions
ToolDescription
list_conversionsList conversions with filters for type, affiliate, date range, paid status
get_conversionGet a specific conversion by ID
create_conversionCreate a conversion (signup/purchase) with auto-commission calculation
update_conversionUpdate conversion details or mark as paid
delete_conversionDelete a conversion record
Coupons
ToolDescription
list_couponsList coupon codes with affiliate info
get_couponGet a specific coupon by ID
create_couponCreate a coupon linked to an affiliate (with optional Stripe/LemonSqueezy IDs)
update_couponUpdate coupon details
delete_couponDelete 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 start

Documentation

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

الأسئلة الشائعة

ما هو io.github.refgrow/mcp؟

Model Context Protocol server for Refgrow affiliate program management API

كيف أثبّت io.github.refgrow/mcp؟

يعمل على جهازك. في Claude Code: claude mcp add io-github-refgrow-mcp -e 'REFGROW_API_KEY=<your refgrow_api_key>' -e 'REFGROW_API_URL=<REFGROW_API_URL>' -- npx -y @refgrow/mcp@1.3.0. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.refgrow/mcp إلى مفتاح API؟

نعم. يتطلب REFGROW_API_KEY، وتضبطها في إعداداته.

هل io.github.refgrow/mcp مفتوح المصدر؟

شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.

من يصون io.github.refgrow/mcp؟

ينشره refgrow. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.