← All guides marginal.sh

Testing Referral Program Subject Lines in Cursor

Updated June 2026 · Hosted email MCP server

Referral campaigns live or die on the open. With marginal's email MCP server connected to Cursor, you can draft, test, and launch referral program subject lines without leaving your editor — letting an AI agent handle the experiment plumbing while you focus on the offer.

Why run referral subject line tests from Cursor?

Cursor is where you already write code and prompts, so it's a natural place to run a subject line test for your referral program. Instead of context-switching to a separate dashboard, you ask the agent in Cursor to generate variants and launch them through marginal.

marginal exposes four MCP tools — generate_variants, launch_test, get_results, and recommend_next — that map cleanly to the lifecycle of a referral campaign. The agent calls them on your behalf, and you stay in the loop reviewing copy and metrics.

Connect marginal to Cursor

Add marginal as an MCP server in Cursor using the hosted endpoint at https://marginal.sh/mcp and a Bearer API key that starts with marg_live_. Because marginal is fully hosted, there's nothing to deploy or self-manage — point Cursor at the endpoint and you're ready to run experiments.

{
  "mcpServers": {
    "marginal": {
      "url": "https://marginal.sh/mcp",
      "headers": {
        "Authorization": "Bearer marg_live_your_key_here"
      }
    }
  }
}

A workflow for referral program subject lines

Once connected, describe your referral offer to the agent in Cursor — for example, "Give a friend $20, get $20." Ask it to generate a set of subject line variants and the AI agent email marketing flow takes over from there.

A typical loop looks like this, with each step backed by a marginal MCP tool:

Tips for stronger referral subject lines

Referral subject lines reward clarity about the reward and a sense of reciprocity. When you ask Cursor to generate variants, give the agent guardrails so the subject line A/B test isolates one idea at a time.

Get started with marginal

marginal is a hosted email marketing MCP server at marginal.sh. Sign up free, create an API key, and connect https://marginal.sh/mcp from Cursor, Codex, or Claude Desktop.

Documentation · Sign up · FAQ