Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

mailtd

Go License

Developer-friendly CLI for Mail.td — developer email platform with REST API, WebSocket, and MCP support.

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/mailtd

Go

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

Shell (macOS / Linux)

curl -fsSL https://raw.githubusercontent.com/mailtd/mailtd-cli/main/install.sh | sh

Binary

Download from GitHub Releases.

Update

Homebrew

brew upgrade mailtd

Go

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

Shell

curl -fsSL https://raw.githubusercontent.com/mailtd/mailtd-cli/main/install.sh | sh

Quick Start

# 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>

Commands

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

MCP Server

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

mailtd mcp

Claude Code

Add to .claude/settings.json:

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

Cursor

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.

Environment Variables

Variable Description
MAILTD_API Override API base URL
MAILTD_TOKEN Override bearer token

Global Flags

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

Exit Codes

Code Meaning
0 Success
1 Error
2 Timeout

Documentation

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages