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
- A WAHooks account with a connected WhatsApp number
- Claude Code v2.1.80+
- Node.js 18+
- WAHooks CLI
Quick setup (recommended)
npm install -g @wahooks/channel # install the channel package
wahooks claude setup # login, create token, configure everything
wahooks claude # launch Claude Code with WhatsAppThat's it — three commands. The setup only needs to run once.
wahooks claude setup handles:
- Browser authentication (skipped if already logged in)
- Creates a dedicated API token for the channel
- Saves config to
~/.claude/channels/wahooks/.env - 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_key2. 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 claudeOr manually:
claude --dangerously-load-development-channels server:wahooks-channelYou 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 Code4. 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:
| Variable | Description | Default |
|---|---|---|
WAHOOKS_API_KEY | Your WAHooks API token (wh_...) | Required |
WAHOOKS_API_URL | API base URL | https://api.wahooks.com |
WAHOOKS_CONNECTION | Connection ID to use | Auto-detected if only one |
WAHOOKS_ALLOW | Comma-separated allowed phone numbers | All (no filtering) |
WAHOOKS_CHANNEL_PORT | Local webhook server port | 8790 |
Sender gating
For security, restrict which phone numbers can send messages to Claude:
export WAHOOKS_ALLOW=1234567890,9876543210Or add to your config file:
WAHOOKS_ALLOW=1234567890,9876543210Messages 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 denyReply with the verdict and Claude continues.
Available tools
When the channel is active, Claude has these tools:
| Tool | Description |
|---|---|
wahooks_reply | Reply to the sender of the last WhatsApp message |
wahooks_send | Send a text message to any phone number |
wahooks_send_image | Send an image (by URL) with optional caption |
wahooks_send_document | Send a document/file (by URL) with optional filename |
wahooks_send_video | Send a video (by URL) with optional caption |
wahooks_send_audio | Send an audio/voice message (by URL) |
wahooks_send_location | Send a location pin (latitude, longitude, name, address) |
wahooks_send_contact | Send 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] Readyin output
"No connected WAHooks connections found"
- Create a connection and scan the QR code first
- Or set
WAHOOKS_CONNECTIONexplicitly
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_KEYenvironment variable