Command line

The mcpmailer CLI: mail, contacts, notes, vault, domains, and tunnels from a shell.

The CLI is the same API with a shell in front of it. It is the fastest way to check what an agent actually sent, and it is useful inside cron jobs and Makefiles where a whole runtime would be overkill.

Shell
npx @mcpmailer/cli mail:list
# or install it: npm install -g @mcpmailer/cli

export MCPMAILER_API_KEY=mmk_live_...

Everyday commands

Message bodies come from --body, from --file, or from stdin, so piping into the CLI works the way you would expect. Add --json to any command for machine-readable output.

Shell
mcpmailer mail:send --to jane@acme.com --subject "Your quote" --file quote.md
mcpmailer mail:list --unread --limit 10
mcpmailer mail:read msg_01J9X8Q2K7
mcpmailer mail:reply msg_01J9X8Q2K7 --all --body "On it."

echo "Follow up on Thursday" | mcpmailer notes:add --title "Acme"
mcpmailer secrets:totp sec_01J9X8Q2K7
mcpmailer domains:list --json

The full command list

Mail: mail:send, mail:list, mail:read, mail:thread, mail:reply, mail:forward, mail:archive, mail:search, mail:pending, mail:scheduled. Contacts: contacts:list, contacts:lookup, contacts:import (vCard or CSV, --list puts them on a list), contacts:export. Lists: lists:list, lists:create, lists:get, lists:add, lists:remove, lists:delete. Notes: notes:list, notes:add. Vault: secrets:list, secrets:get, secrets:totp. Identity: identity:show, identity:block. Workspace: inbox:list, inbox:add, domains:list, domains:add, domains:remove, webhooks:list, webhooks:add, webhooks:update, webhooks:remove. Other: tunnel, signup.

Global flags apply everywhere: --api-key overrides the environment, --base-url points at another deployment, and --json prints raw JSON. Run mcpmailer with no arguments for the built-in help.