Subject Line Multivariate Test API
A subject line multivariate test API lets you compare several subject lines in a single experiment and let real engagement decide the winner. marginal exposes this through an email MCP server, so an AI agent can spin up tests, send them, and read results without you wiring up a dashboard.
Multivariate vs. a simple subject line A/B test
A classic subject line A/B test pits two options against each other. A multivariate test extends that idea: you compare three, four, or more variants at once and let the data surface which one actually drives opens and clicks. That matters when you have several distinct angles — urgency, curiosity, personalization — and don't want to run sequential tests for weeks.
With marginal you describe the test once and the platform handles allocation, sending, and tracking. You get within-test lift metrics that show how each variant performed relative to the others, so the comparison is apples-to-apples on the same audience and timeframe.
- Compare many subject lines in one experiment, not just two
- Open and click tracking attached to every variant
- Within-test lift metrics for ranking variants fairly
- Free tier covers 100 experiments per month
The MCP tools behind the API
marginal is a hosted email MCP server. Instead of a REST SDK, you call a small set of MCP tools that your agent invokes during a conversation or workflow. The endpoint is https://marginal.sh/mcp and authentication is a single Bearer API key (marg_live_...).
- generate_variants — produce candidate subject lines to test
- launch_test — start a multivariate or A/B test and begin sending
- get_results — pull open/click and lift data per variant
- recommend_next — get a data-backed suggestion for the next step
Driving tests from an AI agent
AI agent email marketing works best when the agent can close the loop: draft variants, run the experiment, and act on results. Because marginal speaks MCP, agents in Cursor, Claude Desktop, Claude Code, Windsurf, Cline, Continue, Zed, and OpenAI Codex can all call the same tools.
A typical flow: the agent calls generate_variants for a campaign theme, launch_test to send the multivariate test, then get_results once engagement data lands. recommend_next then advises whether to declare a winner or iterate on a fresh angle.
Getting accurate, comparable results
Subject line testing is only useful if the numbers are trustworthy. marginal sends each variant to a slice of the same list and tracks opens and clicks consistently, so lift reflects subject line performance rather than timing or audience differences.
Read the full tool reference and example payloads in the docs at https://marginal.sh/docs/ before wiring the subject line multivariate test API into a production workflow.
- Hosted — no self-hosted server to maintain
- Same-audience, same-window comparisons
- Lift metrics that map directly to your variants
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