lumail · diff
git:20261017.7124864 to git:20261019.89dfcfa
12 added, 23 removed. Audit A to A.
---
name: lumail
description: Manage Lumail email marketing from Claude with the Lumail CLI or MCP. Use for setup and login, sending domains and DNS, subscribers, tags, double opt-in, transactional emails (OTP codes), campaigns, workflows (automations), segments, API keys and analytics.
---
- ## Connect
+ Connect first:
```bash
npx lumail@latest setup --authenticate # installs the Lumail MCP + skills for your agent, opens the browser to authorize
npx lumail@latest auth test # checks the saved login
```
- The Lumail onboarding also has a "copy the prompt" button that does the same. Once connected, prefer the Lumail MCP tools; fall back to the CLI (`lumail --help`, then `lumail <resource> --help`). Never invent flags. Pass `--json` when parsing, and never print API keys.
-
- ## Common jobs
-
- | job | how |
- | --- | --- |
- | count or find subscribers | MCP `count_subscribers`, `get_subscriber` · CLI `lumail subscribers list`, `lumail subscribers get <email>` |
- | add or update a subscriber with tags | MCP `add_subscriber` · CLI `lumail subscribers create --help` |
- | tags | MCP `list_tags`, `get_or_create_tags` · CLI `lumail tags list`, `lumail tags create` |
- | API key for the app (OTP emails, signups) | CLI `lumail tokens --help` (create it yourself, store it only in the app env) |
- | transactional email (login code) | MCP `send_email` · CLI `lumail emails --help` |
- | sending domain + web domain | CLI `lumail domain --help`, then add the DNS records it returns in Cloudflare yourself |
- | anything else | `lumail tools list`, `lumail tools get <tool>`, `lumail tools run <tool> --params '<json>'` |
+ The "copy the prompt" button in the Lumail onboarding does the same. Once connected, prefer the Lumail MCP tools and fall back to the CLI (`lumail --help`, then `lumail <resource> --help`). Never invent flags. Pass `--json` when parsing, and never print API keys.
- ## Signups from your app
+ Where each job lives:
- - Upsert the person on signup or purchase with a tag per product (`student`, `customer`, `<product-slug>`).
- - Double opt-in is on by default: a new subscriber stays "pending confirmation" until they click the email. For buyers and account signups, create them as subscribed (skip double opt-in) so tag workflows fire right away.
- - Use a single helper on the server for every Lumail call; the API key never reaches the browser.
+ - Count or find subscribers: MCP `count_subscribers`, `get_subscriber`; CLI `lumail subscribers list`, `lumail subscribers get <email>`.
+ - Add or update a subscriber with tags: MCP `add_subscriber`; CLI `lumail subscribers create --help`.
+ - Tags: MCP `list_tags`, `get_or_create_tags`; CLI `lumail tags list`, `lumail tags create`.
+ - API key for an app (OTP emails, signups): `lumail tokens --help`. Create it yourself and store it only in the app env.
+ - Transactional email (login code): MCP `send_email`; CLI `lumail emails --help`.
+ - Sending domain and web domain: `lumail domain --help`, then add the DNS records it returns in Cloudflare yourself.
+ - Anything else: `lumail tools list`, `lumail tools get <tool>`, `lumail tools run <tool> --params '<json>'`.
- ## Campaigns and workflows
+ For signups from an app, upsert the person on signup or purchase with a tag per product (`student`, `customer`, `<product-slug>`), through one server helper so the API key never reaches the browser. Double opt-in is on by default and keeps a new subscriber "pending confirmation" until they click the email: keep it for cold forms, and create buyers and account signups as subscribed (skip double opt-in) so tag workflows fire right away.
- - Create campaigns and workflows as drafts. Send, schedule or publish only when the user asks.
- - Before writing a campaign body or a workflow graph, load the format guide: MCP `get_skill` with `{"type":"campaign"}` or `{"type":"workflow"}`.
- - Workflow: create it, read it back with `get_workflow`, configure the full graph in one call (trigger such as "tag added", then the email steps), with the exact `updatedAt` value; publish only on request.
- - After any change, read back the saved object and render it to check content and links.
+ Create campaigns and workflows as drafts; send, schedule or publish only when the user asks. Before writing a campaign body or a workflow graph, load the format guide with MCP `get_skill` and `{"type":"campaign"}` or `{"type":"workflow"}`. For a workflow, create it, read it back with `get_workflow`, then configure the full graph in one call (a trigger such as "tag added", then the email steps) with the exact `updatedAt` value. After any change, read back the saved object and render it to check content and links.
Reply in the user's language with what changed, a link, and anything left to do.