← All guides marginal.sh

Testing Referral Program Subject Lines in Windsurf

Updated June 2026 · Hosted email MCP server

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.

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.

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.

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/.

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