WhatsApp Channel for Claude Code
Chat with Claude Code via WhatsApp
Chat with Claude Code directly from WhatsApp. Send a message, and Claude replies — with full access to your codebase, terminal, and tools.
Setup
Two commands. Takes under a minute.
wahooks claude setup # authenticates, installs channel, configures everything
wahooks claude # launches Claude Code with WhatsAppThat's it. wahooks claude setup only needs to run once — it handles login, API token creation, npm install, and MCP registration automatically. After that, just run wahooks claude whenever you want to use it.
Prerequisites
- A WAHooks account with a connected WhatsApp number
- Claude Code v2.1.80+
- Node.js 18+
- WAHooks CLI
Passing flags to Claude
You can pass any Claude Code flags through:
wahooks claude --continue # resume last session
wahooks claude --resume abc-123 # resume specific session
wahooks claude --model sonnet # use a different modelFeatures
Text, media, reactions, and replies
Claude can send and receive all message types:
| Tool | Description |
|---|---|
wahooks_reply | Reply in the same chat. Supports reply_to to quote a specific message. |
wahooks_react | React with an emoji (👍, ❤️, 😂, etc.) |
wahooks_send | Send a text to any phone number or group |
wahooks_send_image | Send an image (URL or local file) |
wahooks_send_document | Send a document/file (URL or local file) |
wahooks_send_video | Send a video (URL or local file) |
wahooks_send_audio | Send audio/voice (URL or local file) |
wahooks_send_location | Send a location pin |
wahooks_send_contact | Send a contact card |
Receiving media
When someone sends a photo, video, or file, the channel downloads it locally so Claude can view or process it:
<channel source="wahooks-channel" from="1234@lid" message_id="msg_2" has_media="true">
Check this document
[Attached: application/pdf] Saved to: /tmp/wahooks-media-1234.pdf
</channel>Claude can read the file, transform it, and send the result back.
Group chats
The channel works with group messages. In groups, the from attribute is the group ID and sender identifies who sent the message. Claude replies to the group and can quote specific messages with reply_to.
Sender gating
Restrict which phone numbers can message Claude:
# In ~/.claude/channels/wahooks/.env
WAHOOKS_ALLOW=1234567890,9876543210Messages from unlisted numbers are silently dropped. Leave empty to allow all.
Human-like behavior
All messages follow WhatsApp's anti-ban guidelines automatically:
- Read receipts sent immediately on message receive
- Typing indicator shown before replying
- Random delay based on message length
- Stop typing before sending
Scheduled reminders
Claude can schedule tasks to run at specific times — one-time or recurring via cron expressions. When a reminder comes due, it is delivered to Claude as a pending message so Claude can act on it (e.g., send a daily briefing to a group).
How it works: A background daemon checks ~/.wahooks/reminders.json every 30 seconds. When a reminder's nextRunAt time has passed, the daemon moves it into a pending queue (~/.wahooks/pending.json). The channel picks up pending items and delivers them to Claude when connected.
| Tool | Description |
|---|---|
wahooks_schedule_reminder | Create a reminder. Parameters: task (what to do), chat_id (target chat), schedule (cron expression), one_time (boolean). |
wahooks_list_reminders | List all active reminders with their next run times. |
wahooks_cancel_reminder | Cancel a reminder by ID. |
Setup: The reminder daemon is automatically installed and registered with launchd during wahooks claude setup. No additional configuration is needed.
Example: "Remind me to send a daily briefing to the dev group at 8am on weekdays" — Claude creates a recurring reminder with cron schedule 0 8 * * 1-5 targeting the group chat.
Reminders require Claude to be running. If Claude is not connected when a reminder fires, the pending item is held in the queue and delivered when Claude next connects. Pending items older than 24 hours are automatically pruned.
Storage:
- Active reminders:
~/.wahooks/reminders.json - Pending queue:
~/.wahooks/pending.json
Configuration
Stored in ~/.claude/channels/wahooks/.env:
| Variable | Description | Default |
|---|---|---|
WAHOOKS_API_KEY | API token (wh_...) | Set by wahooks claude setup |
WAHOOKS_API_URL | API base URL | https://api.wahooks.com |
WAHOOKS_CONNECTION | Connection ID | Auto-detected |
WAHOOKS_ALLOW | Allowed phone numbers (comma-separated) | All |
How it works
You (WhatsApp) → WAHA → WAHooks API → WebSocket → Channel → Claude Code
Claude Code → wahooks_reply tool → WAHooks API → WAHA → You (WhatsApp)The channel runs as a local MCP server alongside Claude Code. It connects to the WAHooks API via WebSocket for real-time message delivery — no webhooks, tunnels, or port forwarding needed. The WebSocket auto-reconnects after network interruptions or laptop sleep.
Troubleshooting
No messages appearing
- Restart with
wahooks claude(the channel subprocess needs to be running) - Check for
[wahooks-channel] Connected to event streamin the output - Verify your connection is
connected:wahooks connections list
"No connected WAHooks connections found"
- Create and link a connection:
wahooks connections quick
"No API key found"
- Run
wahooks claude setupagain
Messages from new session not arriving
- If you resumed a Claude session, the old channel subprocess may be stale — restart with
wahooks claude
Manual setup
If you prefer to configure manually instead of using wahooks claude setup
1. Install and configure
npm install -g @wahooks/channel
wahooks-channel --configure wh_your_api_key2. Register with Claude Code
claude mcp add -s user wahooks-channel wahooks-channelOr add to ~/.claude.json:
{
"mcpServers": {
"wahooks-channel": {
"type": "stdio",
"command": "wahooks-channel",
"args": [],
"env": {}
}
}
}3. Launch
claude --dangerously-load-development-channels server:wahooks-channel