← All guides marginal.sh

MCP CLI Email Testing

Updated June 2026 · Hosted email MCP server

If you live in the terminal, you can drive subject line experiments without leaving your workflow. marginal is a hosted email MCP server that plugs into CLI-friendly agents so MCP CLI email testing becomes a few tool calls instead of a dashboard scavenger hunt.

Why run email tests through an MCP CLI workflow

Command-line agents like Claude Code, OpenAI Codex, and Cline keep you close to the actual work. When your testing tooling speaks the same protocol, you skip context switching: an agent can draft variants, launch a send, and report lift while you stay in the shell.

marginal exposes its capabilities as Model Context Protocol tools, so any MCP-aware CLI client can call them directly. That means a subject line A/B test is something you trigger conversationally rather than clicking through a marketing UI.

The four tools behind every test

marginal keeps the surface area small and predictable, which matters when an AI agent is orchestrating the calls. Each tool maps to one stage of running an experiment end to end.

Connecting marginal to your CLI agent

marginal is fully hosted, so there is nothing to deploy and no self-hosted MCP server to maintain. You point your client at the endpoint at https://marginal.sh/mcp and authenticate with a Bearer API key in the form marg_live_....

Because the email MCP server is remote, the same configuration works across machines and CI runners. Once the connection is live, AI agent email marketing tasks run wherever your CLI agent does — no local infrastructure to keep in sync.

A typical testing loop from the terminal

Most MCP CLI email testing sessions follow a tight loop. You describe the campaign, the agent generates variants, you launch the test, and then you read lift once data accumulates. The recommend_next tool closes the loop by proposing what to try after the winner emerges.

Keep prompts specific — audience, offer, and tone — so generated subject lines stay relevant. For full schemas and examples, see 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