← All guides marginal.sh

Email Subject Line Testing for Developers

Updated June 2026 · Hosted email MCP server

If you'd rather test subject lines from code than click through a marketing dashboard, marginal gives you a programmable way to do it. This guide walks through how developers can run subject line A/B tests through an email MCP server and let an AI agent handle the busywork.

Why developers test subject lines differently

Most subject line tooling is built for marketers clicking through visual editors. Developers want something callable, repeatable, and version-controllable. Email subject line testing for developers means treating each experiment like an API call — define variants, launch a send, read back metrics, and decide what to do next without leaving your toolchain.

marginal is a hosted email MCP server that exposes exactly those steps as MCP tools. Your AI agent (or your own script) can generate candidate subjects, launch a managed test, and pull open and click data, all over a single endpoint at https://marginal.sh/mcp.

The four tools behind a subject line A/B test

Each phase of a subject line A/B test maps to a dedicated MCP tool. You don't manage send infrastructure or tracking pixels yourself — marginal handles the managed send and instrumentation.

Running tests with an AI agent

AI agent email marketing works well here because the loop is naturally agentic: propose, send, measure, refine. Connect marginal to a client like Cursor, Claude Code, Windsurf, Cline, Continue, Zed, OpenAI Codex, or Claude Desktop, and the agent can call generate_variants and launch_test on your behalf, then reason over the results from get_results.

Because marginal is hosted, there's nothing to self-host or deploy. Authentication is a Bearer API key (marg_live_...), and the free tier covers 100 experiments per month — enough to wire up and validate a real testing workflow before scaling.

Getting started

Point your MCP client at the marginal endpoint, add your API key, and start with a single test. The docs at https://marginal.sh/docs/ cover tool schemas and example payloads so you can integrate quickly.

From there, the pattern scales: feed generate_variants your message context, launch_test to send, and treat get_results as the source of truth for what to ship next.

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