Skip to content

mailtd/mailcx-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mailcx

Go License

Developer-friendly CLI for Mail.cx — instant disposable email with REST API, WebSocket, and MCP support.

mailcx demo

Features

  • 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

Installation

Homebrew (macOS / Linux)

brew install mailtd/tap/mailcx

Go

go install github.com/mailtd/mailcx-cli@latest

Binary

Download from GitHub Releases.

Quick Start

# Create a random email instantly
mailcx quick

# Wait for the first email to arrive
mailcx wait

# Read it
mailcx read <message-id>

Commands

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

MCP Server

Run mailcx as an MCP server so AI tools can manage emails directly:

mailcx mcp

Claude Code

Add to .claude/settings.json:

{
  "mcpServers": {
    "mailcx": {
      "command": "mailcx",
      "args": ["mcp"]
    }
  }
}

Cursor

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.

Environment Variables

Variable Description
MAILCX_API Override API base URL
MAILCX_TOKEN Override bearer token

Exit Codes

Code Meaning
0 Success
1 Error
2 Timeout

Documentation

Full API docs: docs.mail.cx

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages