Connect Cursor to an Email MCP Server
Want your editor's AI agent to run real email experiments? This guide shows how to connect Cursor to email MCP using marginal — a hosted email marketing MCP server that exposes subject line testing and live result metrics as agent tools.
What you get when you connect Cursor to email MCP
marginal runs as a hosted email MCP server, so there is nothing to deploy or self-host. Once Cursor is pointed at the endpoint, its agent can call a small set of tools to draft variants, launch tests, and pull back numbers — all without leaving your workflow.
- generate_variants — produce candidate subject lines from a prompt or brief
- launch_test — start a subject line A/B test with a managed send
- get_results — read open/click tracking and within-test lift metrics
- recommend_next — get a suggested follow-up based on observed performance
Add the MCP server in Cursor
Cursor reads MCP servers from its configuration. Add marginal as a remote server using the endpoint at https://marginal.sh/mcp and a Bearer API key that starts with marg_live_. Drop the block below into your Cursor MCP config and reload.
- Use a live key (marg_live_...) generated from your marginal dashboard
- Restart or reload Cursor so it discovers the new tools
- Confirm the marginal tools appear in the agent's tool list before testing
{
"mcpServers": {
"marginal": {
"url": "https://marginal.sh/mcp",
"headers": {
"Authorization": "Bearer marg_live_your_key_here"
}
}
}
}
Run your first subject line A/B test from Cursor
With the server connected, you can drive the whole loop from a chat prompt. Ask the agent to generate variants for a campaign, launch the test against your list, and check back for results once data lands.
Because marginal handles the managed send and tracking, the agent stays focused on decisions: which subject won, what the lift was, and what to try next. This is what AI agent email marketing looks like in practice — short instructions, measurable outcomes.
- "Generate 4 subject line variants for our onboarding email"
- "Launch a subject line A/B test with those variants"
- "Show me open and click rates plus within-test lift"
- "Recommend the next experiment based on the winner"
Notes, limits, and docs
marginal's free tier includes 100 experiments per month, which is enough to validate the integration and run real subject line tests before scaling up. The same MCP server also works with Claude Desktop, Claude Code, Windsurf, Cline, Continue, Zed, and OpenAI Codex, so the setup transfers if your team uses more than one client.
- Endpoint: https://marginal.sh/mcp (registry: sh.marginal/mcp)
- Auth: Bearer API key, no Mailchimp or Klaviyo key required
- Free tier: 100 experiments/month
- Full reference: https://marginal.sh/docs/
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