← All guides marginal.sh

Building an Email Marketing Agent Workflow

Updated June 2026 · Hosted email MCP server

An email marketing agent workflow lets an AI assistant draft, test, and optimize campaigns without you hopping between tools. With marginal's hosted email MCP server, your agent can generate subject line variants, launch an A/B test, and pull real results — all from inside the editor or chat you already use.

What the workflow looks like end to end

A good agent workflow is a loop, not a one-off prompt. The agent proposes copy, ships a test, waits for signal, and then decides what to do next. marginal exposes four MCP tools that map cleanly onto that loop, so the agent reasons about strategy while the server handles sends and measurement.

Why run it through an email MCP server

When subject line testing lives behind an MCP server, the agent doesn't need bespoke glue code or a brittle chain of API calls. It calls a tool, gets structured output, and keeps going. marginal is hosted, so there is no infrastructure to stand up — you authenticate with a Bearer API key (marg_live_...) and point your client at https://marginal.sh/mcp.

This keeps the AI agent email marketing flow auditable. Every variant, send, and metric passes through one endpoint, so you can trace exactly what the agent did and why it recommended the variant it chose.

A practical subject line A/B test loop

Here's a typical sequence an agent runs inside this workflow. The phrasing of your prompt can stay high-level — the tools carry the operational weight.

Getting started across your tools

marginal works with the MCP clients developers and growth engineers already use, including Cursor, Claude Desktop, Claude Code, Windsurf, Cline, Continue, Zed, and OpenAI Codex. Configure the endpoint once and the same email marketing agent workflow is available wherever you work.

The free tier covers 100 experiments per month, which is plenty to validate the loop on real campaigns before scaling. Full tool references and setup steps live in the docs at https://marginal.sh/docs/.

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