Automate emails through MCP

Add the Resend MCP server to your agent and it gets native access to send email, manage contacts, and handle inbound messages.

Copy

import { MailtrapClient } from "mailtrap";

const client = new MailtrapClient({
  token: process.env.MAILTRAP_API_KEY,
});

async function sendEmail() {
  await client.send({
    from: {
      email: "sender@example.com",
      name: "Sender Name"
    },
    to: [{ email: "recipient@example.com" }],
    subject: "Hello from Mailtrap",
    text: "Welcome to Mailtrap!",
    html: "<h1>Welcome to Mailtrap!</h1>"
  });
}

sendEmail();

Email API with an endpoint for every workflow

RESTful endpoints to send emails, manage templates, and suppressions, track delivery via logs and webhooks — all from a single, well-documented API.

  • /send

    Send transactional emails

  • /bulk

    Send promotional emails

View All Endpoints

Copy

import { MailtrapClient } from "mailtrap";

const client = new MailtrapClient({
  token: process.env.MAILTRAP_API_KEY,
});

async function sendEmail() {
  await client.send({
    from: {
      email: "sender@example.com",
      name: "Sender Name"
    },
    to: [{ email: "recipient@example.com" }],
    subject: "Hello from Mailtrap",
    text: "Welcome to Mailtrap!",
    html: "<h1>Welcome to Mailtrap!</h1>"
  });
}

sendEmail();
View All Endpoints