Build a Claude Email Subject Line Generator with marginal
Claude is great at brainstorming subject lines, but ideas alone don't tell you what your audience opens. Connect Claude to marginal's email MCP server and it can generate variants, launch a real subject line A/B test, and read back the winner — all in one conversation.
From prompt to tested subject line
A standalone Claude email subject line generator usually stops at a list of clever phrases. marginal closes the loop: Claude calls the generate_variants tool to produce candidates, then launch_test to send them to a sample of your list, and finally get_results to surface open and click data with within-test lift metrics.
- generate_variants — draft multiple subject lines from a brief
- launch_test — run a managed subject line A/B test
- get_results — open/click tracking with lift metrics
- recommend_next — get a data-backed suggestion for the next send
Why pair Claude with an email MCP server
Connecting Claude Desktop or Claude Code to marginal's email MCP server means the model isn't guessing in a vacuum. It writes copy, sends it, and learns from real engagement — turning AI agent email marketing into a measurable workflow instead of a one-off generation task.
The endpoint lives at https://marginal.sh/mcp and authenticates with a Bearer API key (marg_live_...). Because marginal is fully hosted, there's no self-hosted server to maintain — Claude talks to the registry entry sh.marginal/mcp and gets back structured results.
A typical subject line testing flow
Ask Claude to write five subject lines for a product launch email. It calls generate_variants, then you tell it to test them. Claude launches the experiment, waits for engagement to accumulate, and reports which variant won by open rate and click rate.
- Describe your campaign and audience in plain language
- Let Claude generate and refine the candidate subject lines
- Run a subject line A/B test against a real audience sample
- Review lift metrics and apply recommend_next to the full send
Getting started
marginal works across Claude Desktop, Claude Code, Cursor, Windsurf, Cline, Continue, Zed, and OpenAI Codex, so you can drive subject line testing from whichever assistant you already use. The free tier includes 100 experiments per month — enough to validate the workflow before scaling up.
See the docs at https://marginal.sh/docs/ to add the MCP endpoint to Claude and run your first generated-and-tested subject line.
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