@mulmobridge/whatsapp
v0.1.1
Published
WhatsApp bridge for MulmoBridge — connect WhatsApp Business to MulmoClaude
Readme
@mulmobridge/whatsapp
Experimental — please test and report issues.
WhatsApp bridge for MulmoClaude via Meta's Cloud API. Requires a Meta Business account.
Setup
1. Create a Meta App
- Go to developers.facebook.com → Create App → Business type
- Add the WhatsApp product
- In WhatsApp → Getting Started, note your Phone Number ID and generate a permanent access token
2. Set up ngrok
ngrok http 30033. Configure webhook
In Meta Dashboard → WhatsApp → Configuration:
- Callback URL:
https://xxxx.ngrok-free.app/webhook - Verify token: any string you choose (set as
WHATSAPP_VERIFY_TOKEN) - Subscribe to:
messages
4. Run the bridge
# Testing with mock server
npx @mulmobridge/mock-server &
WHATSAPP_ACCESS_TOKEN=... \
WHATSAPP_PHONE_NUMBER_ID=... \
WHATSAPP_VERIFY_TOKEN=my-verify-token \
MULMOCLAUDE_AUTH_TOKEN=mock-test-token \
npx @mulmobridge/whatsapp
# With real MulmoClaude
WHATSAPP_ACCESS_TOKEN=... \
WHATSAPP_PHONE_NUMBER_ID=... \
WHATSAPP_VERIFY_TOKEN=my-verify-token \
npx @mulmobridge/whatsappEnvironment Variables
| Variable | Required | Description |
|---|---|---|
| WHATSAPP_ACCESS_TOKEN | Yes | Permanent access token from Meta dashboard |
| WHATSAPP_PHONE_NUMBER_ID | Yes | Phone number ID |
| WHATSAPP_VERIFY_TOKEN | Yes | Arbitrary string for webhook verification |
| WHATSAPP_BRIDGE_PORT | No | Webhook port (default: 3003) |
| WHATSAPP_ALLOWED_NUMBERS | No | CSV of phone numbers (empty = all) |
| MULMOCLAUDE_API_URL | No | Default http://localhost:3001 |
| MULMOCLAUDE_AUTH_TOKEN | No | Bearer token |
| WHATSAPP_BRIDGE_DEFAULT_ROLE | No | Role id to seed new bridge sessions with (e.g. coder, general). Applied ONLY when a whatsapp session first appears — once the user switches role via /role <id> the session's own role wins. Unknown role ids silently fall back to the server's default with a warn log. |
| BRIDGE_DEFAULT_ROLE | No | Same as above but shared across every bridge. Transport-specific WHATSAPP_BRIDGE_DEFAULT_ROLE wins when both are set. |
Notes
- WhatsApp has a 24-hour messaging window: you can only reply to a user within 24 hours of their last message. After that, you need a pre-approved template message to initiate contact.
- The Meta Cloud API requires a verified Business account for production use. The test number works for development.
Ecosystem
Part of the @mulmobridge/* package family.
Shared libraries:
@mulmobridge/client— socket.io client library used by every bridge below@mulmobridge/protocol— wire types and constants@mulmobridge/chat-service— server-side relay + session store@mulmobridge/relay— Cloudflare Workers webhook proxy@mulmobridge/mock-server— mock server for local bridge development
Bridges (one npm package per platform):
@mulmobridge/bluesky— Bluesky DMs over atproto@mulmobridge/chatwork— Chatwork (Japanese business chat)@mulmobridge/cli— interactive terminal bridge@mulmobridge/discord— Discord bot via Gateway@mulmobridge/email— IMAP poll + SMTP reply, threading preserved@mulmobridge/google-chat— Google Chat via MulmoBridge relay@mulmobridge/irc— IRC (Libera, Freenode, custom)@mulmobridge/line— LINE Messaging API via MulmoBridge relay@mulmobridge/line-works— LINE Works (enterprise LINE)@mulmobridge/mastodon— Mastodon DMs + mentions@mulmobridge/matrix— Matrix / Element@mulmobridge/mattermost— Mattermost@mulmobridge/messenger— Facebook Messenger via MulmoBridge relay@mulmobridge/nostr— Nostr NIP-04 encrypted DMs@mulmobridge/rocketchat— Rocket.Chat@mulmobridge/signal— Signal via signal-cli-rest-api@mulmobridge/slack— Slack Socket Mode@mulmobridge/teams— Microsoft Teams via Bot Framework@mulmobridge/telegram— Telegram bot@mulmobridge/twilio-sms— SMS via Twilio Programmable Messaging@mulmobridge/viber— Viber Public Account bots@mulmobridge/webhook— generic HTTP webhook bridge@mulmobridge/whatsapp— WhatsApp Cloud API via MulmoBridge relay ← this package@mulmobridge/xmpp— XMPP / Jabber@mulmobridge/zulip— Zulip
License
MIT
