← All guides marginal.sh

Bayesian Email Subject Line Testing for AI Agents

Updated June 2026 · Hosted email MCP server

A bayesian email subject line test answers the question that matters most: which variant is most likely to win, given the opens and clicks you've collected so far? marginal lets your AI agent run that loop end to end through an email MCP server.

Why bayesian beats a fixed-sample A/B test

Classic frequentist subject line A/B tests force you to commit to a sample size before you start, then wait until significance crosses a threshold. A bayesian approach instead updates a probability distribution over each variant's true open rate as data arrives, so you can reason about "variant B has an 87% chance of beating variant A" at any point.

That framing is friendlier for email, where send windows are short and waiting for a rigid sample size often means losing momentum. You watch the posterior probability climb and act when confidence is high enough for your campaign.

How marginal runs the test

marginal is a hosted email MCP server, so the entire experiment runs through four MCP tools your AI agent can call directly. There's nothing to deploy and no self-hosted server to maintain — you point a client at https://marginal.sh/mcp and authenticate with a Bearer API key.

A typical bayesian email subject line test flows through these tools in order:

Wire it into your AI agent email marketing stack

Because marginal speaks MCP, the same workflow works across Cursor, Claude Desktop, Claude Code, OpenAI Codex, Windsurf, Cline, Continue, and Zed. Your agent reads the results, reasons over win probabilities, and decides the next move without you hand-copying numbers between tools.

This makes subject line testing a native part of AI agent email marketing rather than a manual side task. The agent can launch a test, check back as opens accumulate, and recommend the variant most likely to win — all within one conversation.

Reading the results without fooling yourself

Bayesian methods make it easy to peek early — but you still need enough sends per variant for the posterior to mean anything. With tiny lists, win probabilities swing wildly, so let opens accumulate before trusting a recommendation.

Use get_results to watch how lift and win probability stabilize over time, and lean on recommend_next once the numbers settle. The goal is a decision you'd make again if the same test ran tomorrow — not a coin flip dressed up as a winner.

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