Reference
MCP server
Connect Claude Code, Cursor or any MCP client to your program.
https://referralmeter.com/api/mcp speaks the Model Context Protocol over Streamable HTTP (2025-06-18). Authenticate with a secret key as a Bearer token. A read-only key can use every read tool; tools that change something need the write scope. No tool moves money.
Claude Code
claude mcp add --transport http referralmeter https://referralmeter.com/api/mcp --header "Authorization: Bearer sk_…"Cursor
In .cursor/mcp.json (keep it out of git) or your global MCP settings:
{
"mcpServers": {
"referralmeter": {
"url": "https://referralmeter.com/api/mcp",
"headers": {
"Authorization": "Bearer sk_…"
}
}
}
}Other clients
Any client that supports remote HTTP servers with custom headers works: URL https://referralmeter.com/api/mcp, header Authorization: Bearer sk_…. The server is stateless and answers with application/json; there is no SSE stream.
Tools
| Tool | What it does | Needs |
|---|---|---|
get_program | The affiliate program this key belongs to: name, public key (pk_…), portal URL, currency and commission rules. | read |
get_install_instructions | Exact, numbered steps to install Referralmeter tracking in the user's app for this program (its real public key), for the given framework and billing provider: script tag, signup call, checkout metadata, webhook setup, then verification. Follow them, then call start_verification. | read |
start_verification | Starts (or resumes) an install verification and returns a testLink. Ask the user to open it in a fresh browser window, sign up with a new account and pay in test mode; then poll get_verification until status is passed. Test traffic is never paid out. | write |
get_verification | Status of an install verification: each step with its time, what to do next, and diagnostics from the program's data. Omit id for the latest run. | read |
list_affiliates | Affiliates, newest first, with clicks, paying customers and earnings. Filter by status or search by name, email or code. | read |
get_affiliate | One affiliate by id. | read |
approve_affiliate | Approves a pending affiliate so their link starts earning commission. | write |
reject_affiliate | Rejects an affiliate (or bans one with ban=true). Their link stops earning commission. Confirm with the user first. | write |
update_commission_rules | Changes the program's commission rules (rate, duration, hold period, minimum payout…). Applies to commissions earned from now on. Show the user the change and get their OK before calling. | write |
list_commissions | Commissions newest first; filter by status, affiliate_id or since (ISO date). Amounts are integer cents. | read |
get_stats | Live program numbers for the last N days (default 30): referred revenue, commissions owed, clicks, signups, customers, activated affiliates, customers from AI assistants. | read |
list_payouts_due | What the program owes each affiliate right now. Read-only: payouts are created and marked paid by the owner in the dashboard; no tool can send or mark money. | read |
Write tools are annotated so clients ask before running them; reject_affiliate and update_commission_rules are marked destructive.
Try it
Ask your agent: "Install Referralmeter in this app and verify it." It calls get_install_instructions with your framework and billing provider, makes the changes, then start_verification and get_verification until the run passes.