← All integrations

Resend MCP integration for AI agents

Anlyon's Resend integration gives an AI agent Resend tools over MCP or through Anlyon's API: it can send email from your domain. Each of your users connects their own Resend account with a key they create in Resend, and your company's account connects the same way. Your agent calls each action by name and never holds the key.

Let an agent send email with a ceiling on how many people it can reach. Every recipient counts against the limit, a repeated request sends nothing twice, and a send is confirmed from Resend's own record.

Resendsecret · RESEND
host
api.resend.com
connect
API key, per user
  • Send email

    resend-send-email

  • Reschedule email

    resend-reschedule-email

  • Cancel scheduled email

    resend-cancel-scheduled-email

  • Create contact

    resend-create-contact

writes are off until switched on

What can an AI agent do in Resend? Writes are off until you switch them on.

Each one is a named operation from the pack. Reads change nothing.

Writes

  • Send email

    read back

    resend-send-email

    Send one email from an address on the sending domain fixed at install, to up to 50 recipients, with a subject and an html or text body. Counted in emails, one per recipient across to, cc and bcc; Resend's idempotency key and a read-back of the sent email grade the receipt. A sent email cannot be recalled.

  • Reschedule email

    acknowledged

    resend-reschedule-email

    Move one scheduled email to a new send time, an ISO 8601 time at most 30 days ahead. Only an email that is still scheduled can be changed.

  • Cancel scheduled email

    read back

    resend-cancel-scheduled-email

    Cancel one scheduled email so it is never sent; a canceled email cannot be rescheduled.

  • Create contact

    read back

    resend-create-contact

    Create one contact with this email, and optionally a first and last name and whether they are unsubscribed from broadcasts.

  • Update contact name

    read back

    resend-update-contact-name

    Set one contact's first and last name; pass both, the current value for the one that does not change.

  • Set contact subscription

    read back

    resend-set-contact-subscription

    Unsubscribe one contact from all broadcasts (unsubscribed: true) or subscribe them again (false).

  • Delete contact

    acknowledged

    resend-delete-contact

    Delete one contact by id, removing them from every segment. This cannot be undone.

  • Add contact to segment

    read back

    resend-add-contact-to-segment

    Add one existing contact to one segment, so broadcasts to that segment reach them.

  • Remove contact from segment

    read back

    resend-remove-contact-from-segment

    Remove one contact from one segment; the contact itself is kept.

Reads

  • List emails

    resend-list-emails

    List sent and scheduled emails, newest first: id, from, to, subject, created_at, last_event and scheduled_at, without bodies or tags (use get-email). 20 per page; when has_more is true, pass the last email's id as after for the next page.

  • Get email

    resend-get-email

    Get one sent or scheduled email by id: from, to, cc, bcc, subject, html and text bodies, tags, last_event (for example delivered, bounced, scheduled) and scheduled_at. A long body can be cut at the response limit.

  • List domains

    resend-list-domains

    List the account's sending domains with their verification status, region and capabilities. 20 per page; when has_more is true, pass the last domain's id as after for the next page.

  • Get domain

    resend-get-domain

    Get one domain by id: its status, tracking settings, capabilities and the DNS records (SPF, DKIM, tracking) with each record's verification status.

  • List contacts

    resend-list-contacts

    List contacts, optionally only those in one segment: id, email, first and last name, created_at and whether they unsubscribed. 20 per page; when has_more is true, pass the last contact's id as after for the next page.

  • Get contact

    resend-get-contact

    Get one contact by id or by email address: name, whether they unsubscribed from broadcasts, created_at and custom properties.

  • List segments

    resend-list-segments

    List the account's segments (the groups of contacts broadcasts are sent to): id, name and created_at. 20 per page; when has_more is true, pass the last segment's id as after for the next page.

  • Get segment

    resend-get-segment

    Get one segment by id: its name and created_at. Use list-contacts with segment_id for its members.

  • List contact segments

    resend-list-contact-segments

    List the segments one contact belongs to. 20 per page; when has_more is true, pass the last segment's id as after for the next page.

How do users connect? Each one brings their own Resend.

  1. 1.Call for the userYour server invokes the action for the signed-in user. Without a Resend connection, the SDK throws EndUserNotConnectedError with a connect link.
  2. 2.The user pastes a keyThe link opens a form that shows where in Resend's settings to create the key. The link lasts 10 minutes and works once.
  3. 3.Anlyon checks itThe key is checked with Resend before it is kept, and bound to api.resend.com. It is never shown back.
  4. 4.Your server confirmsYour server confirms the connection for the user who is signed in, and the call goes through.

How do I control what an AI agent does in Resend? Suggested limits and approvals, for you to review.

Suggested limits

  • 100 emails a day
  • 50 emails rescheduled a day
  • 50 scheduled emails canceled a day
  • 200 contacts created a day
  • 200 contacts renamed a day
  • 200 contact subscriptions changed a day
  • 20 contacts deleted a day
  • 200 contacts added to segments a day
  • 200 contacts removed from segments a day

Suggested approvals

  • A person approves sending an email
  • A person approves canceling a scheduled email
  • A person approves deleting a contact
  • A person approves subscribing a contact again

What the key must allow

  • An API key with Full access
  • A sending-only key cannot read an email back, so a send could never be confirmed

Good to know

  • The from address must be on the domain you name. Anlyon refuses any other before sending.
  • A receipt says Resend accepted and recorded the email. It does not say the email reached an inbox.

For your own account

  1. 1.In Resend, open API Keys and create a key with Full access.
  2. 2.In Anlyon, open Actions, then Integrations, choose Resend and paste the key.
  3. 3.Anlyon checks the key with Resend before storing it. It becomes a secret named RESEND, bound to api.resend.com.
  4. 4.Declare one action with the Resend adapter and name your verified sending domain.

How do I call Resend from my agent's code? For one of your users, or for your own account.

Act for one of your users from your server, or connect your company's own Resend with the CLI.

resend.ts
import { Client, EndUserNotConnectedError } from "@anlyonhq/sdk";const anlyon = new Client({ apiKey: process.env.ANLYON_API_KEY! });try {  const { data } = await anlyon    .forUser(session.userId)    .actions.invoke("resend-send-email", {      from: "Acme <hello@acme.com>",      to: [        "sam@example.com"      ],      subject: "Your refund is on its way",      html: "<p>Hi Sam, we refunded your order.</p>"    });  return { status: "done", grade: data.grade };} catch (error) {  if (error instanceof EndUserNotConnectedError) {    // The user connects their own Resend, then you call again.    return { status: "connect_required", url: error.connectUrl };  }  throw error;}

Questions. Resend and AI agents.

Anything still unanswered is worth an email.

support@anlyon.com

Email us

Connect a Resend account in Anlyon, switch on the operations the agent may use, and call them from the TypeScript or Python SDK or over MCP. Each of your users connects their own account through a connect link, where they paste a key they create in Resend. Your agent sees the operations by name and never sees the credential.

Through Anlyon it can send email from your domain. Reads change nothing. Writes are off until you switch them on, and every write leaves a receipt.

Yes. Every Resend action you enable is also an MCP tool on Anlyon's hosted MCP server, at https://api.anlyon.com/mcp. Add that address to Claude Code, Cursor or Codex and sign in. It is Anlyon's own integration, and it calls Resend's API with the key Anlyon holds.

No. The key stays with Anlyon and is sent only in the request to Resend's API. No API returns it, to you, to the console or to an agent.

Let your agent act for your users, safely.

A few lines of server code, then send a user a connect link. Nothing to host.

$ claude mcp add --transport http anlyon https://api.anlyon.com/mcp