← All guides marginal.sh

Building an LLM Email Marketing Workflow

Updated June 2026 · Hosted email MCP server

An LLM email marketing workflow is only as good as the tools your agent can call. marginal is a hosted email MCP server that gives AI agents the ability to draft subject lines, run real A/B tests, and read back results — all without leaving the chat.

What an LLM email marketing workflow looks like

Most email work breaks into the same loop: come up with copy ideas, test them on a slice of your list, measure what wins, and ship the winner. The hard part has always been wiring an LLM to the systems that actually send mail and track engagement.

marginal collapses that loop into four MCP tools your agent calls in sequence. The model handles the reasoning; marginal handles the sends, tracking, and statistics.

Why use an email MCP server instead of glue code

You could script the same flow yourself, but you'd be maintaining send infrastructure, click tracking, and significance math. An email MCP server exposes those as typed tools so the LLM can orchestrate them directly.

Because marginal is hosted at https://marginal.sh/mcp, there is nothing to deploy. You connect a client, authenticate with a Bearer API key, and your agent gains email capabilities immediately.

Running a subject line A/B test from your agent

A typical pass starts with the agent calling generate_variants for a campaign, then launch_test to split traffic across those variants. Once enough engagement data accumulates, get_results returns opens, clicks, and the measured lift for each option.

From there, recommend_next lets the model close the loop — promote the winning subject line, propose a new round of variants, or stop testing. This is where AI agent email marketing moves from suggestion to action.

Connecting your client

marginal speaks MCP, so it plugs into Cursor, Claude Desktop, Claude Code, OpenAI Codex, Windsurf, Cline, Continue, and Zed. Point your client at the endpoint, add your marg_live_ key, and the four tools appear in the agent's toolset.

The free tier covers 100 experiments per month, which is plenty to validate a subject line A/B test pipeline before scaling. Full setup details 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