Email marketing MCP server

Email MCP server forsubject line A/B tests.

marginal is a hosted email marketing MCP server for AI agents — programmatic subject line experiments, managed sends, open/click tracking, and experiment results. Connect from Cursor, Codex, or Claude Desktop with one API key — no Mailchimp or Klaviyo integration.

E-commerce brandsSubject line campaignsManaged deliveryOwned analytics
agent → marginal
generate_variants({ brief: { goal: "cart recovery" } })

launch_test({ variants, recipients: 12_847 })

→ campaign sent · tracking live

get_results({ experiment_id })
top subject click rate: 12.4%

Copy workflows

Your agent controls the copy.

Start from a brief, riff on seed lines, or send exactly what the agent wrote. marginal handles delivery and measurement either way.

From a brief

Describe the product, audience, and goal. marginal writes subject line options for the send.

{ brief, count: 3 }

From seed copy

Start with lines your agent or brand already likes. marginal expands them into send-ready options.

{ seed_texts: ["Your cart is saved"], count: 4 }

Your copy, your send

Pass finished subject lines straight through — marginal tags and sends them without rewriting.

{ source_variants: ["Line A", "Line B"] }

What it does

Write → send → measure → improve

One MCP connection covers the email marketing loop your agent would otherwise have to stitch together across an ESP, a copy tool, and an analytics stack.

01

Write

Subject lines from a brief, seeds, or agent copy

02

Send

Campaigns to your list with managed delivery

03

Measure

Opens and clicks tracked on every message

04

Compare

See which subjects drive engagement

05

Improve

Recommendations for the next campaign

Pricing

Generous free tier. No credit card.

Every account starts on Free. Paid plans are coming later — for now, everyone gets the same generous limits.

Only plan available

$0

/ month

Free

Generous early-access limits. No credit card — the only plan until paid tiers launch.

  • All 4 MCP tools
  • Write subject lines from a brief, seeds, or your own copy
  • Send campaigns with open + click tracking on every message
  • 100 campaigns per month
  • 250k recipients per month

100 campaigns / month

250,000 recipients / month

50,000 recipients / send

10 API keys

Start free

FAQ

Email MCP server — common questions

Quick answers for developers evaluating marginal for agent-driven email marketing and subject line A/B tests.

What is marginal?
marginal is a hosted MCP (Model Context Protocol) server that lets AI agents run email marketing workflows: write subject lines, send campaigns to a recipient list, track opens and clicks, and read experiment results — without connecting Mailchimp or Klaviyo.
What is an email MCP server?
An email MCP server exposes email marketing tools — such as variant generation, campaign sends, and engagement metrics — over the MCP protocol so agents in Cursor, Codex, Claude Desktop, or other MCP clients can call them with structured tool requests instead of brittle browser automation.
How do I connect marginal to Cursor, Codex, or Claude?
Sign up at marginal.sh, create an API key in the dashboard, then add https://marginal.sh/mcp as a remote MCP server with Bearer auth. Cursor and Claude Desktop use JSON mcp config; OpenAI Codex uses ~/.codex/config.toml with bearer_token_env_var. Full setup: https://marginal.sh/docs/#connect
What MCP tools does marginal provide?
Four tools: generate_variants (subject lines from a brief, seeds, or your copy), launch_test (send a split test to recipients), get_results (opens, clicks, and per-variant metrics), and recommend_next (suggestions for the next campaign angle).
Do I need my own email provider or ESP?
No. marginal is hosted: delivery, tracking, and storage run on marginal.sh. You connect with only your marginal API key.
Is there a free tier?
Yes. The free plan includes 100 experiments per month and 250,000 recipients per month, with up to 10 API keys. No credit card required at signup.
Who is marginal for?
Developers and teams building AI agents for e-commerce or lifecycle email — especially subject line testing, cart recovery, and programmatic campaigns where an agent should write copy, send, and read results in one loop.
Where is marginal listed?
marginal is published in the official MCP Registry as sh.marginal/mcp with a remote Streamable HTTP endpoint at https://marginal.sh/mcp.

Without marginal

  • ×Agent drafts copy but can't send campaigns or read results
  • ×ESP owns the list, the send, and the engagement data
  • ×No MCP-native email marketing layer for agents

With marginal

  • Full email marketing loop in one MCP server
  • Managed delivery and tracking on every send
  • Opens, clicks, and subject-level performance in your logs

MCP tools

Four MCP tools for email A/B testing

generate_variants

Write subject lines from a campaign brief, seed copy, or exact lines your agent already drafted.

launch_test

Send a campaign to your recipient list with tracking on every message.

get_results

Opens, clicks, and performance broken down by subject line — from your own logs.

recommend_next

Guidance on what messaging angle to try in the next campaign.

Built to learn

Every send tagged so you know what worked.

Subject lines are tagged by strategy — urgency, tone, discount, and more — so performance compounds across campaigns, not just one-off sends.

urgencycuriosity_gappersonalizationlength_bucketemojiquestion_vs_statementdiscount_mentionedtone
Per-message open and click tracking
Compare subject lines in the same send
Recommendations for the next campaign

Connect

Sign up, copy your key, connect

Create an account at marginal.sh, generate an API key, and connect via hosted MCP or npx marginal-cli. Delivery, AI, Postgres, and tracking run on our infrastructure — nothing to deploy.

Free tier

100 experiments/mo · 250k recipients/mo · 10 API keys · one Bearer token to connect

mcp.jsonhosted MCP
{
  "mcpServers": {
    "marginal": {
      "url": "https://marginal.sh/mcp",
      "headers": {
        "Authorization": "Bearer marg_live_..."
      }
    }
  }
}
terminalmarginal-cli
export MARGINAL_API_KEY=marg_live_...
npx marginal-cli generate-variants --json '{"source_variants":["Line A","Line B"]}'
agent workflow
# 1. Generate variants
marginal generate-variants --json '{"brief":{"product":"Shoes","audience":"Cart abandoners","goal":"Recover sales"},"count":3}'

# 2. Launch test → save experiment_id
marginal launch-test --json @campaign.json

# 3. After opens/clicks
marginal get-results --experiment-id <id>
marginal recommend-next --experiment-id <id>