← All guides marginal.sh

Test Newsletter Subject Lines in Claude Code

Updated June 2026 · Hosted email MCP server

Connect Claude Code to marginal and you can draft, launch, and measure newsletter subject line tests from a single conversation. The agent calls marginal's email MCP server directly, so you stay in your terminal while the experiment runs.

Why run subject line tests from Claude Code

Claude Code is already where you write, refactor, and ship. Wiring in an email MCP server means your newsletter workflow lives in the same place — no context switch to a separate dashboard to spin up a subject line A/B test.

marginal is a hosted MCP server, so there's nothing to deploy. Once Claude Code can reach the endpoint, you describe the newsletter you're sending and let the agent handle variant generation, the send, and the readout.

The marginal tools behind a newsletter test

marginal exposes four MCP tools that map cleanly onto a newsletter subject line test. Claude Code chooses the right one based on what you ask for.

A typical newsletter workflow

Say you publish a weekly digest. In Claude Code, paste the lead paragraph and ask for subject line options. The agent calls generate_variants, you pick a few, and it launches the subject line A/B test across a sample of your list.

Once opens come in, ask for results. Claude Code calls get_results and reports lift between variants, then uses recommend_next to advise which line to send to the remainder. This is AI agent email marketing with a tight feedback loop — every newsletter teaches the next one.

Getting connected

Point Claude Code at the marginal endpoint at https://marginal.sh/mcp and authenticate with your Bearer API key (the marg_live_ token from your account). The free tier covers 100 experiments per month, which is plenty for weekly newsletter testing.

Full setup steps and tool references live in the docs at https://marginal.sh/docs/. After that, testing newsletter subject lines in Claude Code is just another part of the conversation.

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