WAHooks

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 WhatsApp

That'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

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 model

Features

Text, media, reactions, and replies

Claude can send and receive all message types:

ToolDescription
wahooks_replyReply in the same chat. Supports reply_to to quote a specific message.
wahooks_reactReact with an emoji (👍, ❤️, 😂, etc.)
wahooks_sendSend a text to any phone number or group
wahooks_send_imageSend an image (URL or local file)
wahooks_send_documentSend a document/file (URL or local file)
wahooks_send_videoSend a video (URL or local file)
wahooks_send_audioSend audio/voice (URL or local file)
wahooks_send_locationSend a location pin
wahooks_send_contactSend 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,9876543210

Messages 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.

ToolDescription
wahooks_schedule_reminderCreate a reminder. Parameters: task (what to do), chat_id (target chat), schedule (cron expression), one_time (boolean).
wahooks_list_remindersList all active reminders with their next run times.
wahooks_cancel_reminderCancel 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:

VariableDescriptionDefault
WAHOOKS_API_KEYAPI token (wh_...)Set by wahooks claude setup
WAHOOKS_API_URLAPI base URLhttps://api.wahooks.com
WAHOOKS_CONNECTIONConnection IDAuto-detected
WAHOOKS_ALLOWAllowed 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 stream in 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 setup again

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_key

2. Register with Claude Code

claude mcp add -s user wahooks-channel wahooks-channel

Or add to ~/.claude.json:

{
  "mcpServers": {
    "wahooks-channel": {
      "type": "stdio",
      "command": "wahooks-channel",
      "args": [],
      "env": {}
    }
  }
}

3. Launch

claude --dangerously-load-development-channels server:wahooks-channel

On this page