← All guides marginal.sh

Tool Calling Email Marketing

Updated June 2026 · Hosted email MCP server

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.

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.

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.

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.

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