Like a Telegram bot, but for your WhatsApp. Paste a bot token, get a WhatsApp-driven agent.
Give your Claude Code agent WhatsApp messaging superpowers via the Chatlytics REST API.
The plugin ships:
- 9 MCP tools —
chatlytics_send,chatlytics_read,chatlytics_search,chatlytics_directory,chatlytics_actions,chatlytics_health,chatlytics_login,chatlytics_dispatch,chatlytics_poll. - A skill that teaches Claude Code when and how to use WhatsApp.
New here? Read QUICKSTART.md — first WhatsApp message from Claude Code in under 5 minutes.
- Telegram-style "paste your bot token" onboarding. The plugin now reads
CHATLYTICS_BOT_TOKEN(sk_bot_*), verifies the token at startup viaGET /api/v1/bot/me, and logs the resolved bot identity (display_name- 8-char fingerprint — INV-02, plaintext never leaves the operator machine).
chatlytics_pollMCP tool drives the v4.0 long-poll endpoint (GET /api/v1/bot/updates+POST /api/v1/bot/updates/ack). Agents can receive WhatsApp messages addressed to the bot without exposing a public webhook URL.- Fail-open on transient outage. Both
/bot/me/tools(catalog filter) and/bot/me(identity verify) degrade gracefully — server outage during Claude Code startup widens the tool catalog but never blocks boot. .mcp.jsonpropagatesCHATLYTICS_BOT_TOKENin addition to the legacy 3 env vars. Back-compat:CHATLYTICS_API_KEYcontinues to work.- 5 new bundle-behavior smoke assertions covering identity log, fail-open,
poll querystring, ack ordering, and api_key-mode rejection of
chatlytics_poll.
Two-step install via Claude Code's plugin manager:
claude plugin marketplace add omernesh/chatlytics-claude-code
claude plugin install chatlytics@chatlytics-claude-codeThat fetches a single self-contained bundled MCP server
(servers/chatlytics-mcp.bundle.js, ~715KB) plus the skill. No npm install
needed — the bundle ships all dependencies inline.
If you're working on the plugin itself:
git clone https://github.com/omernesh/chatlytics-claude-code.git
cd chatlytics-claude-code
cd servers && npm install && npm run build # rebuild bundle after source editsThe build script (esbuild) re-bundles chatlytics-mcp.js → chatlytics-mcp.bundle.js.
The bundle is the file Claude Code actually runs; ship it on every release.
Set these environment variables in your Claude Code settings
(.claude/settings.json env block, or your shell):
CHATLYTICS_API_URL=https://app.chatlytics.ai
CHATLYTICS_BOT_TOKEN=sk_bot_your-bot-token # preferred (v4.0+)
CHATLYTICS_SESSION=your-session-id # optional
# CHATLYTICS_API_KEY=your-api-key # legacy v3.37 fallback (see note)
The plugin's .mcp.json declares all four vars and Claude Code passes
them through to the MCP server stdio process.
Note on CHATLYTICS_API_KEY: v3.37 operators using the shared admin
api_key bearer can keep using it — the plugin falls back to it when
CHATLYTICS_BOT_TOKEN is unset. The legacy path stays back-compat for the
8 v3.37 tools but cannot drive chatlytics_poll (which is bot-bearer
scoped on the server side). New installs should use CHATLYTICS_BOT_TOKEN.
Easiest path: in any Claude Code session, ask:
use
chatlytics_loginto test my connection
You should get back ✅ Connected to ${URL}. Webhook registered. Sessions: N.
or a clear error explaining what to fix.
Alternative — run the standalone smoke test from a checked-out repo:
cd servers
CHATLYTICS_API_URL=https://app.chatlytics.ai \
CHATLYTICS_API_KEY=your-api-key \
npm testThe test calls GET ${CHATLYTICS_API_URL}/health with your bearer token and
asserts that webhook_registered: true. Exits 0 on success, 1 on failure
with a clear error.
Just ask Claude Code:
- "Send a WhatsApp message to Omer saying hello"
- "Read my recent WhatsApp messages from the Team Chat group"
- "Search for the marketing channel"
- "Check if WhatsApp is connected"
chatlytics_send and chatlytics_read accept either a JID
(972544329000@c.us, 120363...@g.us) or a contact/group name — names are
auto-resolved through the search action. Ambiguous names return a picker
error listing the candidates so the agent can prompt the user to disambiguate.
The plugin is versioned independently from the Chatlytics monorepo (currently v3.30.0). The plugin tracks the Chatlytics REST API contract, not the monorepo version. See CHANGELOG.md for plugin release notes.
MIT — see LICENSE (or the license field of .claude-plugin/plugin.json).