Use Sukhovei Mail from your code, terminal or AI tool
One service, three ways in: a REST API, a command line and an MCP server.
What it does
Three things you get, in plain words.
A plain REST API
Send JSON over HTTPS with your API key. It works from any language. Errors always say what went wrong and how to fix it.
A command line
Create inboxes, add domains, make API keys and wait for an email from your terminal.
An MCP server
Let Claude Code, Cursor or Codex use your inboxes directly. MCP is the standard way for AI tools to call outside services.
Pick the way that fits your work
All three use the same account and the same API key. Start with the one you already know.
# Create an inbox. Every call sends your API key as a bearer token.
curl -X POST https://api.mailbay.dev/v1/inboxes \
-H "Authorization: Bearer $MAILBAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"local_part": "support"}'
# Send an email. The same Idempotency-Key never sends twice.
curl https://api.mailbay.dev/v1/emails \
-H "Authorization: Bearer $MAILBAY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <noreply@acme.com>",
"to": ["ada@example.com"],
"subject": "Your receipt",
"text": "Thanks for your order."
}'# When a call fails, the body always looks like this:
{
"error": {
"code": "sender_not_verified",
"message": "unverified.dev is not a domain of this project.",
"fix": "Add the domain with `mailbay domain add unverified.dev`, then verify it."
}
}# The CLI is not on a package registry yet. Build it from a checkout of the repository:
cargo install --path crates/cli
mailbay login # paste your API key, it is checked and saved
mailbay inbox create support
mailbay inbox list
mailbay wait ibx_01jbz8w4k2q9 --timeout 2m # prints the next email and any codes in it
mailbay domain add acme.com# Claude Code
claude mcp add --transport http mailbay https://mcp.mailbay.dev/mcp \
--header "Authorization: Bearer $MAILBAY_API_KEY"
# Cursor: add this to ~/.cursor/mcp.json
{
"mcpServers": {
"mailbay": {
"url": "https://mcp.mailbay.dev/mcp",
"headers": { "Authorization": "Bearer mb_live_..." }
}
}
}// The package is in our repository and is not on npm yet.
import { Mailbay } from "mailbay";
const mailbay = new Mailbay(); // reads MAILBAY_API_KEY
const { id } = await mailbay.emails.send({
from: "Acme <noreply@acme.com>",
to: "bob@example.com",
subject: "Your receipt",
html: "<p>Thanks for your order.</p>",
});# Already use the Resend SDK? Keep your code and change two settings:
RESEND_BASE_URL=https://api.mailbay.dev/v1
RESEND_API_KEY=mb_live_xxxxxxxxx # a Sukhovei Mail API keyThe MCP server has 15 tools, such as create_inbox, send_email, reply and wait_for_email. Lists use a cursor, so you ask for the next page with the cursor from the last one. A live WebSocket stream sends events as they happen.
Who it is for
Pick the page closest to what you are building.
Limits, honestly
What it does not do, so you can decide before you start.
- The Node SDK (package name mailbay) is in our repository but is not published to npm yet, so npm install will not find it.
- There is no SDK for Python, Go, PHP, Ruby, Java, Rust or .NET. The REST API is plain HTTP, so it works from any language.
- We do not publish an OpenAPI spec file.
- The CLI is built from source today. It has no send, reply, webhook or suppression commands. Use the API for those.
- The MCP server signs in with an API key. OAuth sign-in is planned and is not available yet.
- API keys are for servers and agents, never for browsers. Keep them in .env files. Signing in to the dashboard does not use one.
Questions
Which one should I start with?
If you are writing an app, start with the REST API. If you want to try things by hand, use the CLI. If an AI tool should do the work, connect the MCP server.
Can I install the Node SDK from npm?
Not yet. The package is in our repository and is not published. For now call the REST API with fetch, or use the Resend SDK pointed at our API.
How do I install the CLI?
Build it from a checkout of the Sukhovei Mail repository with cargo install --path crates/cli. It is not on a package registry yet. Then run mailbay login and paste your API key.
Can I use my existing Resend code?
Mostly, yes. Set RESEND_BASE_URL to https://api.mailbay.dev/v1. We tested emails.send and emails.get this way.
Try it on the free plan.
The free plan has 3 inboxes, 3,000 emails a month and 3 custom domains. No card needed.