Getting Started
Atomic Mail gives agents a programmable inbox over JMAP. The recommended flow is:
- Install either MCP (chat agent hosts) or AgentSkill (shell-capable agents).
- Run
registeronce to create or recover an inbox. It takes a requiredwatchvalue — see Who reads the inbox. If a different username is requested while credentials already exist, registration is refused; the error explains the safe way forward. - Use
jmap_requestfor send/read flows. - Use
helpfor built-in docs.
If wrappers are not usable in your environment, use the direct HTTP docs: REST Auth and Raw JMAP.
Which authentication path?
Two exist, and they are for different situations:
- Proof of work — an autonomous agent registers its own inbox. No human, no browser, no OAuth. This is what
registerdoes in every package on this site. - OAuth 2.0 — a human authorizes an application to act on the inboxes they own. This is the path for Make, n8n via HTTP, Zapier, hosted connectors, and the remote MCP server.
Who reads the inbox
register will not complete without watch. It is not a preference flag; it is the answer to "once this inbox exists, what causes anyone to look at it?" — and that is a standing commitment on the operator's machine, so the operator decides it, not the agent. Ask; do not infer.
| Value | What it means |
|---|---|
scheduled | A recurring job wakes an agent once a day (0 9 * * *, 09:00 local) to read the inbox and report what arrived. |
on-demand | No such job. Mail is read only when a human asks, and anything arriving in between sits unread with nobody told. |
On scheduled, register prints the exact setup step for the runtime that called it — with the credentials directory already filled in — and you run that. Schedule on the host's own scheduler (openclaw cron, hermes cron, atomic-agent task, Claude Code's scheduled-tasks), never at the OS level (crontab, launchd, systemd), and never cron jmap_request on its own — that writes JSON somewhere and tells nobody. Full detail: help topic cron.
MCP hosts pass it on the tool call; the CLI takes --watch:
atomicmail register --username "myagent" --watch scheduledIdeal agent flow
- Register
- Create account with PoW (
register --username <name> --watch <value>) or recover via API key. watchis required — see above.- Different username over existing credentials is refused; the error explains the safe path (a separate credential directory).
- Create account with PoW (
- Persist credentials
credentials.json,session.jwt,capability.jwtunder~/.atomicmail.
- Set up the daily inbox check (after register, on
watch: scheduled)- Native scheduler hosts: wake your AI agent once a day to fetch mail via
list_inbox.json(OpenClaw, Hermes, atomic-agent, Claude Code). - No native scheduler: ask the operator to schedule it on a capable host, or remind manual fetch. Do not work around with OS schedulers or cross-platform scheduling. Do not cron
atomicmail jmap_requestalone. SeeSKILL.md,MCP, orhelptopiccron.
- Native scheduler hosts: wake your AI agent once a day to fetch mail via
- Execute JMAP
- Call
jmap_requestwith inlineopsorops_file.
- Call
- Use placeholders
- Built-in:
$ACCOUNT_ID,$INBOX,$INBOX_MAILBOX_ID,$UPLOAD_URL,$DOWNLOAD_URL - Custom:
$VAR_NAMEviavars/--vars.
- Built-in:
Install for chat-based agents (MCP)
Add to your MCP host configuration:
{
"mcpServers": {
"atomicmail": {
"command": "npx",
"args": ["-y", "@atomicmail/mcp-gh-pages"]
}
}
}Then call tools in this order: register -> jmap_request -> help. The register call needs both a username and a watch value:
{ "username": "myagent", "watch": "scheduled" }Continue with full docs: MCP in-depth.
Install for shell-capable agents (AgentSkill)
npx --package=@atomicmail/agent-skill-gh-pages atomicmail register --username "myagent" --watch scheduled
npx --package=@atomicmail/agent-skill-gh-pages atomicmail jmap_request --ops-file list_inbox.json
npx --package=@atomicmail/agent-skill-gh-pages atomicmail helpContinue with full docs: AgentSkill in-depth and Skill spec.