MCP CLI Email Testing
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.
- No separate dashboard to babysit during a test
- Agents handle variant generation, launch, and results in one session
- Works with CLI-oriented clients such as Claude Code, Codex, and Cline
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.
- generate_variants — produce candidate subject lines from a prompt or brief
- launch_test — start a managed send and split the audience for a subject line A/B test
- get_results — pull open and click tracking plus within-test lift metrics
- recommend_next — let the agent suggest the next variant or follow-up test
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.
- Registry: sh.marginal/mcp
- Endpoint: https://marginal.sh/mcp
- Auth: Bearer API key (marg_live_...)
- Free tier: 100 experiments per month
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/.
- Brief the agent and call generate_variants for candidates
- Pick variants and call launch_test to start the managed send
- Poll get_results for open/click and within-test lift
- Use recommend_next to plan the follow-up experiment
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