Agent Driven Email Campaigns
Agent driven email campaigns hand the busywork of variant generation, testing, and analysis to an AI agent. marginal is a hosted email MCP server that gives your agent the tools to draft subject lines, launch experiments, and act on real lift metrics — all from inside your editor or assistant.
What makes a campaign agent driven
Traditional email marketing means a person clicks through a UI to write copy, set up a split test, wait, then read a dashboard. An agent driven workflow collapses those steps: your AI agent calls tools directly, so the loop from idea to optimized send happens in one conversation.
marginal exposes four MCP tools that map to that loop. Your agent uses them sequentially, with each result feeding the next decision.
- generate_variants — produce candidate subject lines for a campaign
- launch_test — start a managed subject line A/B test
- get_results — read opens, clicks, and within-test lift metrics
- recommend_next — get the agent's suggested follow-up action
Why marginal fits AI agent email marketing
marginal is a hosted email MCP server — there is nothing to deploy or self-host. You connect an MCP-capable client, authenticate with a Bearer API key, and your agent can immediately generate copy and run experiments.
Because sends and tracking are managed for you, the agent gets clean, structured feedback instead of raw provider logs. That tight signal is what lets an AI agent actually improve campaigns over time rather than just sending once.
- Hosted endpoint at https://marginal.sh/mcp — no infrastructure to run
- Managed sends with open and click tracking built in
- Subject line A/B test results returned as lift metrics the agent can reason over
- Free tier of 100 experiments per month to prototype your workflow
Connecting your agent
marginal works with the MCP clients developers already use, so adopting agent driven email campaigns doesn't mean changing tools. Point your client at the marginal endpoint, add your marg_live_ key, and the four tools become available to the model.
Supported clients include Cursor, OpenAI Codex, Claude Desktop, Claude Code, Windsurf, Cline, Continue, and Zed.
- Authenticate with a Bearer API key (marg_live_...)
- Registry identifier: sh.marginal/mcp
- Full tool reference in the docs at https://marginal.sh/docs/
A practical optimization loop
Once connected, ask your agent to draft and test a campaign in plain language. It can call generate_variants to brainstorm subject lines, launch_test to run a subject line A/B test against your audience, and get_results to read which variant earned more opens and clicks.
From there, recommend_next closes the loop: the agent reviews the within-test lift and proposes the strongest variant or a new round of experiments. This is the core of AI agent email marketing — measurable iteration without leaving your assistant.
- Describe the campaign goal and let the agent generate variants
- Launch a managed subject line A/B test in one step
- Read lift metrics and let the agent recommend the winner or next test
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