MCP server, idempotent sends, built-in drip sequences, BYOK delivery. tinysend gives AI agents (Claude Code, Cursor, Codex) everything they need to send email — without building plumbing from scratch.
Install the MCP server. Your agent can send email before you finish your coffee.
npm install -g tinysend-mcp
{
"mcpServers": {
"tinysend": {
"command": "tinysend-mcp",
"env": {
"TINYSEND_API_KEY": "ts_..."
}
}
}
}// Claude Code, no HTTP code needed <tool: send_email> to: [email protected] subject: Welcome! html: <p>You're in.</p> </tool>
Agents have different requirements than human developers. tinysend was designed with these in mind.
Claude Code, Cursor, and any MCP-compatible agent can call send_email, enroll_sequence, and check_status as native tools. No HTTP code, no auth boilerplate.
# Install once, available to all agents npx tinysend-mcp --api-key ts_live_...
Agents retry. Networks fail. tinysend deduplicates within a 24-hour window using idempotency keys. Send the same request 10 times — the user gets 1 email.
POST /v1/emails
X-Idempotency-Key: welcome-{userId}-v1
{ "to": "[email protected]", ... }Agents building real products need real deliverability. Connect your own Amazon SES, Postmark, or Mailgun account. tinysend is the API layer — you own the sender reputation and keep sending costs at AWS/Postmark rates.
Agents building SaaS products need onboarding flows. One API call enrolls a user in a multi-step sequence. tinysend handles timing, templating, and unsubscribes — the agent doesn't build a queue.
POST /v1/sequences/{id}/enroll
{
"email": "[email protected]",
"variables": { "first_name": "Alex" }
}Plain REST. No heavyweight SDK required. fetch() or curl — whichever the agent reaches for first.
// Works in any Node.js runtime — no dependencies
async function sendEmail(to, subject, html, userId) {
const res = await fetch('https://api.tinysend.co/v1/emails', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.TINYSEND_API_KEY}`,
'Content-Type': 'application/json',
'X-Idempotency-Key': `welcome-${userId}`, // safe to retry
},
body: JSON.stringify({
from: process.env.EMAIL_FROM, // your verified sender
to,
subject,
html,
}),
})
if (!res.ok) {
const err = await res.json()
// Structured errors — agents can parse these
// e.g. { code: 'domain_not_verified', message: '...' }
throw new Error(`${err.code}: ${err.message}`)
}
return res.json() // { id: 'msg_...', status: 'queued' }
}
await sendEmail(
'[email protected]',
'Welcome to the app',
'<h1>You\'re in!</h1><p>Click below to get started.</p>',
user.id,
)import os, httpx
def send_email(to: str, subject: str, html: str, idempotency_key: str) -> dict:
resp = httpx.post(
"https://api.tinysend.co/v1/emails",
headers={
"Authorization": f"Bearer {os.environ['TINYSEND_API_KEY']}",
"X-Idempotency-Key": idempotency_key,
},
json={
"from": os.environ["EMAIL_FROM"],
"to": to,
"subject": subject,
"html": html,
},
)
resp.raise_for_status()
return resp.json()
# Enroll in onboarding sequence
def enroll_onboarding(email: str, first_name: str, user_id: str) -> dict:
resp = httpx.post(
f"https://api.tinysend.co/v1/sequences/{os.environ['ONBOARDING_SEQ_ID']}/enroll",
headers={
"Authorization": f"Bearer {os.environ['TINYSEND_API_KEY']}",
"X-Idempotency-Key": f"onboard-{user_id}",
},
json={"email": email, "variables": {"first_name": first_name}},
)
resp.raise_for_status()
return resp.json()Coding agents (Claude Code, Cursor, Devin) building full-stack apps need transactional email from day one. Authentication, password resets, onboarding drips — tinysend handles all of it via API.
Automation agents running long jobs need to report outcomes. Instead of a webhook or Slack message, email is the most reliable async channel — it works regardless of what app the recipient is using.
AI agents managing customer onboarding can trigger email sequences based on product events — first login, feature activation, inactivity — without a separate marketing automation tool.
Agents running deployments, tests, or data pipelines can send structured email alerts on failures, completions, or anomalies — with full context and links back to the run.
In a Paperclip or CrewAI-style multi-agent system, one agent can trigger email to users or other agents as a coordination mechanism — event-driven, durable, and auditable.
Content agents producing regular updates (weekly digests, research briefs, reports) can send personalized emails to subscriber segments via API — no marketing dashboard required.
Most email APIs were built for human developers, not for agents running in loops. The differences matter.
| Feature | tinysend | Resend | SendGrid | Postmark |
|---|---|---|---|---|
| MCP server | Native | Community | No | No |
| Idempotency keys | Yes | Yes | No | No |
| Built-in drip sequences | Yes | No | Yes | No |
| BYOK delivery | Yes | No | No | No |
| Usage-based pricing | Yes | Yes | Tiered | Tiered |
| Structured error codes | Yes | Yes | Partial | Yes |
Agents often build products that start small. With per-email pricing and no monthly minimum, you're not paying for volume you don't have yet. Connect your own SES account and keep delivery costs at ~$0.10/1000 emails.
No monthly fee to set up your account and connect your providers
Agents can send email without a per-user pricing model penalizing volume
Use your own Amazon SES — tinysend is the API layer, SES is the delivery engine
Guide
Deep dive into MCP setup, idempotency patterns, and code examples for agent-driven email sending.
Guide
How agents building SaaS products can set up automated onboarding drips that convert trial users to paid.
Comparison
Full comparison of SendGrid, Resend, Postmark, Mailgun, and tinysend for developer use cases.
MCP server, idempotency, drip sequences, BYOK. Everything in one API. No plumbing required.