NextMsg — One-Way Phone Push Notifications
Send concise, inert text notifications (1–640 characters) from servers, scheduled cron jobs, CI pipelines, always-on gateways (OpenClaw, Hermes), or remote/SSH sessions directly to the user's phone via NextMsg.
When to use
- Scheduled daily reports & briefings (e.g., website analytics, database stats, morning summaries from an always-on OpenClaw or Hermes gateway while the user's laptop is closed)
- Background ops & heartbeats (nightly database backups, disk/RAM thresholds, SSL expiry, uptime checks)
- CI/CD & remote long-running jobs (deploys, nightly test suites, remote GPU/ETL/SSH tasks where desktop notifications cannot reach the user)
- Explicit user requests ("notify my phone when this finishes", "send me a daily report at 9am")
Do not send progress spam during an active interactive chat — send one concise message per outcome or scheduled digest.
Safety rules
- Never send secrets, passwords, API keys, tokens, or PII. Notification text travels through APNs/FCM and appears on the phone's lock screen (not end-to-end encrypted; deleted from NextMsg servers after 72 hours).
- Never put a
nextmsg_live_...send key in tool arguments, prompts, or committed files. Use pairing codes (--pair/pair_code) or theNEXTMSG_KEYenvironment variable. - Formatting: 1–640 Unicode code points; Markdown-lite (
**bold**,*italic*,~~strike~~,`code`) is rendered in the app; links stay inert plain text. - Channels: Optional lowercase tag
^[a-z0-9_-]{1,32}$(e.g.stats,backups,deploys,alerts,digest; defaultgeneral).
Option 1: Via MCP tool (notify_human)
If the nextmsg MCP server is loaded, call notify_human:
message(required): concise summary (what happened, key numbers, action if any)channel(optional): e.g.stats,backups,deploys,digestpair_code(first time only): ifnotify_humanreports that NextMsg isn't connected yet, ask the user to open NextMsg → Settings → Send keys → Add send key → Use a pairing code on their phone, read the 8-character code (e.g.K73M-QX9P), and callnotify_humanonce withpair_code. The claimed key is saved locally (~/.config/nextmsg/key) and never needs a code again.
Option 2: Via CLI (scripts, hooks, always-on gateways)
Pair once on the machine (no key copy-paste):
npx -y @nextmsg/mcp --pair K73M-QX9P
Then send from any script, cron job, OpenClaw/Hermes schedule, or hook:
npx -y @nextmsg/mcp "**Daily Backup** · 1.4 GB OK in 38s" --channel backups
Option 3: Via plain HTTP / curl (zero-token cron checkers, Cloudflare Workers, servers)
For lightweight scripts without Node.js (e.g. bash cron, Cloudflare Workers, Python zero-token checkers):
curl -fsS -X POST https://api.nextmsg.app/v1/send \
-H "Authorization: Bearer $NEXTMSG_KEY" \
-H "Content-Type: application/json" \
-d '{"channel":"stats","message":"**Daily Report** · 142 views · 12 new devices"}'
Or 1-line quick URL (POST):
curl -fsS -d "Deploy succeeded on main" "https://api.nextmsg.app/p/$NEXTMSG_KEY"
Limits & Troubleshooting
- Free: 100 messages/month, 2 active send keys (
HTTP 402when monthly limit is reached). - Pro: One-time purchase, 5,000 messages/day fair use, 20 active send keys.
- 401 Unauthorized: The key was revoked in the app — pair again or update
NEXTMSG_KEY. Do not retry in a loop; report the error to the user.
