Skip to content
Back to search

resend-mcp

The official MCP server to send emails and interact with Resend

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/resend/resend-mcp with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/resend/resend-mcp'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/resend--resend-mcp/badge.svg)](/listings/resend--resend-mcp)

HTML

<a href="/listings/resend--resend-mcp"><img src="/api/listings/resend--resend-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Install for all detected/selected agents and editors:

npx add-mcp resend-mcp --name resend --env "RESEND_API_KEY=re_xxxxxxxxx"

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 545 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Resend MCP Server
  2. [![npm version](https://img.shields.io/npm/v/resend-mcp)](https://www.npmjs.com/package/resend-mcp)
  3. Connect your AI agent to the [Resend](https://resend.com/) platform. Send and receive emails, manage contacts, broadcasts, domains, and more, directly from any MCP client like Claude, Cursor, or Claude Code.
  4. We offer both a [remote MCP server](#remote-mcp-server) hosted by Resend and a [local MCP server](#local-mcp-server) (this package).
  5. ## Remote MCP Server
  6. Resend hosts the MCP server at:
  7. ```
  8. https://mcp.resend.com/mcp
  9. ```
  10. Connect any MCP client that supports remote servers (Streamable HTTP). There's nothing to install and no local process to run, which makes it the best option for web-based clients like Claude and hosted agent platforms.
  11. When you connect, your client opens a browser window to log in to Resend and approve access using OAuth.
  12. ### Claude Code
  13. ```bash
  14. claude mcp add --transport http resend https://mcp.resend.com/mcp
  15. ```
  16. Then run `/mcp` in Claude Code and select **resend** to complete the OAuth login.
  17. ### Claude
  18. In Claude (web or desktop), open **Settings** > **Connectors** > **Add custom connector** and enter:
  19. ```
  20. https://mcp.resend.com/mcp
  21. ```
  22. ### Cursor
  23. Open the command palette and choose "Cursor Settings" > "MCP" > "Add new global MCP server".
  24. ```json
  25. {
  26. "mcpServers": {
  27. "resend": {
  28. "url": "https://mcp.resend.com/mcp"
  29. }
  30. }
  31. }
  32. ```
  33. ### Codex
  34. ```bash
  35. codex mcp add resend --url https://mcp.resend.com/mcp
  36. ```
  37. ### Copilot
  38. To use GitHub Copilot in VS Code, add the following to your `settings.json`:
  39. ```json
  40. {
  41. "mcp": {
  42. "servers": {
  43. "resend": {
  44. "type": "http",
  45. "url": "https://mcp.resend.com/mcp"
  46. }
  47. }
  48. }
  49. }
  50. ```
  51. ### Windsurf
  52. ```json
  53. {
  54. "mcpServers": {
  55. "resend": {
  56. "serverUrl": "https://mcp.resend.com/mcp"
  57. }
  58. }
  59. }
  60. ```
  61. ### Warp
  62. In Warp's Settings, navigate to **Agents** > **MCP servers**, and click **+Add** to add a new server.
  63. ```json
  64. {
  65. "resend": {
  66. "serverUrl": "https://mcp.resend.com/mcp"
  67. }
  68. }
  69. ```
  70. ### Authenticating with an API key
  71. If your client runs somewhere a browser login isn't possible (a server, CI, or a headless agent), pass a [Resend API key](https://resend.com/api-keys) as a Bearer token instead of using OAuth.
  72. **Claude Code:**
  73. ```bash
  74. claude mcp add --transport http resend https://mcp.resend.com/mcp --header "Authorization: Bearer re_xxxxxxxxx"
  75. ```
  76. **JSON config** (Cursor, Windsurf, and others), add an `Authorization` header:
  77. ```json
  78. {
  79. "mcpServers": {
  80. "resend": {
  81. "url": "https://mcp.resend.com/mcp",
  82. "headers": {
  83. "Authorization": "Bearer re_xxxxxxxxx"
  84. }
  85. }
  86. }
  87. }
  88. ```
  89. ## Local MCP Server
  90. The hosted server runs the same open-source code that's available on NPM as [`resend-mcp`](https://www.npmjs.com/package/resend-mcp). If you prefer to run the server yourself, you can integrate it into any supported MCP client using `npx`. You'll need to:
  91. - [Create an API key](https://resend.com/api-keys)
  92. - [Verify your domain](https://resend.com/domains)
  93. The local server supports two transport modes: **stdio** (default) and **HTTP**.
  94. Choose your preferred mode and client below to get started. Remember to replace `re_xxxxxxxxx` with your actual API key.
  95. ### Stdio Transport (Default)
  96. #### Quick Setup
  97. Install for all detected/selected agents and editors:
  98. ```bash
  99. npx add-mcp resend-mcp --name resend --env "RESEND_API_KEY=re_xxxxxxxxx"
  100. ```
  101. #### Claude Code
  102. ```bash
  103. claude mcp add resend -e RESEND_API_KEY=re_xxxxxxxxx -- npx -y resend-mcp
  104. ```
  105. #### Codex
  106. ```bash
  107. codex mcp add resend \
  108. --env RESEND_API_KEY=re_xxxxxxxxx \
  109. -- npx -y resend-mcp
  110. ```
  111. #### Cursor
  112. Open the command palette and choose "Cursor Settings" > "MCP" > "Add new global MCP server".
  113. ```json
  114. {
  115. "mcpServers": {
  116. "resend": {
  117. "command": "npx",
  118. "args": ["-y", "resend-mcp"],
  119. "env": {
  120. "RESEND_API_KEY": "re_xxxxxxxxx"
  121. }
  122. }
  123. }
  124. }
  125. ```
  126. #### Claude Desktop
  127. Open Claude Desktop settings > "Developer" tab > "Edit Config".
  128. ```json
  129. {
  130. "mcpServers": {
  131. "resend": {
  132. "command": "npx",
  133. "args": ["-y", "resend-mcp"],
  134. "env": {
  135. "RESEND_API_KEY": "re_xxxxxxxxx"
  136. }
  137. }
  138. }
  139. }
  140. ```
  141. #### Copilot
  142. To use GitHub Copilot in VS Code, add the following to your `settings.json`:
  143. ```json
  144. {
  145. "mcp": {
  146. "servers": {
  147. "resend": {
  148. "command": "npx",
  149. "args": ["-y", "resend-mcp"],
  150. "env": {
  151. "RESEND_API_KEY": "re_xxxxxxxxx"
  152. }
  153. }
  154. }
  155. }
  156. }
  157. ```
  158. #### Gemini CLI
  159. ```json
  160. {
  161. "mcpServers": {
  162. "resend": {
  163. "command": "npx",
  164. "args": ["-y", "resend-mcp"],
  165. "env": {
  166. "RESEND_API_KEY": "re_xxxxxxxxx"
  167. }
  168. }
  169. }
  170. }
  171. ```
  172. #### OpenCode
  173. Add to your `opencode.json` config:
  174. ```json
  175. {
  176. "$schema": "https://opencode.ai/config.json",
  177. "mcp": {
  178. "resend": {
  179. "type": "local",
  180. "command": ["npx", "-y", "resend-mcp"],
  181. "enabled": true,
  182. "environment": {
  183. "RESEND_API_KEY": "re_xxxxxxxxx"
  184. }
  185. }
  186. }
  187. }
  188. ```
  189. #### Windsurf
  190. ```json
  191. {
  192. "mcpServers": {
  193. "resend": {
  194. "command": "npx",
  195. "args": ["-y", "resend-mcp"],
  196. "env": {
  197. "RESEND_API_KEY": "re_xxxxxxxxx"
  198. }
  199. }
  200. }
  201. }
  202. ```
  203. #### Devin
  204. In Devin, open **Settings** > **Connections** > **MCP Servers** and click **Add a custom MCP**. See the [Devin guide](https://resend.com/docs/guides/devin) for the full step-by-step.
  205. ```json
  206. {
  207. "mcpServers": {
  208. "resend": {
  209. "command": "npx",
  210. "args": ["-y", "resend-mcp"],
  211. "env": {
  212. "RESEND_API_KEY": "re_xxxxxxxxx",
  213. "SENDER_EMAIL_ADDRESS": "onboarding@resend.dev"
  214. }
  215. }
  216. }
  217. }
  218. ```
  219. ### HTTP Transport
  220. Run the server over HTTP for remote or web-based integrations, for example behind your own tunnel or reverse proxy, instead of using Resend's [hosted remote MCP server](#remote-mcp-server). In HTTP mode, each client authenticates by passing their Resend API key as a Bearer token in the `Authorization` header.
  221. Start the server:
  222. ```bash
  223. npx -y resend-mcp --http --port 3000
  224. ```
  225. The server will listen on `http://127.0.0.1:3000` and expose the MCP endpoint at `/mcp` using Streamable HTTP.
  226. #### Claude Code
  227. ```bash
  228. claude mcp add resend --transport http http://127.0.0.1:3000/mcp --header "Authorization: Bearer re_xxxxxxxxx"
  229. ```
  230. #### Cursor
  231. Open the command palette and choose "Cursor Settings" > "MCP" > "Add new global MCP server".
  232. ```json
  233. {
  234. "mcpServers": {
  235. "resend": {
  236. "url": "http://127.0.0.1:3000/mcp",
  237. "headers": {
  238. "Authorization": "Bearer re_xxxxxxxxx"
  239. }
  240. }
  241. }
  242. }
  243. ```
  244. You can also set the port via the `MCP_PORT` environment variable:
  245. ```bash
  246. MCP_PORT=3000 npx -y resend-mcp --http
  247. ```
  248. #### Use as a library
  249. The HTTP transport is also exported so it can be embedded in another service instead of being run via the CLI. Each connecting client authenticates with its own Resend API key passed as a Bearer token.
  250. ```ts
  251. import { runHttp } from 'resend-mcp/http';
  252. // Options are optional — pass `senderEmailAddress` / `replierEmailAddresses`
  253. // to set defaults. Binds the port and returns the Node http.Server, exposing
  254. // the MCP endpoint at POST/GET/DELETE /mcp and a GET /health check.
  255. const server = await runHttp({}, 3000);
  256. ```
  257. By default the server applies localhost-only `Host` validation (DNS-rebinding
  258. protection). When deploying behind a reverse proxy or load balancer, where the
  259. server is protected by the per-request Bearer API key, set `host` to `0.0.0.0`
  260. so the proxy's forwarded `Host` and load-balancer health checks aren't rejected
  261. with `403 Invalid Host`:
  262. ```ts
  263. const server = await runHttp({}, 3000, { host: '0.0.0.0' });
  264. // or pin specific hostnames instead of disabling validation:
  265. const server = await runHttp({}, 3000, { allowedHosts: ['mcp.example.com'] });
  266. ```
  267. Via the CLI this maps to `--host` / `--allowed-hosts` (or `MCP_HOST` /
  268. `MCP_ALLOWED_HOSTS`).
  269. ### Options
  270. You can pass additional arguments to configure the local server:
  271. - `--key`: Your Resend API key (stdio mode only, since HTTP mode uses the Bearer token from the client)
  272. - `--sender`: Default sender email address from a verified domain
  273. - `--reply-to`: Default reply-to email address (can be specified multiple times)
  274. - `--http`: Use HTTP transport instead of stdio (default: stdio)
  275. - `--port`: HTTP port when using `--http` (default: 3000, or `MCP_PORT` env var)
  276. - `--host`: Host for DNS-rebinding protection when using `--http` (default: `127.0.0.1`, or `MCP_HOST`). Set to `0.0.0.0` to disable `Host` validation behind a proxy/load balancer.
  277. - `--allowed-hosts`: Comma-separated `Host` allow-list when using `--http` (or `MCP_ALLOWED_HOSTS`)
  278. - `--allowed-file-dirs`: Comma-separated directories that local file attachments and CSV imports may be read from (or `MCP_ALLOWED_FILE_DIRS`). Unrestricted on stdio when unset; always disabled over `--http` unless set.
  279. **Environment variables:**
  280. - `RESEND_API_KEY`: Your Resend API key (required for stdio, optional for HTTP since clients pass it via Bearer token)
  281. - `SENDER_EMAIL_ADDRESS`: Default sender email address from a verified domain (optional)
  282. - `REPLY_TO_EMAIL_ADDRESSES`: Comma-separated reply-to email addresses (optional)
  283. - `MCP_PORT`: HTTP port when using `--http` (optional)
  284. - `MCP_HOST`: Host for DNS-rebinding protection when using `--http` (optional)
  285. - `MCP_ALLOWED_HOSTS`: Comma-separated `Host` allow-list when using `--http` (optional)
  286. - `MCP_ALLOWED_FILE_DIRS`: Comma-separated directories local files may be read from (optional)
  287. > [!NOTE]
  288. > If you don't provide a sender email address, the MCP server will ask you to provide one each time you call the tool.
  289. > [!WARNING]
  290. > `send-email` (`attachments[].filePath`) and `create-contact-import` (`filePath`) read local files. Over `--http` this is disabled by default so remote clients can't read the server's disk; use `--allowed-file-dirs` to opt in for specific directories. On stdio, set `--allowed-file-dirs` to stop a prompt-injected agent from attaching files outside the folders you choose.
  291. ## MCP Server Tools
  292. Resend's MCP server gives your AI agent native access to the full Resend platform through a single integration. You can manage all aspects of your email infrastructure using natural language.
  293. - **Emails**: Send, list, get, cancel, update, share, and batch send emails. Retrieve delivery and engagement metrics. Supports HTML, plain text, attachments (local file, URL, or base64), CC/BCC, reply-to, scheduling, tags, custom headers, topic-based sending, and idempotency keys.
  294. - **Received Emails**: List and read inbound emails. List and download received email attachments.
  295. - **Inboxes**: Create, list, get, update, and remove inboxes. Read and update the inbox agent settings. List, search, get, update, and remove threads, and add, set, or remove their labels. List and get thread emails, and reply to or forward them with attachments and custom headers. Create, list, update, and remove labels. Create, list, get, update, remove, and send drafts, with attachments from base64 content or a URL. Send a new email from an inbox to start a thread. Supports idempotency keys when replying, forwarding, creating drafts, sending drafts, and sending new emails.
  296. - **Templates**: Create, list, get, update, publish, duplicate, and remove email templates. Supports composing template content and `{{{VARIABLE}}}` placeholders.
  297. - **Contacts**: Create, list, get, update, and remove contacts. Manage segment memberships, topic subscriptions, and CSV contact imports. Supports custom contact properties.
  298. - **Broadcasts**: Create, send, cancel, duplicate, list, get, update, and remove broadcast campaigns. List a broadcast's clicked links, and its recipients by event type (sent, delivered, opened, clicked, bounced, complained, unsubscribed, suppressed). Supports scheduling, personalization placeholders, and preview text.
  299. - **Automations**: Create, list, get, update, duplicate, and remove automations. Review the runs of an automation.
  300. - **Events**: Send events to trigger automations for a contact. Create, update, and remove event definitions.
  301. - **Domains**: Create, list, get, update, remove, and verify sender domains. Configure tracking, TLS, and sending/receiving capabilities. Create and verify domain claims.
  302. - **Segments**: Create, list, get, update, and remove audience segments.
  303. - **Suppressions**: List, get, add, and remove suppression list entries, individually or in batch. Hard bounces and spam complaints are suppressed automatically; add addresses manually to honor do-not-contact requests.
  304. - **Topics**: Create, list, get, update, and remove subscription topics.
  305. - **Contact Properties**: Create, list, get, update, and remove custom contact attributes.
  306. - **API Keys**: Create, list, update, and remove API keys.
  307. - **Webhooks**: Create, list, get, update, and remove webhooks for event notifications, and inspect their delivery history — the events sent to a webhook, one event's payload, and the attempts made to deliver it. Replay an event to queue another delivery, and rotate a webhook's signing secret.
  308. - **Logs**: List and inspect API request logs, including full request and response bodies.
  309. - **Usage**: Retrieve account-level usage and quota information: emails, contacts, segments, broadcasts, AI credits, automation runs, domains, and the API rate limit.
  310. - **Editor**: Connect to (and disconnect from) the visual editor in the Resend dashboard, and read a draft's content while collaborating on broadcasts and templates.
  311. ## Local Development
  312. 1. Clone this project and build:
  313. ```
  314. git clone https://github.com/resend/resend-mcp.git
  315. pnpm install
  316. pnpm run build
  317. ```
  318. 2. To use the local build, replace the `npx` command with the path to your local build:
  319. **Claude Code (stdio):**
  320. ```bash
  321. claude mcp add resend -e RESEND_API_KEY=re_xxxxxxxxx -- node ABSOLUTE_PATH_TO_PROJECT/dist/index.js
  322. ```
  323. **Claude Code (HTTP):**
  324. ```bash
  325. claude mcp add resend --transport http http://127.0.0.1:3000/mcp --header "Authorization: Bearer re_xxxxxxxxx"
  326. ```
  327. **Cursor / Claude Desktop (stdio):**
  328. ```json
  329. {
  330. "mcpServers": {
  331. "resend": {
  332. "command": "node",
  333. "args": ["ABSOLUTE_PATH_TO_PROJECT/dist/index.js"],
  334. "env": {
  335. "RESEND_API_KEY": "re_xxxxxxxxx"
  336. }
  337. }
  338. }
  339. }
  340. ```
  341. **Cursor (HTTP):**
  342. ```json
  343. {
  344. "mcpServers": {
  345. "resend": {
  346. "url": "http://127.0.0.1:3000/mcp",
  347. "headers": {
  348. "Authorization": "Bearer re_xxxxxxxxx"
  349. }
  350. }
  351. }
  352. }
  353. ```
  354. ### Live Testing with an MCP Client
  355. When developing, you can test changes in a real MCP client session while editing code in another.
  356. The idea: run `tsc --watch` to continuously rebuild `dist/`, and point a separate MCP client at the built `dist/index.js` from a different directory. When you want to pick up code changes, restart the MCP client session (MCP servers are long-lived stdio processes that don't hot-reload).
  357. **Example with Claude Code:**
  358. 1. Run the TypeScript watcher to auto-rebuild on save:
  359. ```bash
  360. pnpm tsc --watch
  361. ```
  362. 2. In a separate directory, create a `.mcp.json` pointing at the build output:
  363. ```bash
  364. mkdir -p /tmp/mcp-test
  365. ```
  366. ```json
  367. // /tmp/mcp-test/.mcp.json
  368. {
  369. "mcpServers": {
  370. "resend-dev": {
  371. "command": "node",
  372. "args": ["/absolute/path/to/resend-mcp/dist/index.js"],
  373. "env": {
  374. "RESEND_API_KEY": "re_xxxxxxxxx"
  375. }
  376. }
  377. }
  378. }
  379. ```
  380. 3. Start Claude Code from that directory and use the MCP tools. After making code changes, start a new Claude Code session to pick up the new build.
  381. The same principle applies to any MCP client — separate your test environment from your dev environment, use an absolute path to `dist/index.js`, and reconnect the MCP server after rebuilding.
  382. ### Testing with MCP Inspector
  383. > **Note:** Make sure you've built the project first (see [Local Development](#local-development) section above).
  384. #### Using Stdio Transport
  385. 1. Set your API key:
  386. ```bash
  387. export RESEND_API_KEY=re_your_key_here
  388. ```
  389. 2. Start the inspector:
  390. ```bash
  391. pnpm inspector
  392. ```
  393. 3. In the browser (Inspector UI):
  394. - Choose **stdio** (launch a process).
  395. - **Command:** `node`
  396. - **Args:** `dist/index.js` (or the full path to `dist/index.js`)
  397. - **Env:** `RESEND_API_KEY=re_your_key_here` (or leave blank if you already exported it in the same terminal).
  398. - Click **Connect**, then use "List tools" to verify the server is working.
  399. #### Using HTTP Transport
  400. 1. Start the HTTP server in one terminal:
  401. ```bash
  402. node dist/index.js --http --port 3000
  403. ```
  404. 2. Start the inspector in another terminal:
  405. ```bash
  406. pnpm inspector
  407. ```
  408. 3. In the browser (Inspector UI):
  409. - Choose **Streamable HTTP** (connect to URL).
  410. - **URL:** `http://127.0.0.1:3000/mcp`
  411. - Add a custom header: `Authorization: Bearer re_your_key_here` and activate the toggle.
  412. - Click **Connect**, then use "List tools" to verify the server is working.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.