← All guides marginal.sh

How to Generate Subject Line Variants with MCP

Updated June 2026 · Hosted email MCP server

This how-to guide walks through generating subject line variants with MCP using marginal — the hosted email MCP server. In a few prompts your AI agent can draft alternatives, launch an A/B test, and read back lift metrics.

What you need before you start

marginal is a hosted email marketing MCP server, so there's nothing to install or self-host. You connect your MCP client to the endpoint and authenticate with a Bearer API key. The free tier covers 100 experiments per month, which is plenty for testing subject line ideas.

Step 1: Generate subject line variants

Once your agent is connected, call the generate_variants tool. Describe the email's audience, offer, and tone, and ask for a handful of distinct angles. The tool returns alternative subject lines you can review before testing anything.

A good prompt is specific. Instead of "write some subject lines," tell the agent who the recipient is and what action you want. That context produces variants worth running through a subject line A/B test.

Step 2: Launch the A/B test and read results

After you've picked your variants, have the agent call launch_test to run a managed send that splits recipients across the subject lines. marginal handles delivery plus open and click tracking, so you don't wire up sending infrastructure yourself.

When the test has gathered data, call get_results to see within-test lift metrics for each variant. This closes the loop on the whole point of learning how to generate subject line variants with MCP: you don't just brainstorm options, you find out which one performs.

Make it a repeatable workflow

Because every step runs through MCP tools, AI agent email marketing becomes a repeatable loop rather than a one-off task. Generate, test, measure, and iterate — all from the same conversation. As you collect results, recommend_next helps you decide what to try in the following round.

For full tool schemas and connection details, see the marginal MCP tutorial and reference docs at https://marginal.sh/docs/, or connect directly at https://marginal.sh/mcp.

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