How to Send Email From a Claude Agent
If you want to send email from a Claude agent without wiring up SMTP credentials or building your own dispatch pipeline, marginal handles the heavy lifting. It's a hosted email marketing MCP server that gives Claude the tools to generate, test, and send campaigns through a single endpoint.
Why use an email MCP server with Claude
Claude Desktop and Claude Code can call external tools through MCP. On its own, a Claude agent can draft an email but can't actually deliver it or measure how it performs. marginal closes that gap by exposing a small set of email tools the agent can invoke directly in conversation.
Because marginal is hosted, there's no self-hosted server to maintain and no transactional provider keys to manage by hand. You connect once with a Bearer API key and your Claude agent gains the ability to send, track, and optimize.
- generate_variants — draft subject line and body options
- launch_test — send a subject line A/B test to your list
- get_results — pull open, click, and lift metrics
- recommend_next — get a data-backed suggestion for the winning variant
Connecting Claude to marginal
Add the marginal endpoint to your Claude MCP configuration and authenticate with your API key. Once registered, the four tools appear in your agent's tool list and you can ask Claude to compose and send in plain language.
The endpoint is https://marginal.sh/mcp, and keys start with marg_live_. After that, sending email from your Claude agent is as simple as describing what you want shipped.
- Endpoint: https://marginal.sh/mcp
- Auth: Bearer API key (marg_live_...)
- Registry: sh.marginal/mcp
- Works with Claude Desktop and Claude Code
Don't just send — test as you go
The real advantage of routing email through an AI agent is that testing becomes part of the workflow. Instead of guessing at a subject line, ask Claude to generate variants and launch a subject line A/B test in one step.
marginal tracks opens and clicks for each variant and reports within-test lift, so the agent can recommend a winner rather than leaving you to read raw stats. This makes AI agent email marketing measurable from the first send.
- Generate multiple subject lines before committing
- Split your list automatically with launch_test
- Read within-test lift, not just absolute open rates
- Let recommend_next surface the best-performing variant
Getting started for free
marginal includes a free tier of 100 experiments per month, which is plenty to validate the workflow of sending email from a Claude agent before scaling up. Beyond Claude, the same MCP server works with Cursor, Codex, Windsurf, Cline, Continue, and Zed.
Full setup details, tool schemas, and examples live in the docs at https://marginal.sh/docs/ — start there once your key is in place.
- 100 experiments/month on the free tier
- Same tools across every MCP-capable client
- Docs: 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