Test Newsletter Subject Lines in Windsurf
Connect marginal to Windsurf and let your AI agent draft, launch, and measure newsletter subject line tests without leaving your editor. This guide shows how to wire up the email MCP server and run a real subject line A/B test for your next send.
Why run subject line tests inside Windsurf
Windsurf already understands your project context, so it's a natural place to iterate on newsletter copy. With marginal connected as an MCP server, the same agent that helps you ship code can generate subject line variants, launch a test, and report back which one wins.
You skip the usual context switching between editor, ESP dashboard, and spreadsheets. The whole loop — write, send, measure — happens through the AI agent email marketing tools exposed by marginal.
- Draft newsletter subject lines alongside the content you're already editing
- Launch a subject line A/B test from a single chat prompt
- Pull open and click metrics back into Windsurf for review
- Keep your free tier of 100 experiments/month for ongoing tests
Connecting marginal to Windsurf
Add marginal as an MCP server in Windsurf and authenticate with your Bearer API key (it starts with marg_live_). marginal is hosted, so there's nothing to self-host — Windsurf talks directly to the endpoint at https://marginal.sh/mcp.
Once connected, the four marginal tools become available to your agent: generate_variants, launch_test, get_results, and recommend_next. Full setup details live in the docs at https://marginal.sh/docs/.
- Registry: sh.marginal/mcp
- Endpoint: https://marginal.sh/mcp
- Auth: Bearer API key (marg_live_...)
- Tools: generate_variants, launch_test, get_results, recommend_next
Running a newsletter subject line A/B test
Start by asking Windsurf to call generate_variants with the angle of your newsletter — for example a product roundup or a weekly digest. The agent returns a set of candidate subject lines you can refine in chat.
When you're happy, have the agent call launch_test to ship the managed send. marginal handles delivery and open/click tracking. After it runs, get_results gives you within-test lift so you know which subject line moved opens, and recommend_next suggests where to take the following send.
- Generate subject line variants tailored to this newsletter issue
- Launch the subject line A/B test as a managed send
- Track opens and clicks with within-test lift metrics
- Use recommend_next to plan your next newsletter test
Tips for better newsletter tests
Keep each subject line test focused on one variable — tone, length, or a specific hook — so the lift you measure in Windsurf is interpretable. Vague tests produce vague winners.
Treat results as a feed for your next issue rather than a one-off. Logging which angles consistently win helps your AI agent propose stronger newsletter subject lines over time.
- Test one idea per subject line A/B test for clean signal
- Give marginal a clear audience and topic in your prompt
- Let lift metrics, not gut feel, pick the winner
- Carry learnings forward with recommend_next each send
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