Testing Newsletter Subject Lines in Zed
Zed's agent can do more than write code. Wire it up to marginal's email MCP server and your editor becomes a place to draft, test, and optimize newsletter subject lines—generating variants, launching an A/B test, and reading results inline.
Why run subject line tests from Zed
If you already live in Zed, context-switching to a separate marketing dashboard breaks your flow. By connecting marginal as an MCP server, the AI agent in Zed can call the same tools that power a managed subject line A/B test—directly from a conversation alongside your project.
This is especially handy when your newsletter content lives in a repo: Markdown drafts, changelog notes, or release announcements. Ask the agent to read the draft and propose subject lines that match the tone.
- No new tab, no copy-paste between tools
- The agent has your draft context when generating variants
- Same hosted infrastructure—nothing to self-host
The marginal tools you'll use
marginal exposes four MCP tools that cover the full subject line test loop. In Zed you invoke them through natural language, and the agent maps your intent to the right call.
- generate_variants — draft candidate newsletter subject lines from a prompt or brief
- launch_test — start a subject line A/B test with a managed send
- get_results — pull open and click tracking plus within-test lift
- recommend_next — get a data-backed suggestion for the next iteration
A typical newsletter workflow
Here's how AI agent email marketing looks in practice inside Zed. You point the agent at your newsletter draft, ask for subject line options, and let marginal handle the experiment.
Because marginal is hosted, the test runs and tracking continue independent of your editor session—you can close Zed and check back later for results.
- Ask Zed to generate 5 subject lines for this week's newsletter
- Launch the A/B test against your list segment
- Wait for opens and clicks to accumulate
- Read the lift metrics and ask for the next recommended variant
Getting connected
Add marginal to Zed's MCP configuration using the endpoint https://marginal.sh/mcp and a Bearer API key (the marg_live_ prefix). The free tier covers 100 experiments per month, which is plenty for a regular newsletter cadence and ongoing subject line tests.
Full setup steps and tool schemas are in the docs at https://marginal.sh/docs/. Once authenticated, the agent in Zed can call any of the four tools on demand.
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