← All guides marginal.sh

Testing Referral Program Subject Lines in Claude Code

Updated June 2026 · Hosted email MCP server

Referral campaigns live or die by the open. With marginal connected to Claude Code, you can draft, test, and optimize referral program subject lines without leaving your editor — letting the AI agent handle the email marketing busywork while you focus on the offer.

Why pair Claude Code with a referral program

Referral emails ask a lot of a subject line: they need to signal a reward, feel personal, and avoid sounding like a chain letter. That makes them ideal candidates for a subject line A/B test, because small wording shifts — "Give $20, get $20" versus "Your friends will thank you" — move open rates in ways you can't predict by intuition alone.

Claude Code already understands your campaign context from the repo and your prompts. Add marginal's email MCP server and the agent gains the ability to actually run the experiment, not just suggest copy. You describe the referral mechanic in plain language and the agent turns it into a measurable test.

The workflow for referral program subject lines in Claude Code

Once marginal is configured as an MCP server in Claude Code, the AI agent email marketing loop uses four tools. Each maps to a step you'd otherwise do by hand across separate tools.

Writing variants worth testing

Ask Claude Code for distinct angles rather than rewordings of one idea — that gives the subject line test real signal. For a referral program, the strongest contrasts are usually reward-forward, identity-forward, and curiosity-forward framings.

Keep each test focused on one variable at a time. If you change both the reward amount and the tone, you won't know which drove the lift. marginal reports within-test lift metrics so you can attribute the win cleanly and feed that learning into the next round.

Getting started on the free tier

marginal is hosted, so there's nothing to deploy — you point Claude Code at the endpoint at https://marginal.sh/mcp, authenticate with your Bearer API key, and start running tests. The free tier covers 100 experiments per month, which is plenty to validate a referral campaign's subject lines before you scale the winner.

Read the full tool reference and setup steps in the docs at https://marginal.sh/docs/ to wire marginal into your Claude Code environment.

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