← All guides marginal.sh

marginal.sh MCP setup: connect your AI agent to email testing

Updated June 2026 · Hosted email MCP server

This guide walks through the marginal.sh MCP setup process — from getting an API key to running your first subject line A/B test. marginal is a hosted email MCP server, so there's nothing to deploy and no self-hosted infrastructure to babysit.

What you need before setup

The marginal.sh MCP setup is intentionally lightweight. Because marginal is hosted, you connect to a single endpoint and authenticate with a Bearer API key — no provider keys, no server to run.

Configuring the email MCP server

Add marginal as a remote MCP server in your client's config, pointing it at https://marginal.sh/mcp and passing your key as a Bearer token. Most clients support remote servers natively; consult the marginal docs for the exact config shape for your editor.

Once connected, the email MCP server exposes its tools to your agent. From there, the agent can generate, launch, and read results without leaving your editor.

Running your first subject line A/B test

With the connection live, AI agent email marketing becomes a conversation. Ask your agent to generate variants for a campaign, launch the test, and report back the winner once enough data has accrued.

marginal handles the managed send and tracking, so the agent's job is to interpret lift metrics and decide what to ship next. A typical loop: generate_variants → launch_test → get_results → recommend_next.

Verifying and troubleshooting

After completing the marginal.sh MCP setup, confirm the tools appear in your client's tool list. If they don't, double-check the endpoint URL and that your Authorization header carries the full marg_live_ key.

For client-specific config snippets and the latest tool schemas, see the documentation 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