About mailsend
mailsend is a CLI and MCP server for managing the sending side of a Resend account. It covers email, sending domains, API keys, audiences, and contacts through the Resend REST API.
Key features
- 01Send and look up emails
- 02Create and verify sending domains
- 03Create, list, and delete API keys
- 04Manage audiences and contacts
- 05CLI and stdio MCP server
Use cases
- 01Send an email through Resend
- 02Check email delivery records
- 03Set up and verify a sending domain
- 04Organize audience contacts
MCP support
Exposes Resend email, domain, API key, audience, and contact operations as MCP tools. It requires `RESEND_API_KEY`.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
15Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| cc | array | No | Email addresses to copy on the email (carbon copy recipients). |
| to | array | Yes | The recipient email addresses to send the email to. |
| bcc | array | No | Email addresses to blind-copy on the email (hidden recipients). |
| from | string | Yes | The sender email address, optionally in 'Name <[email protected]>' format. |
| html | string | No | The HTML body of the email. |
| text | string | No | The plain-text body of the email. |
| subject | string | Yes | The subject line of the email. |
| reply_to | string | No | The email address replies to this email should be sent to. |
Details
From the project READMEmailsend
mailsend lets an agent run the sending side of a Resend account: send a message and look it back up, set up a sending domain and start its DNS verification, mint or retire API keys, and keep audiences and their contacts in order. Each operation is one call against the Resend REST API, and the API's JSON answer comes back as-is. It runs from the command line or as an MCP server for agents.
A Resend API key is required. Put it in the RESEND_API_KEY
environment variable; the key is sent to the API as a Bearer token and
never appears in output. When the variable is missing, every operation
fails with an error that names it.
Install
npx @reneturcios/mailsend list-domains
Or run the container image:
docker run -i -e RESEND_API_KEY ghcr.io/cloudcorprecords/mailsend
The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.
CLI
export RESEND_API_KEY="your API key"
mailsend send --from "Acme <[email protected]>" --to [email protected] \
--subject "Welcome" --text "Hello there"
mailsend list-emails --limit 10
mailsend list-domains
mailsend list-audiences
mailsend --version
Exit codes: 0 on success, 1 when an API call fails (including a
missing RESEND_API_KEY), 2 for usage errors.
MCP server
One bin serves both faces. The mcp subcommand starts a stdio MCP
server:
npx -y @reneturcios/mailsend mcp
MCP client configuration:
{
"mcpServers": {
"mailsend": {
"command": "npx",
"args": ["-y", "@reneturcios/mailsend", "mcp"],
"env": { "RESEND_API_KEY": "your API key" }
}
}
}
Tools
| Tool | Input | What it does |
|---|---|---|
send_email | from, to (array), subject (required); html, text, cc, bcc, reply_to (optional) | Send an email. |
list_emails | limit (integer, optional) | List sent emails. |
get_email | id (required) | Get one sent email by ID. |
create_domain | name (required), region (optional) | Create a sending domain. |
list_domains | — | List sending domains. |
get_domain | id (required) | Get one domain, including its DNS records. |
verify_domain | id (required) | Start DNS verification for a domain. |
delete_domain | id (required) | Delete a sending domain. |
create_api_key | name (required), permission, domain_id (optional) | Create an API key. |
list_api_keys | — | List API keys. |
delete_api_key | id (required) | Delete an API key. |
create_audience | name (required) | Create an audience. |
list_audiences | — | List audiences. |
create_contact | audience_id, email (required); first_name, last_name, unsubscribed (optional) | Add a contact to an audience. |
list_contacts | audience_id (required), limit (optional) | List contacts in an audience. |
This is a documented core subset of the Resend platform surface. The hosted Resend MCP also covers broadcasts, templates, webhooks, segments, topics, contact properties, batch sending, and received (inbound) email; those groups are not implemented here.
Development
npm install
npm run build # tsc -> dist/
npm test # node test runner over test/*.test.ts, no network (fake fetch fixtures)
npm run dev # run the CLI from source via tsx
License
MIT — see LICENSE.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.