Testing Referral Program Subject Lines in Cursor
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.
- Draft referral subject lines and edit them inline alongside your code
- Kick off a subject line A/B test with a single agent instruction
- Pull open and click data back into Cursor for review
- Iterate on the next round based on real within-test lift
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.
- Registry id: sh.marginal/mcp
- Endpoint: https://marginal.sh/mcp
- Auth: Bearer API key (marg_live_...)
- Free tier covers 100 experiments/month
{
"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:
- generate_variants — produce several distinct referral subject lines to compare
- launch_test — start a managed send and split your list across variants
- get_results — read open rate, click rate, and within-test lift metrics
- recommend_next — let marginal suggest a follow-up variant or declare a winner
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.
- Lead with the dollar value or perk where it fits your brand
- Test reward-forward copy against social-proof copy in one round
- Keep variants meaningfully different so lift signals are clear
- Use recommend_next to compound learnings across referral sends
- Check the docs at https://marginal.sh/docs/ for tool parameters
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.
- 100 experiments/month on the free tier
- Four MCP tools: generate_variants, launch_test, get_results, recommend_next
- Listed in the MCP Registry as sh.marginal/mcp