Developer-friendly CLI for Mail.td — developer email platform with REST API, WebSocket, and MCP support.
- Instant inboxes — create a random email in one command
- Real-time — watch for new emails via WebSocket
- AI-native — built-in MCP server for Claude Code, Cursor, and other AI tools
- Pro support — custom domains, webhooks, API tokens
- Scriptable — auto JSON output in non-TTY, pipe-friendly
brew install mailtd/tap/mailtdgo install github.com/mailtd/mailtd-cli@latestcurl -fsSL https://raw.githubusercontent.com/mailtd/mailtd-cli/main/install.sh | shDownload from GitHub Releases.
brew upgrade mailtdgo install github.com/mailtd/mailtd-cli@latestcurl -fsSL https://raw.githubusercontent.com/mailtd/mailtd-cli/main/install.sh | sh# Authenticate with an API token (created at https://mail.td/pro/dashboard)
mailtd auth login td_xxxxxxxx...
# Create a random email instantly
mailtd quick
# Wait for the first email to arrive
mailtd wait
# Read it
mailtd read <message-id>| Command | Description |
|---|---|
mailtd quick |
Create a random email instantly |
mailtd create <addr> [pw] |
Create a specific email address |
mailtd inbox |
List messages |
mailtd read [id] |
Read a message |
mailtd wait |
Wait for the next email |
mailtd watch |
Watch for emails in real-time |
mailtd domains |
List available domains |
mailtd accounts |
Manage saved mailboxes |
mailtd doctor |
Health check |
Pro commands
| Command | Description |
|---|---|
auth login <token> |
Authenticate with API token |
auth logout |
Remove saved token |
pro me |
Show Pro account info |
pro accounts list |
List Pro mailboxes |
pro domains add <domain> |
Add a custom domain |
pro domains verify <id> |
Verify domain DNS |
pro webhooks create <url> |
Create a webhook |
pro tokens create <name> |
Create an API token |
Run mailtd as an MCP server so AI tools can manage emails directly:
mailtd mcpAdd to .claude/settings.json:
{
"mcpServers": {
"mailtd": {
"command": "mailtd",
"args": ["mcp"]
}
}
}Add to .cursor/mcp.json:
{
"mcpServers": {
"mailtd": {
"command": "mailtd",
"args": ["mcp"]
}
}
}11 tools are exposed: list_domains, create_account, quick_account, whoami, inbox, read_message, delete_message, delete_account, wait_for_email, list_accounts, switch_account.
| Variable | Description |
|---|---|
MAILTD_API |
Override API base URL |
MAILTD_TOKEN |
Override bearer token |
| Flag | Description |
|---|---|
--api <url> |
Override API base URL (default: https://api.mail.td) |
--token <token> |
Override bearer token |
--account <id> |
Override account ID or email address |
--json |
Force JSON output |
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Error |
2 |
Timeout |
- API docs: docs.mail.td
- SDKs: Node.js · Python · Go
MIT