Testing Referral Program Subject Lines in Windsurf
Referral campaigns live or die on the open. With marginal connected as an MCP server in Windsurf, you can draft, launch, and measure referral program subject lines without leaving your editor or wiring up a separate dashboard.
Why subject line tests matter for referral emails
Referral programs ask a lot of your audience: forward this, share that, invite a friend. If the subject line doesn't earn the open, the incentive inside never gets seen. That makes the subject line the highest-leverage variable in the whole campaign.
A structured subject line A/B test removes the guesswork. Instead of debating whether to lead with the reward, the friend's benefit, or social proof, you ship variants and let real opens and clicks settle it.
- Reward-forward: "Give $20, get $20"
- Curiosity-forward: "Your friends are missing out"
- Social proof: "Join 12,000 members who referred a friend"
- Urgency: "Your referral bonus expires Friday"
Connecting marginal to Windsurf
marginal is a hosted email MCP server, so there's nothing to deploy. Once it's registered as an MCP client in Windsurf, the AI agent can call marginal's tools directly while you work through your referral campaign.
You authenticate with a Bearer API key (marg_live_...) against the endpoint at https://marginal.sh/mcp. From there, the four tools cover the full loop of running a referral program subject line test.
- generate_variants — produce candidate referral subject lines
- launch_test — start a managed subject line A/B test
- get_results — pull opens, clicks, and within-test lift
- recommend_next — get a data-backed pick for the next send
An AI agent email marketing workflow for referrals
Inside Windsurf, you can prompt the agent in plain language: describe your referral offer, audience, and tone, then let it call generate_variants for a spread of subject lines. Review the options, then have it launch the test against your list.
Because marginal handles managed sends and open/click tracking, you don't stitch together a separate ESP integration to read results. The agent calls get_results to surface within-test lift metrics, and recommend_next tells you which variant to roll out to the rest of your referral audience.
- Keep the reward and the share mechanic constant across variants
- Test one idea at a time so lift is attributable
- Let recommend_next guide your follow-up reminder send
Getting started
The free tier includes 100 experiments per month, which is plenty to validate referral subject lines across a few segments before committing to a winner. Each experiment is a self-contained subject line A/B test with its own tracking.
Point Windsurf at the marginal MCP endpoint, add your API key, and ask the agent to draft your first batch of referral program subject lines. Full setup details and tool references are in the docs at https://marginal.sh/docs/.
- Endpoint: https://marginal.sh/mcp
- Free tier: 100 experiments/month
- Works with Windsurf and other MCP clients
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