Make Your AI Agent Send Email With Real A/B Testing
If you want an AI agent to send email that actually performs, you need more than a raw SMTP call. marginal is a hosted email marketing MCP server that gives your agent tools to draft subject variants, launch managed sends, and measure which version wins.
Why route sends through an email MCP server
An agent calling a generic mail API can fire a message, but it can't tell you whether the subject line worked. marginal closes that loop. By connecting your agent to the email MCP server at https://marginal.sh/mcp, every send becomes a structured experiment your agent can reason about.
Because marginal is fully hosted, there is nothing to deploy. Your agent authenticates with a Bearer API key (marg_live_...) and gets immediate access to managed sends with built-in open and click tracking.
- No self-hosted infrastructure — connect and send
- Open/click tracking captured automatically per variant
- Within-test lift metrics so the agent knows the winner
- Free tier covers 100 experiments per month
The four tools your agent uses to send email
marginal exposes a small, composable set of MCP tools. An AI agent send email workflow typically chains all four in sequence, turning a vague instruction like 'email our list about the launch' into a measured campaign.
- generate_variants — produce candidate subject lines and copy
- launch_test — start a subject line A/B test with a managed send
- get_results — pull open/click rates and lift per variant
- recommend_next — get the suggested winner or follow-up action
A typical subject line A/B test run
Here's how an agent moves from prompt to insight. The agent generates several subject options, launches a split test against a slice of your audience, waits for engagement to accumulate, then reads the within-test lift to pick a winner.
This pattern is what makes AI agent email marketing repeatable rather than guesswork. Instead of shipping one subject and hoping, the agent treats each campaign as a small experiment and learns from the result before the full send.
- Agent calls generate_variants for 3–5 subject lines
- launch_test sends each variant to a test segment
- get_results returns opens, clicks, and lift
- recommend_next surfaces the winner to roll out broadly
Works with the agents you already use
marginal speaks the Model Context Protocol, so any MCP-capable client can drive it. Configure the endpoint once and your assistant can send email, test subjects, and report back inline.
Supported clients include Cursor, OpenAI Codex, Claude Desktop, Claude Code, Windsurf, Cline, Continue, and Zed. See the docs at https://marginal.sh/docs/ for setup details for each client.
- Registry: sh.marginal/mcp
- Endpoint: https://marginal.sh/mcp
- Auth: Bearer API key (marg_live_...)
- Docs and per-client guides: https://marginal.sh/docs/
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