← All guides marginal.sh

Email MCP server for Claude Code

Updated June 2026 · Hosted email MCP server

Wire marginal's hosted email MCP server into Claude Code and let your coding agent design subject line A/B tests, launch managed sends, and report on lift — all without leaving the terminal.

Why run email marketing from Claude Code

Claude Code already lives where you build. Adding the marginal email MCP integration means the same agent that edits your templates and copy can also test and ship them. You describe the experiment in plain language and Claude Code calls the right tools.

marginal is hosted, so there's no MCP server to install or maintain. You point Claude Code at the endpoint, authenticate with a Bearer API key, and the tools appear in your session.

Connect Claude Code to the marginal MCP

Claude Code reads MCP servers from its configuration. Add marginal as a remote MCP server pointing at https://marginal.sh/mcp and pass your key (marg_live_...) as a Bearer token in the Authorization header.

Once saved, restart Claude Code and confirm the marginal tools are listed. You're ready to drive AI agent email marketing from the prompt.

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

The tools Claude Code can call

Once the email MCP server for Claude Code is connected, the agent has four tools that map cleanly to an experiment lifecycle. Ask it to draft variants, launch a test, then come back later for results and a recommendation.

A sample Claude Code workflow

A typical loop in Claude Code reads almost like a conversation. The Claude Code MCP session keeps state between tool calls so the agent can reason about what it just launched.

Check the docs at https://marginal.sh/docs/ for tool arguments and response shapes if you want Claude Code to handle more complex multi-variant tests.

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