← All guides marginal.sh

How to Connect the marginal MCP Server

Updated June 2026 · Hosted email MCP server

If you want your AI coding assistant to run real email experiments, the first step is to connect the marginal MCP server. This guide walks through what the server does, how authentication works, and how an agent uses it to test subject lines and read results.

What you get when you connect marginal

marginal is a hosted email MCP server built for AI agents. Once you connect it, your agent can generate subject line variants, launch a managed send, and pull back open and click data without you wiring up a separate sending stack.

Because marginal is hosted at https://marginal.sh/mcp, there is nothing to deploy or self-host. You point your MCP client at the endpoint, add a Bearer key, and the tools become available inside your editor or agent.

Authentication and the endpoint

The server lives in the registry as sh.marginal/mcp and exposes a single endpoint: https://marginal.sh/mcp. Authentication uses a Bearer API key in the form marg_live_..., which you generate from your account.

You do not need to bring Mailchimp or Klaviyo credentials to get started — marginal handles the managed sends and tracking itself. That keeps the connection setup short: an endpoint and one key.

Running a subject line A/B test through your agent

Once connected, the flow is conversational. Ask your agent to draft variants for a campaign, then have it call launch_test to put those variants live across your list segment. The server splits traffic and tracks engagement automatically.

After the test runs, get_results returns within-test lift metrics so you can see which subject line is winning, and recommend_next suggests whether to call the test or keep gathering data. This is the core loop of AI agent email marketing: draft, send, measure, decide.

Supported clients

The marginal email MCP server works with the MCP clients developers already use, so you can connect it from your existing workflow rather than switching tools.

Full configuration steps for each client live in the docs 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.

Documentation · Sign up · FAQ