Headless Email Marketing for AI Agents
Headless email marketing decouples the campaign logic from a dashboard, so your code or AI agent can generate, test, and send email without clicking through a UI. marginal exposes that workflow as a hosted MCP server.
What headless email marketing means here
In a headless setup, there's no required front end. Your agent calls tools, marginal handles the managed sends, and the results come back as structured data you can act on programmatically.
marginal is a hosted email MCP server — you connect over https://marginal.sh/mcp with a Bearer API key (marg_live_...). There's nothing to self-host.
- generate_variants — draft subject line and body options
- launch_test — start a subject line A/B test with a managed send
- get_results — pull open/click tracking and within-test lift
- recommend_next — get a data-backed suggestion for the next step
Why an MCP server fits this pattern
Headless workflows need a clean, machine-readable contract. The Model Context Protocol gives your AI agent typed tools instead of brittle screen scraping or one-off scripts wired to a marketing UI.
Because the email MCP server lives behind a single endpoint, the same tools work from Cursor, Claude Code, Codex, Windsurf, Cline, Continue, or Zed without rewriting integration code per environment.
A typical subject line A/B test loop
AI agent email marketing usually runs as a tight loop: produce candidates, test a meaningful split, then read the numbers and decide what to do next.
- Call generate_variants to produce two or more subject lines
- launch_test to send them and split your audience
- Wait for engagement, then get_results for open/click and lift
- recommend_next to promote a winner or iterate again
Getting started
The free tier includes 100 experiments per month, enough to validate a headless email marketing pipeline before scaling up. Add the marginal endpoint to your MCP client, set your API key, and let the agent drive.
Full tool schemas and examples are in the docs at 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