Back in Stock Subject Line Tests in Windsurf
Restock emails are time-sensitive — the right subject line decides whether a customer returns before the item sells out again. This guide shows how to run back in stock subject lines in Windsurf with marginal, the hosted email MCP server, so your AI agent drafts, tests, and measures variants without leaving the editor.
Why test back in stock subject lines from Windsurf
Back in stock alerts compete with a crowded inbox, and small wording changes — urgency, product name, scarcity — produce real differences in open rate. Instead of guessing, you can drive a subject line A/B test through Windsurf's AI agent and let data choose the winner.
marginal exposes its tools over MCP, so the same agent that touches your codebase can also launch an email subject line test. No copy-paste between dashboards, no separate campaign tool to context-switch into.
- Restock emails have a tight conversion window — speed matters
- Subject line phrasing drives the open that everything else depends on
- Windsurf keeps the workflow inside your existing dev environment
Connecting marginal to Windsurf
marginal is a hosted email MCP server, so there's nothing to deploy or self-host. Point Windsurf at the https://marginal.sh/mcp endpoint and authenticate with your Bearer API key (a marg_live_ token). Once connected, the agent can call marginal's four tools directly.
The full client list includes Cursor, Claude Desktop, Claude Code, Cline, Continue, Zed, OpenAI Codex, and Windsurf — so the same setup pattern transfers if your team uses more than one.
- Registry: sh.marginal/mcp
- Endpoint: https://marginal.sh/mcp
- Auth: Bearer API key (marg_live_...)
- Setup details: https://marginal.sh/mcp and https://marginal.sh/docs/
Running the back in stock subject line test
Ask the Windsurf agent to draft restock variants, then launch a managed send and read results — all through marginal's MCP tools. A typical flow walks through generation, launch, and measurement in a single agent conversation.
- generate_variants — produce several back in stock subject lines, e.g. 'It's back: {product}' vs 'Restocked — grab it before it's gone'
- launch_test — start the subject line A/B test with a managed send to your list
- get_results — track opens, clicks, and within-test lift between variants
- recommend_next — get a data-backed suggestion for your next restock send
Tips for restock subject line variants
Back in stock messaging works best when it pairs the product name with a reason to act now. Test one variable at a time so the lift you measure is attributable to a clear change, and keep your free tier in mind — 100 experiments per month covers frequent restock testing.
Let the AI agent handle the repetitive scaffolding — variant copy, send setup, results parsing — while you decide which angles are worth testing. That's the point of AI agent email marketing: faster iteration without spreadsheets.
- Compare urgency ('almost gone') against plain availability ('it's back')
- Test personalization with the product name versus a generic restock line
- Hold list and timing constant so the subject line is the only variable
- Use recommend_next to compound learnings across restock campaigns
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