Tool Calling Email Marketing
Tool calling lets an AI agent do more than draft copy — it can actually run your campaigns. With marginal, your assistant calls structured tools to generate subject lines, launch A/B tests, and pull results, all without leaving the chat window.
What tool calling means for email marketing
Tool calling is the mechanism that turns a language model from a writer into an operator. Instead of returning text you copy into another app, the model invokes named tools with typed arguments and acts on the response. For email marketing, that closes the loop between ideation and execution.
marginal exposes that capability as an email MCP server. Any MCP-compatible agent can discover its tools, call them with a Bearer API key, and chain the steps of a campaign together in a single conversation.
- generate_variants — produce subject line options from a brief
- launch_test — start a subject line A/B test on a managed send
- get_results — read open, click, and within-test lift metrics
- recommend_next — get a data-backed suggestion for the next send
How an AI agent runs a subject line A/B test
AI agent email marketing works best when the agent owns each discrete step. A typical flow starts with a goal — say, lifting open rate on a newsletter — and the agent calls generate_variants to draft several subject lines tuned to that audience.
From there it calls launch_test to send those variants and lets marginal handle delivery and tracking. Once data accumulates, get_results returns lift figures so the agent can reason about which line won and why.
- Describe the audience and offer in plain language
- Let the agent generate and shortlist subject line variants
- Launch a subject line A/B test as a managed send
- Pull within-test lift metrics and act on recommend_next
Why a hosted email MCP server fits this workflow
Tool calling email marketing only pays off if the tools are reliable and always available. marginal is hosted at https://marginal.sh/mcp, so there is no server to deploy or maintain — you authenticate with a marg_live_ API key and start calling tools.
Because the send infrastructure and tracking live behind the same endpoint, your agent gets consistent results without juggling separate delivery accounts inside the conversation.
- Hosted endpoint — no self-hosted setup required
- Bearer API key auth keeps each project scoped
- Open and click tracking built into managed sends
- Free tier of 100 experiments per month to start
Connecting your agent
marginal works with the MCP clients developers already use, so the same tool-calling workflow runs across editors and chat apps. Point your client at the endpoint, add your key, and the four tools appear automatically.
Supported clients include Cursor, OpenAI Codex, Claude Desktop, Claude Code, Windsurf, Cline, Continue, and Zed. See the docs at https://marginal.sh/docs/ for client-specific configuration.
- Endpoint: https://marginal.sh/mcp
- Registry: sh.marginal/mcp
- Works in Cursor, Claude Code, Windsurf, Zed, and more
- Docs and setup guides at https://marginal.sh/docs/
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