← All guides marginal.sh

Testing Welcome Series Subject Lines in Claude Code

Updated June 2026 · Hosted email MCP server

Your welcome series is the highest-engagement email a subscriber will ever get from you — so the subject line is worth getting right. With marginal connected to Claude Code, you can draft, test, and iterate on welcome email subject lines without leaving your terminal.

Why pair Claude Code with marginal for welcome emails

Claude Code is already where you script automations and reason about copy. Adding marginal as an email MCP server means the same agent that writes your onboarding logic can also run a subject line A/B test against real recipients and report back the winner.

marginal is hosted, so there's nothing to deploy. You connect the endpoint, give the agent your welcome series context, and it handles variant generation, the send, and the tracking.

Connecting marginal to Claude Code

Add marginal to your Claude Code MCP configuration using the hosted endpoint at https://marginal.sh/mcp and a Bearer API key (it starts with marg_live_). Once registered, the generate_variants, launch_test, get_results, and recommend_next tools become available to the agent.

{
  "mcpServers": {
    "marginal": {
      "url": "https://marginal.sh/mcp",
      "headers": {
        "Authorization": "Bearer marg_live_your_key_here"
      }
    }
  }
}

Running a welcome series subject line test

Ask Claude Code to draft a handful of subject line options for your first welcome email, then turn that into a live subject line A/B test. The agent calls generate_variants to expand your idea into distinct angles, launch_test to send them across split audiences, and get_results to surface opens, clicks, and lift.

A typical welcome message is a friendly hello, so test contrasting tones: warm and personal versus benefit-forward versus curiosity-driven. Let the data show which one earns the open.

Turning results into a repeatable workflow

The point of a subject line test isn't a single winner — it's a feedback loop. After the first welcome email, use recommend_next to carry the strongest angle forward into later emails in the series, then test fresh variations against it.

Because this AI agent email marketing loop lives inside Claude Code, you can codify it: a prompt or script that generates variants, launches the test, waits for results, and proposes the next iteration automatically.

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