How to Launch an Email Campaign Without an ESP API
If you want to launch an email campaign without an ESP API, marginal gives your AI agent a hosted email MCP server that handles variant generation, sends, and tracking. This how-to guide walks through the exact tool calls from start to results.
Why skip the ESP API entirely
Traditional setups force you to provision an ESP account, store provider credentials, and wire up send and tracking endpoints by hand before a single email goes out. marginal removes that step: it's a hosted email marketing MCP server, so your agent talks to one endpoint and the managed send layer is handled for you.
That means AI agent email marketing workflows can go from idea to inbox without you touching a provider SDK. You authenticate once with a Bearer API key and call MCP tools directly.
- No provider SDK or webhook plumbing to maintain
- Hosted sends with built-in open and click tracking
- One Bearer key (marg_live_...) instead of per-ESP secrets
- Free tier covers 100 experiments per month
Step 1: Connect marginal to your agent
Add the marginal MCP server (https://marginal.sh/mcp) to a supported client such as Cursor, Claude Desktop, Claude Code, Windsurf, Cline, Continue, Codex, or Zed. Supply your API key as a Bearer token. Once connected, the four core tools — generate_variants, launch_test, get_results, and recommend_next — become available to your agent.
From here on, every action in this how-to guide is a tool call your agent makes, so you can describe the campaign in plain language and let it orchestrate the steps.
- Registry: sh.marginal/mcp
- Endpoint: https://marginal.sh/mcp
- Auth: Bearer marg_live_... key
- Docs: https://marginal.sh/docs/
Step 2: Generate and launch the campaign
Start with generate_variants to produce candidate subject lines for your message, then pass the strongest ones into launch_test. This is where you set up a subject line A/B test — marginal sends the variants across your audience and begins tracking opens and clicks immediately.
Because the send is managed, you don't configure SMTP, rate limits, or tracking pixels. You launch the test and marginal takes over delivery.
- generate_variants — draft multiple subject line options
- launch_test — start a managed, tracked A/B send
- Opens and clicks are captured automatically per variant
Step 3: Read results and decide what's next
Call get_results to see within-test lift metrics — which subject line drove higher opens and clicks across the variants you launched. Then use recommend_next to let marginal suggest the follow-up: send the winner to the remaining audience, iterate on a new variant, or close the experiment.
This loop is the whole point of using a marginal MCP tutorial workflow: you launch an email campaign without an ESP API, measure real engagement, and let your agent act on the data without leaving its environment.
- get_results — view per-variant opens, clicks, and lift
- recommend_next — get a data-backed follow-up action
- Repeat the cycle for continuous subject line optimization
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