← All guides marginal.sh

Connect the marginal Email MCP Server to Windsurf

Updated June 2026 · Hosted email MCP server

marginal is a hosted email marketing MCP server that gives Windsurf direct access to subject line A/B tests, managed sends, and within-test lift metrics. This guide walks through adding the email MCP integration to Windsurf so your AI agent can run real experiments.

Why use an email MCP server with Windsurf

Windsurf's agentic workflow is great at writing code and copy, but it can't measure what actually performs. Wiring an email MCP server for Windsurf closes that loop: the agent generates variants, launches a test, and reads back open and click data without you leaving the editor.

Because marginal is fully hosted, there's nothing to deploy. You point Windsurf at one endpoint with a Bearer API key and the four MCP tools become available to the agent.

Configure the Windsurf MCP integration

Windsurf reads MCP servers from its configuration. Add marginal as a remote server using the endpoint below and your API key (it starts with marg_live_). Once saved, restart Windsurf so it picks up the new email MCP integration.

{
  "mcpServers": {
    "marginal": {
      "serverUrl": "https://marginal.sh/mcp",
      "headers": {
        "Authorization": "Bearer marg_live_your_api_key"
      }
    }
  }
}

Run your first subject line A/B test

With the Windsurf MCP connection live, prompt the agent in plain language. The agent maps your request to marginal's tools and handles the managed send for you.

Tips for AI agent email marketing in Windsurf

Keep prompts specific — name the audience, the goal, and how many variants you want — so the agent picks the right tool and parameters. The free tier covers 100 experiments per month, which is plenty for iterating on subject lines while you tune your AI agent email marketing workflow.

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