← All guides marginal.sh

Post-purchase subject lines in Claude Code

Updated June 2026 · Hosted email MCP server

Post-purchase emails — order confirmations, shipping updates, replenishment nudges, and review requests — are some of the highest-open messages you'll ever send. This guide shows how to test their subject lines directly from Claude Code using marginal, the hosted email MCP server.

Why test post-purchase subject lines

Post-purchase moments carry intent that a cold promo blast never will. The customer just bought something, so they're primed to open the next message. That makes the subject line a high-leverage place to experiment: small wording changes can move opens and downstream clicks on cross-sell, reorder, or feedback flows.

Running a subject line A/B test here tells you whether to lead with the order number, the product name, a delivery promise, or a thank-you tone. Instead of guessing, you let real opens and clicks decide.

How marginal fits into Claude Code

marginal is a hosted email MCP server, so Claude Code talks to it over the endpoint at https://marginal.sh/mcp with a Bearer API key — there's nothing to self-host. Once connected, the agent can call four tools end to end: generate_variants to draft subject line candidates, launch_test to send the A/B split, get_results to pull open and click metrics, and recommend_next to suggest the follow-up experiment.

Because Claude Code already operates in your project context, you can ask it to design a post-purchase test in plain language and it will orchestrate the tools for you. The free tier covers 100 experiments per month, which is plenty for iterating across your post-purchase flows.

A sample post-purchase test workflow

Here's a typical sequence in Claude Code. You describe the audience and goal, the agent proposes variants, and you launch once you're happy with the framing.

Treat each send as a learning loop: review the lift metrics after enough opens accumulate, then call recommend_next to compound on what worked rather than restarting from scratch.

Getting the most from AI agent email marketing

AI agent email marketing works best when each test isolates one variable. Keep the audience, send time, and body content fixed so the subject line is the only thing changing — that's how the within-test lift number stays trustworthy.

For setup steps, MCP config, and tool reference, see the marginal docs at https://marginal.sh/docs/. The same Claude Code connection powers every part of the post-purchase journey, from confirmation to reorder.

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