Built for AI agents

The email API your AI agent can actually use

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.

Set up in 2 minutes

Install the MCP server. Your agent can send email before you finish your coffee.

1

Install the MCP server

npm install -g tinysend-mcp
2

Add to your MCP config

{
  "mcpServers": {
    "tinysend": {
      "command": "tinysend-mcp",
      "env": {
        "TINYSEND_API_KEY": "ts_..."
      }
    }
  }
}
3

Your agent sends email

// Claude Code, no HTTP code needed
<tool: send_email>
  to: [email protected]
  subject: Welcome!
  html: <p>You're in.</p>
</tool>

Everything agents need. Nothing they don't.

Agents have different requirements than human developers. tinysend was designed with these in mind.

Native MCP server

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_...

Idempotent sends — no duplicates

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]", ... }

BYOK — your own delivery backend

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.

  • Amazon SES (~$0.10/1000 emails)
  • Postmark (best inbox rates)
  • Mailgun, SMTP providers

Drip sequences in one API call

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" }
}

Works the way agents code

Plain REST. No heavyweight SDK required. fetch() or curl — whichever the agent reaches for first.

Node.js — transactional send with idempotency

// 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,
)

Python — for agent backends

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()

What agents use tinysend for

Building SaaS products

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.

Agent-to-human notifications

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.

Customer success automation

AI agents managing customer onboarding can trigger email sequences based on product events — first login, feature activation, inactivity — without a separate marketing automation tool.

CI/CD and DevOps agents

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.

Multi-agent systems

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.

AI-generated newsletters

Content agents producing regular updates (weekly digests, research briefs, reports) can send personalized emails to subscriber segments via API — no marketing dashboard required.

How tinysend compares for agentic use

Most email APIs were built for human developers, not for agents running in loops. The differences matter.

FeaturetinysendResendSendGridPostmark
MCP serverNativeCommunityNoNo
Idempotency keysYesYesNoNo
Built-in drip sequencesYesNoYesNo
BYOK deliveryYesNoNoNo
Usage-based pricingYesYesTieredTiered
Structured error codesYesYesPartialYes

Pricing that makes sense for agents

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.

$0
to start

No monthly fee to set up your account and connect your providers

Pay per send
no seat fees

Agents can send email without a per-user pricing model penalizing volume

BYOK
keep SES rates

Use your own Amazon SES — tinysend is the API layer, SES is the delivery engine

See full pricing details →

Give your agent email superpowers

MCP server, idempotency, drip sequences, BYOK. Everything in one API. No plumbing required.