Subject Line A/B Testing in Zed
Zed's AI agent can drive a full subject line A/B test end to end when you connect it to marginal, a hosted email marketing MCP server. This guide walks through wiring up the connection and running experiments from inside your Zed workflow.
Why run subject line A/B tests from Zed
Zed is fast and increasingly capable as an AI agent host, which makes it a natural place to manage email experiments alongside code. Instead of switching to a separate marketing dashboard, you describe the test you want and let the Zed agent workflow call marginal's tools directly.
marginal handles the heavy lifting — variant generation, managed sends, and open/click tracking — so the agent only has to orchestrate. That keeps subject line A/B testing in Zed conversational and repeatable.
- Stay in one window: prompt, review, and launch without context switching.
- Let the AI agent draft and compare subject line variants on demand.
- Pull within-test lift metrics back into your editor for quick decisions.
Connect marginal to Zed
marginal is a hosted email MCP server, so there's nothing to self-host. Add it to Zed's MCP configuration with the marginal endpoint and your Bearer API key, then restart the agent so it discovers the available tools.
- Endpoint: https://marginal.sh/mcp
- Auth: Bearer API key in the marg_live_... format
- Registry name: sh.marginal/mcp
- Full setup details: https://marginal.sh/mcp
Run a subject line A/B test
Once connected, the Zed agent exposes marginal's four tools. A typical subject line A/B test flows through them in order, and you can prompt the agent in plain language at each step.
For example: "Generate five subject line variants for our spring sale, launch a test to the newsletter segment, and report back the results." The agent calls each tool and surfaces the data inline.
- generate_variants — produce candidate subject lines from your brief.
- launch_test — send the variants as a managed A/B test.
- get_results — fetch opens, clicks, and within-test lift.
- recommend_next — get a data-backed suggestion for the next iteration.
Tips for AI agent email marketing in Zed
AI agent email marketing works best when you give the agent clear context: audience, tone, and what success looks like. The more specific your prompt, the sharper the variants marginal generates.
- Start on the free tier — 100 experiments per month, no credit card friction.
- Ask the agent to summarize lift before declaring a winner.
- Chain recommend_next into a follow-up test to keep iterating.
- Reference the docs at https://marginal.sh/docs/ for tool parameters.
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