← All guides marginal.sh

Programmatic Lifecycle Email Testing

Updated June 2026 · Hosted email MCP server

Lifecycle emails — welcome series, onboarding nudges, win-back flows — only improve when you test them consistently. Programmatic lifecycle email testing puts that loop inside your code and your AI agent, so every stage of the journey gets a real subject line A/B test instead of a guess.

Why lifecycle stages deserve their own tests

Most teams A/B test a single newsletter and call it done. But lifecycle programs are a sequence of distinct moments, and each one has its own audience intent. A day-one welcome and a 30-day reactivation respond to completely different subject lines, so testing them as one bucket hides the wins.

Programmatic lifecycle email testing treats each stage as a separate experiment you can launch, measure, and iterate on through an API rather than a dashboard. That makes it repeatable across dozens of flows.

How marginal fits into the loop

marginal is a hosted email MCP server that exposes test workflows as tools your AI agent can call directly. Instead of wiring up a dashboard for every flow, your agent generates candidates, launches the send, and reads results in one pass.

The four tools map cleanly onto a lifecycle testing loop, so you can script the whole cycle or hand it to an agent.

Running AI agent email marketing at scale

Because marginal speaks MCP, AI agent email marketing becomes a natural extension of the tools you already use. Connect from Cursor, Claude Code, Claude Desktop, Codex, Windsurf, Cline, Continue, or Zed and let the agent run the test-and-learn cycle across every flow.

Authentication is a Bearer API key (marg_live_...) against the endpoint at https://marginal.sh/mcp. The free tier includes 100 experiments per month, which is enough to keep several lifecycle flows under continuous subject line testing.

A practical testing cadence

Treat each lifecycle stage as an ongoing experiment rather than a one-off. Generate two or three subject line variants, launch the test, wait for enough opens to read a stable lift, then promote the winner and queue the next challenger.

Automating this with an agent means underperforming stages get attention automatically, and your best subject lines compound over time. Read the docs at https://marginal.sh/docs/ to wire up the full loop.

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