원클릭으로
mailclaw
// Read, search, send, and manage emails from the MailClaw inbox via the local CLI. Use when the user asks to check emails, read messages, search inbox, find emails from a sender, review recent correspondence, or send/reply to emails.
// Read, search, send, and manage emails from the MailClaw inbox via the local CLI. Use when the user asks to check emails, read messages, search inbox, find emails from a sender, review recent correspondence, or send/reply to emails.
| name | mailclaw |
| description | Read, search, send, and manage emails from the MailClaw inbox via the local CLI. Use when the user asks to check emails, read messages, search inbox, find emails from a sender, review recent correspondence, or send/reply to emails. |
| allowed-tools | Bash(mailclaw *), Bash(brew *), Bash(curl *), Bash(chmod *), Bash(uname *), Bash(sudo *) |
You have access to the local mailclaw binary CLI. Use it to read, search, and manage emails. Do not call the MailClaw HTTP API directly with curl unless the user explicitly asks for raw API requests.
By default, if mailclaw is missing, install it automatically and then continue the task.
Before doing anything else, verify the CLI exists and meets the minimum version:
mailclaw --version
send command requires CLI version >= 1.0.1. If the installed version is older, upgrade it using the install flow below before proceeding.mailclaw is missing on macOS, install it with Homebrew.mailclaw is missing on Linux, download the latest release binary and install it to /usr/local/bin/mailclaw.Run the official install script, which handles both macOS (Homebrew) and Linux (GitHub Releases) automatically:
curl -fsSL https://raw.githubusercontent.com/missuo/mailclaw/main/install.sh | bash
brew tap owo-network/brew && brew install owo-network/brew/mailclaw./usr/local/bin/mailclaw./usr/local/bin fails, the script will request elevated privileges automatically.Use the CLI to manage config instead of reading or writing ~/.mailclaw/config.json manually.
# Save credentials
mailclaw config set --host "https://mailclaw.example.com" --api-token "your-api-token-here"
# Show current config state
mailclaw config show --json
# Verify the configured host is reachable
mailclaw health --json
mailclaw config set.--host <HOST> and --api-token <TOKEN>, but prefer persisted config unless the user wants a one-off override.mailclaw is not already available on PATH.mailclaw list [--limit N] [--offset N] [--from sender@example.com] [--to inbox@example.com] [--q keyword] [--after 2026-03-01] [--before 2026-03-11] [--json]
Returns email summaries without body content. Use this for overview and browsing.
mailclaw export [same filters as list] [--json]
Returns full emails including text_content and html_content. Use this when the user wants body content for multiple emails.
mailclaw get <email_id> [--json]
Returns one full email, including body content and attachments metadata.
mailclaw attachments <email_id> [--json]
Lists attachment metadata (id, filename, mime_type, size) for an email.
mailclaw download <email_id> <attachment_id> [-o <path>] [--json]
Downloads one attachment's binary content. Without -o, it saves to the
attachment's original filename in the current directory.
mailclaw delete <email_id> [--json]
Permanently deletes an email. Always confirm with the user before deleting.
mailclaw health [--json]
Use this to verify the configured host is correct during setup.
When you pass --json, the CLI prints the payload directly, not the original HTTP { success, data } envelope.
{
"id": "clx...",
"from_address": "sender@example.com",
"to_address": "bd@example.com",
"subject": "Subject line",
"received_at": 1710000000,
"has_attachments": false,
"attachment_count": 0
}
Same as above, plus:
{
"text_content": "Plain text body...",
"html_content": "<p>HTML body...</p>"
}
{
"emails": [ ... ],
"total": 128,
"limit": 20,
"offset": 0
}
# List all recent emails
mailclaw list --json
# Search emails containing "partnership"
mailclaw list --q partnership --json
# Filter by recipient and sender
mailclaw list --to bd@example.com --from partner@company.com --json
# Get emails from the last 7 days
mailclaw list --after 2026-03-03 --json
# Export emails with full content
mailclaw export --limit 10 --json
# Read a specific email
mailclaw get clx123abc --json
# Delete an email
mailclaw delete clx123abc --json
mailclaw send --from "Name <sender@example.com>" --to recipient@example.com --subject "Subject" --text "Body text" [--html "<p>HTML body</p>"] [--cc cc@example.com] [--bcc bcc@example.com] [--reply-to reply@example.com] [--json]
Sends an email via the configured provider (Resend by default). At least --text or --html is required. Multiple --to, --cc, --bcc, and --reply-to addresses can be specified.
JSON response:
{
"id": "<provider-message-id>",
"provider": "resend"
}
mailclaw.mailclaw config show --json and mailclaw config set ...; do not manually edit the config file unless the user explicitly asks.mailclaw health --json.mailclaw list first to get an overview, then drill into specific emails with mailclaw get <id>.from, to, q, date range) rather than fetching everything.text_content over html_content for readability.limit and offset.received_at field is a Unix timestamp in seconds. Convert it to a human-readable format when presenting to the user.