← All guides marginal.sh

Subject Line A/B Testing in Windsurf

Updated June 2026 · Hosted email MCP server

Connect Windsurf to marginal's hosted email MCP server and run a full subject line A/B test from inside your agent workflow — generate variants, launch the send, and pull open and click lift without switching tools.

Why run subject line A/B tests from Windsurf

Windsurf's agentic workflow is well suited to iterative tasks, and a subject line A/B test is exactly that: draft candidates, ship them, measure, and decide what to send next. By wiring marginal in as an email MCP server, the whole loop happens through tool calls your Windsurf agent already understands.

marginal is hosted, so there's no infrastructure to stand up. You add the endpoint, supply a Bearer API key, and the agent gets four tools for the entire test lifecycle.

Connect marginal to Windsurf

Add marginal as an MCP server in Windsurf using the hosted endpoint at https://marginal.sh/mcp and your API key (it starts with marg_live_). Once registered, Windsurf can call the marginal tools during any agent run.

The full tool reference and setup steps live in the docs at https://marginal.sh/docs/. The same configuration works across other clients too, so a flow you build in Windsurf transfers cleanly.

A subject line A/B test, end to end

Inside a Windsurf agent workflow, a subject line A/B test maps directly onto marginal's tools. Describe the campaign, let the agent draft candidates, launch the split send, and come back for results once data accumulates.

Because marginal tracks opens and clicks and computes within-test lift, the agent doesn't have to do the statistics by hand — it reads the metrics and acts on them.

Tips for reliable AI agent email marketing

AI agent email marketing works best when the agent has clear constraints. Give Windsurf a tight brief for the subject line A/B test so generated variants stay on-brand and test a real hypothesis rather than random phrasings.

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