← All guides marginal.sh

Subject Line Multivariate Test API

Updated June 2026 · Hosted email MCP server

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.

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_...).

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.

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.

Documentation · Sign up · FAQ