WAHooks

WhatsApp Channel for Claude Code

Chat with Claude Code via WhatsApp

The WAHooks channel lets you interact with Claude Code directly from WhatsApp. Send a message on WhatsApp, and it appears in your Claude Code session. Claude's replies are sent back to you on WhatsApp.

How it works

You (WhatsApp) → WAHooks webhook → Channel server → Claude Code session
Claude Code    → wahooks_reply tool → WAHooks API  → You (WhatsApp)

The channel runs as a local process alongside Claude Code. It receives WhatsApp messages via WAHooks webhooks and pushes them into your Claude session using the Claude Code channels protocol.

Prerequisites

npm install -g @wahooks/channel   # install the channel package
wahooks claude setup               # login, create token, configure everything
wahooks claude                     # launch Claude Code with WhatsApp

That's it — three commands. The setup only needs to run once.

wahooks claude setup handles:

  1. Browser authentication (skipped if already logged in)
  2. Creates a dedicated API token for the channel
  3. Saves config to ~/.claude/channels/wahooks/.env
  4. Writes the MCP server entry to ~/.claude/mcp.json

After setup, just run wahooks claude to launch Claude Code with the WhatsApp channel active.

Manual setup

If you prefer to configure manually:

1. Install and configure

npm install -g @wahooks/channel
wahooks-channel --configure wh_your_api_key

2. Add to MCP config

Add to ~/.claude/mcp.json:

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

3. Set up a webhook

Create a webhook on your WAHooks connection pointing to the channel's local server:

wahooks webhooks create CONNECTION_ID http://localhost:8790/webhook "message,message.any"

4. Start Claude Code

wahooks claude

Or manually:

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

You should see:

[wahooks-channel] Using connection: abc123...
[wahooks-channel] Webhook server listening on http://127.0.0.1:8790
[wahooks-channel] Ready — WhatsApp messages will appear in Claude Code

4. Send a WhatsApp message

Message your connected WhatsApp number. It will appear in Claude Code as:

<channel source="wahooks-channel" from="1234567890" message_id="msg_1">
list the files in the current directory
</channel>

Claude will process your request and reply via WhatsApp.

Configuration

All configuration is stored in ~/.claude/channels/wahooks/.env or can be set via environment variables:

VariableDescriptionDefault
WAHOOKS_API_KEYYour WAHooks API token (wh_...)Required
WAHOOKS_API_URLAPI base URLhttps://api.wahooks.com
WAHOOKS_CONNECTIONConnection ID to useAuto-detected if only one
WAHOOKS_ALLOWComma-separated allowed phone numbersAll (no filtering)
WAHOOKS_CHANNEL_PORTLocal webhook server port8790

Sender gating

For security, restrict which phone numbers can send messages to Claude:

export WAHOOKS_ALLOW=1234567890,9876543210

Or add to your config file:

WAHOOKS_ALLOW=1234567890,9876543210

Messages from unlisted numbers are silently dropped.

Permission relay

The channel supports permission relay — when Claude wants to run a tool (Bash, Write, etc.), it forwards the approval prompt to you on WhatsApp:

🔐 Claude wants to run: Bash
Execute: git status

Reply "yes abcde" to allow or "no abcde" to deny

Reply with the verdict and Claude continues.

Available tools

When the channel is active, Claude has these tools:

ToolDescription
wahooks_replyReply to the sender of the last WhatsApp message
wahooks_sendSend a text message to any phone number
wahooks_send_imageSend an image (by URL) with optional caption
wahooks_send_documentSend a document/file (by URL) with optional filename
wahooks_send_videoSend a video (by URL) with optional caption
wahooks_send_audioSend an audio/voice message (by URL)
wahooks_send_locationSend a location pin (latitude, longitude, name, address)
wahooks_send_contactSend a contact card (name, phone number)

Troubleshooting

No messages appearing in Claude Code

  • Check that the webhook URL is http://localhost:8790/webhook (not https)
  • Verify the webhook is active: wahooks webhooks list CONNECTION_ID
  • Check the channel is running: look for [wahooks-channel] Ready in output

"No connected WAHooks connections found"

  • Create a connection and scan the QR code first
  • Or set WAHOOKS_CONNECTION explicitly

Port conflict

  • Set a different port: WAHOOKS_CHANNEL_PORT=8791

"No API key found"

  • Run wahooks-channel --configure wh_your_key
  • Or set WAHOOKS_API_KEY environment variable

On this page