MCP server exposing the MailX API to AI agents (Claude, etc.). Tools are organized in three risk tiers — read, prepare, execute — so an agent can inspect and check things safely before ever taking an action with a real side effect.
{
"mcpServers": {
"mailx": {
"command": "npx",
"args": ["-y", "@usemailx/mcp"],
"env": {
"MAILX_API_KEY": "mx_...",
"MAILX_API_BASE_URL": "https://api.mailx.dev/v1"
}
}
}
}MAILX_API_BASE_URL defaults to the hosted API; override it to point at a self-hosted
MailX instance. Use an API key scoped to only what the agent should be able to do (see
MailX's scope model) — this server enforces nothing itself beyond what the key allows.
Read (no side effects):
whoami— the authenticated organization and this API key's own identity/scopeslist_domains/get_domainlist_templates/get_templatelist_emails/get_emailget_email_events— diagnose an email's delivery: timeline + per-attempt SMTP outcomelist_webhooks
Prepare (computes something, still no side effects):
preview_template— render a template's subject/text/html with given variables
Execute (real side effects):
add_domain/verify_domaincreate_templatesend_email— always passidempotency_key; a retried call with the same key returns the original result instead of sending againcreate_webhook
npm install
npm run build
MAILX_API_KEY=... node dist/index.js