Back in Stock Subject Line Tests in Zed
Wire marginal's email MCP server into Zed and let your AI agent draft, launch, and measure back in stock subject line tests without leaving the editor.
Why back in stock emails need a subject line test
Back in stock alerts hit inboxes when intent is already high — a shopper asked to be notified, then waited. That makes the subject line the deciding factor between a fast reopen and a missed sale. Small wording shifts (urgency, product name, scarcity) move open rates more here than in almost any other lifecycle email.
Running a structured subject line A/B test removes the guesswork. Instead of shipping one line and hoping, you put two or three framings in front of real recipients and let measured lift pick the winner.
- Urgency framing: "It's back — and going fast"
- Product-specific: "{Product} is back in stock"
- Scarcity: "Limited restock: grab it before it's gone"
- Personal nudge: "The item you wanted is available again"
Using Zed with the marginal email MCP server
Zed supports MCP, so you can connect it to marginal at https://marginal.sh/mcp and drive campaigns through chat-style prompts in your workflow. marginal is hosted — there's no self-hosted server to run and no Mailchimp or Klaviyo keys to wire up. You authenticate with a Bearer API key (marg_live_...) and start calling tools.
From Zed you ask your AI agent to handle the whole loop: generate candidate subject lines, launch the test, and report back when results are in. The four tools that power this are generate_variants, launch_test, get_results, and recommend_next.
- generate_variants — draft back in stock subject line options
- launch_test — send the A/B test to your audience
- get_results — pull open/click tracking and within-test lift
- recommend_next — get a data-backed next move
A back in stock workflow in Zed
A typical prompt sequence keeps you in flow. Ask the agent to generate four back in stock subject lines emphasizing urgency and product name, then have it launch the test as a managed send. Once opens accumulate, request results and let recommend_next suggest the winner or a follow-up variant.
- "Generate 4 back in stock subject lines for the {Product} restock."
- "Launch a subject line A/B test with these variants."
- "Show me open and click results with lift so far."
- "Recommend the next subject line to test."
What you get from AI agent email marketing here
Pairing Zed with marginal turns subject line testing into a repeatable, agent-driven loop rather than a manual spreadsheet exercise. Open and click tracking plus within-test lift metrics tell you which line actually won, so your next restock email starts from evidence.
The free tier covers 100 experiments per month, which is plenty to test subject lines across multiple restock campaigns. See the docs at https://marginal.sh/docs/ for tool schemas and setup details.
- Measured lift instead of guesses on every restock send
- Reusable prompt flow for future back in stock alerts
- No infrastructure to manage — marginal is fully hosted
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