Cursor Agent Marketing Automation with marginal
Cursor agent marketing automation means letting your AI coding assistant do more than write code — it can draft email variants, launch subject line A/B tests, and report results without you leaving the editor. marginal is a hosted email MCP server that makes that possible.
Why run marketing automation from a Cursor agent
Cursor's agent mode is good at orchestrating multi-step tasks. Pointed at an email MCP server, it can turn a one-line instruction like "test three subject lines for the onboarding email" into a full experiment — generate copy, send, and wait for the numbers.
Because marginal is hosted, there's no self-hosted infrastructure to maintain. You add the endpoint, authenticate with a Bearer key, and the agent has four tools to call.
- No context switching — stay in the editor while campaigns run
- The agent reasons about results and proposes the next step
- Managed sends with open and click tracking handled for you
- Free tier covers 100 experiments per month while you prototype
The MCP tools your agent calls
marginal exposes a small, composable toolset over MCP. Each maps to a concrete stage of a subject line A/B test, so the Cursor agent can chain them in a single run.
- generate_variants — produce candidate subject lines from a brief
- launch_test — send the variants and start a managed A/B test
- get_results — pull open/click rates and within-test lift metrics
- recommend_next — get a data-backed suggestion for the next experiment
A typical automation loop
AI agent email marketing works best as a loop rather than a one-shot. A useful pattern in Cursor is to let the agent generate, launch, then poll for results and decide whether to iterate.
Tell the agent your goal in plain language. It calls generate_variants for fresh copy, launch_test to send, and once enough opens land it reads get_results and uses recommend_next to plan the follow-up — surfacing the winning subject line and the lift it delivered.
- Describe the audience and the message you want to test
- Let the agent draft and launch the subject line A/B test
- Review lift metrics the agent reports back inline
- Approve the recommended next experiment or adjust the brief
Connecting marginal to Cursor
marginal's endpoint is https://marginal.sh/mcp and the registry name is sh.marginal/mcp. Add it as an MCP server in Cursor, authenticate with your marg_live_ API key, and the four tools appear to the agent automatically.
Full setup steps and tool schemas live in the docs at https://marginal.sh/docs/. The same server works across other clients too — Claude Desktop, Claude Code, Windsurf, Cline, Continue, Codex, and Zed — so your automation isn't locked to one editor.
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