The marginal MCP server for email subject line testing
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.
- generate_variants — produce candidate subject lines for a message
- launch_test — start a subject line A/B test with a managed send
- get_results — pull open/click tracking and within-test lift metrics
- recommend_next — get a data-backed suggestion for the next step
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.
- Variants and sends share the same context the agent is already working in
- Lift is measured within the test, not guessed from past campaigns
- Recommendations are grounded in open and click data you can audit
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.
- Endpoint: https://marginal.sh/mcp
- Auth: Bearer API key (marg_live_...)
- Free tier: 100 experiments per month
- Docs and tool references: https://marginal.sh/docs/
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.
- 100 experiments/month on the free tier
- Four MCP tools: generate_variants, launch_test, get_results, recommend_next
- Listed in the MCP Registry as sh.marginal/mcp