How to Connect Claude to an Email MCP Server
If you want to run subject line experiments without leaving your chat window, you can connect Claude to email MCP through marginal — a hosted email MCP server built for AI agents. This guide walks through what the connection looks like and what your agent can do once it's wired up.
What you get when you connect Claude to email MCP
marginal exposes a small set of email marketing tools over the Model Context Protocol, so Claude can draft, launch, and measure campaigns directly. Because the server is hosted at https://marginal.sh/mcp, there's nothing to deploy or maintain on your side — you point Claude at the endpoint with a Bearer API key and start sending.
- generate_variants — produce candidate subject lines for a campaign
- launch_test — start a managed subject line A/B test
- get_results — pull open/click tracking and within-test lift metrics
- recommend_next — let the agent suggest the next experiment to run
Configuring Claude Desktop and Claude Code
Both Claude Desktop and Claude Code support remote MCP servers, so the setup is the same regardless of which one you use. Add marginal to your MCP configuration using the registry name sh.marginal/mcp and the hosted endpoint, then supply your API key (it starts with marg_live_).
Once Claude reloads its MCP servers, the marginal tools appear automatically. You can confirm the connection by asking Claude to list available tools — you should see generate_variants, launch_test, get_results, and recommend_next.
- Use the endpoint https://marginal.sh/mcp
- Authenticate with a Bearer key in the marg_live_ format
- Restart Claude to register the new MCP server
- Full configuration details live at https://marginal.sh/docs/
Running your first subject line A/B test
After the connection is live, a typical workflow starts with a plain-language prompt: ask Claude to generate a handful of subject line variants for a campaign, review them, then launch a subject line A/B test against your list. marginal handles the managed send and tracks opens and clicks for you.
When results come in, ask Claude to fetch the within-test lift metrics and recommend the next move. This closes the loop on AI agent email marketing — Claude proposes, tests, measures, and iterates without you switching tools.
- Generate variants from a campaign brief
- Launch a test and let marginal manage the send
- Read open/click tracking and lift per variant
- Use recommend_next to plan the follow-up experiment
Cost and other supported clients
The free tier includes 100 experiments per month, which is enough to validate the connection and run real subject line tests before committing further. Claude is far from the only option here — marginal works the same way across other MCP clients.
If your team mixes editors and agents, you can connect Cursor, OpenAI Codex, Windsurf, Cline, Continue, and Zed against the same hosted endpoint, so experiments stay consistent no matter which tool launched them.
- 100 experiments/month on the free tier
- Same hosted email MCP server across every client
- Supported clients include Cursor, Codex, Windsurf, Cline, Continue, and Zed
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.
- 100 experiments/month on the free tier
- Four MCP tools: generate_variants, launch_test, get_results, recommend_next
- Listed in the MCP Registry as sh.marginal/mcp