Developer-friendly CLI for Mail.cx — instant disposable email 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/mailcxgo install github.com/mailtd/mailcx-cli@latestDownload from GitHub Releases.
# Create a random email instantly
mailcx quick
# Wait for the first email to arrive
mailcx wait
# Read it
mailcx read <message-id>| Command | Description |
|---|---|
mailcx quick |
Create a random email instantly |
mailcx create <addr> <pw> |
Create a specific email address |
mailcx login <addr> <pw> |
Sign in to an existing mailbox |
mailcx inbox |
List messages |
mailcx read <id> |
Read a message |
mailcx wait |
Wait for the next email |
mailcx watch |
Watch for emails in real-time |
mailcx domains |
List available domains |
mailcx accounts |
Manage saved mailboxes |
mailcx doctor |
Health check |
Pro commands
| Command | Description |
|---|---|
pro login |
Sign in to Pro account |
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 mailcx as an MCP server so AI tools can manage emails directly:
mailcx mcpAdd to .claude/settings.json:
{
"mcpServers": {
"mailcx": {
"command": "mailcx",
"args": ["mcp"]
}
}
}Add to .cursor/mcp.json:
{
"mcpServers": {
"mailcx": {
"command": "mailcx",
"args": ["mcp"]
}
}
}12 tools are exposed: list_domains, create_account, quick_account, login, whoami, inbox, read_message, delete_message, delete_account, wait_for_email, list_accounts, switch_account.
| Variable | Description |
|---|---|
MAILCX_API |
Override API base URL |
MAILCX_TOKEN |
Override bearer token |
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Error |
2 |
Timeout |
Full API docs: docs.mail.cx
MIT
