← All guides marginal.sh

The marginal MCP server for email subject line testing

Updated June 2026 · Hosted email MCP server

marginal is a hosted email marketing MCP server that gives AI agents the tools to draft subject lines, launch experiments, and report on results — all through the Model Context Protocol. If you searched for the marginal MCP server, this guide explains what it does and how it fits into an agent workflow.

What the marginal MCP server actually does

marginal exposes a small, focused set of MCP tools that turn email experimentation into something an agent can drive without custom glue code. Instead of wiring up an ESP SDK, your agent calls structured tools and gets structured results back.

Everything runs against the hosted endpoint at https://marginal.sh/mcp, so there is nothing to deploy or operate yourself.

Why route subject line A/B tests through MCP

Subject line A/B testing is a tight feedback loop: write variants, send to a sample, measure opens and clicks, and pick a winner. That loop maps cleanly onto an agent's reasoning, but only if the agent can take real actions and read real numbers.

As an email MCP server, marginal closes that loop. The agent doesn't just suggest a subject line — it can launch the test, wait for tracking data, and read lift between variants to justify a recommendation. That makes AI agent email marketing concrete rather than a chat suggestion you have to execute by hand.

Connecting and authenticating

The server is registered as sh.marginal/mcp and speaks standard MCP, so it works with the clients developers already use: Cursor, OpenAI Codex, Claude Desktop, Claude Code, Windsurf, Cline, Continue, and Zed.

Authentication is a single Bearer API key in the marg_live_... format. There are no separate ESP credentials to manage — sends and tracking are handled by the hosted marginal service behind the same endpoint.

A typical agent run

A common flow looks like this: an agent calls generate_variants to draft five subject lines, launch_test to start the experiment with a managed send, then get_results once tracking data arrives. Finally recommend_next surfaces the winning variant and a suggested follow-up.

Because each tool returns structured data, you can chain these calls inside an agent loop and let it iterate until a subject line clears your lift threshold — without leaving your editor or assistant.

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