resend/resend-mcp

The official MCP server to send emails and interact with Resend

Resend MCP Server – Quick Overview

What it is – A small Node‑JS service (available as the resend-mcp NPM package) that lets AI‑powered “MCP” clients such as Claude, Cursor, Copilot, or any tool that speaks the MCP (Message‑Control‑Protocol) speak directly to the Resend email‑delivery platform. In practice it turns a language model into a full‑featured email‑automation assistant: send mail, manage contacts, run broadcasts, handle inbound messages, etc.

Why it matters – Without this bridge you would have to write custom API calls inside the prompt or a separate script. The MCP server exposes a stable, language‑model‑friendly command set (the list of MCP Server Tools in the README) that the model can invoke with natural‑language instructions, letting the model act as an email‑operations manager.


Two ways to run it

Mode How it works When to use
Remote MCP server (hosted by Resend) You point your client at https://mcp.resend.com/mcp. The client opens a browser for OAuth or you supply a Resend API key. Fastest setup, ideal for web‑based agents (Claude, Cursor, etc.) where you don’t want a local process.
Local MCP server (this package) Run the server yourself via npx resend-mcp (stdio by default) or npx resend-mcp --http. You provide a Resend API key and optionally a default sender address. Needed when you want full control, run behind a firewall, or integrate into a private CI/agent environment.

Both modes expose the same tool set; the only difference is the transport (stdio vs. Streamable HTTP).


Getting started (local, stdio – the default)

# One‑liner that registers the server for any detected MCP client
npx add-mcp resend-mcp --name resend --env "RESEND_API_KEY=re_XXXXX"

Replace re_XXXXX with your Resend API key.

After that, in a client like Claude Code you can simply run:

claude mcp add resend -e RESEND_API_KEY=re_XXXXX -- npx -y resend-mcp

The client will launch the server as a child process, talk to it over stdio, and you can start using the email tools.


HTTP mode (useful for headless agents or custom proxies)

# Start the server listening on port 3000
npx -y resend-mcp --http --port 3000

Clients then connect to http://127.0.0.1:3000/mcp and send a Bearer header with their own Resend API key.

You can also embed the server in another Node service:

import { runHttp } from 'resend-mcp/http';
const server = await runHttp({ senderEmailAddress: "me@mydomain.com" }, 3000);

The server validates the Host header by default (protects DNS‑rebinding). Set --host 0.0.0.0 or --allowed-hosts when behind a reverse proxy.


What the MCP server can do (tool list)

  • Emails – send, list, cancel, update, batch‑send, attach files (local, URL, base64), schedule, tag, custom headers, idempotency.
  • Received mail – list inbound messages, download attachments.
  • Templates – CRUD operations with {{{VARIABLE}}} placeholders.
  • Contacts & Segments – manage address books, CSV imports, custom properties, topic subscriptions.
  • Broadcasts & Automations – create campaigns, track opens/clicks, schedule, preview, duplicate.
  • Events & Topics – trigger automations, manage subscription topics.
  • Domains – verify, configure tracking/TLS, manage claims.
  • Suppressions – add/remove bounce/complaint entries, manual do‑not‑contact list.
  • Webhooks – CRUD, view delivery history, replay events, rotate signing secret.
  • Logs & Usage – inspect API request logs, view quota/usage stats.
  • Editor integration – connect to Resend’s visual editor for collaborative draft editing.

All of these are exposed as MCP tools that an LLM can call with a simple JSON‑like payload, making email workflow automation a natural extension of the model’s capabilities.


Configuration knobs

Flag / Env var Purpose
--key / RESEND_API_KEY API key for stdio mode (HTTP mode gets it from the client’s Bearer token).
--sender / SENDER_EMAIL_ADDRESS Default “From” address (must belong to a verified domain).
--reply-to / REPLY_TO_EMAIL_ADDRESSES Default reply‑to addresses (repeatable).
--http Switch to HTTP transport.
--port / MCP_PORT Port for HTTP mode (default 3000).
--host / MCP_HOST Host validation for HTTP (default 127.0.0.1).
--allowed-hosts / MCP_ALLOWED_HOSTS Whitelist of Host headers when behind a proxy.
--allowed-file-dirs / MCP_ALLOWED_FILE_DIRS Directories from which the server may read local attachment files (disabled over HTTP unless set).

Who might use this?

  • Developers building AI agents that need to send transactional or marketing email without writing raw HTTP calls.
  • Teams using Claude, Cursor, Copilot, or other MCP‑compatible editors who want their LLM to manage newsletters, support tickets, or automated replies.
  • Enterprises that prefer to self‑host the bridge for compliance or to run behind a corporate proxy.

Quick cheat‑sheet for common clients

// Cursor / Claude Desktop (stdio)
{
  "mcpServers": {
    "resend": {
      "command": "npx",
      "args": ["-y", "resend-mcp"],
      "env": { "RESEND_API_KEY": "re_XXXXX" }
    }
  }
}
// HTTP mode (any client)
{
  "mcpServers": {
    "resend": {
      "url": "http://127.0.0.1:3000/mcp",
      "headers": { "Authorization": "Bearer re_XXXXX" }
    }
  }
}

Bottom line – resend-mcp is a thin, open‑source glue layer that lets modern LLM‑based assistants treat Resend’s email platform as a first‑class, command‑driven service, either via a hosted endpoint or a self‑run Node server.

Related

  • Project
  • Project
  • Project
  • Project
  • Project