@mulmobridge/google-chat
v0.1.1
Published
Google Chat bridge for MulmoBridge — connect Google Chat to MulmoClaude
Downloads
36
Readme
@mulmobridge/google-chat
Experimental — please test and report issues.
Google Chat bridge for MulmoClaude. Uses HTTP endpoint mode (synchronous responses).
Setup
1. Create a Google Chat App
- Go to Google Cloud Console → create or select a project
- Enable the Google Chat API
- Go to APIs & Services → Credentials and note your Project Number
- Configure the Chat app:
- App name: MulmoClaude
- App URL: your public endpoint (ngrok for dev)
- Functionality: receive 1:1 messages and join spaces
2. Set up ngrok
ngrok http 30053. Run the bridge
# Testing with mock server
npx @mulmobridge/mock-server &
GOOGLE_CHAT_PROJECT_NUMBER=123456 \
MULMOCLAUDE_AUTH_TOKEN=mock-test-token \
npx @mulmobridge/google-chat
# With real MulmoClaude
GOOGLE_CHAT_PROJECT_NUMBER=123456 \
npx @mulmobridge/google-chat4. Message the bot
In Google Chat, find your app and send it a direct message.
Environment Variables
| Variable | Required | Description |
|---|---|---|
| GOOGLE_CHAT_PROJECT_NUMBER | Yes | Google Cloud project number |
| GOOGLE_CHAT_BRIDGE_PORT | No | Webhook port (default: 3005) |
| MULMOCLAUDE_API_URL | No | Default http://localhost:3001 |
| MULMOCLAUDE_AUTH_TOKEN | No | Bearer token |
| GOOGLE_CHAT_BRIDGE_DEFAULT_ROLE | No | Role id to seed new bridge sessions with (e.g. coder, general). Applied ONLY when a google-chat 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 GOOGLE_CHAT_BRIDGE_DEFAULT_ROLE wins when both are set. |
Security — Request Verification
Every incoming webhook request is verified using Google's OIDC JWT mechanism:
- The
Authorization: Bearer <token>header is extracted - The JWT signature is verified against Google's JWKS endpoint (
https://www.googleapis.com/service_accounts/v1/jwk/[email protected]) - The following claims are checked:
issmust be[email protected]audmust matchGOOGLE_CHAT_PROJECT_NUMBERexpmust not be in the past
- Requests that fail verification receive
401 Unauthorized
This prevents spoofed requests from arbitrary third parties.
Limitations
- Synchronous mode only: Google Chat expects a response within 30 seconds. Agent responses that take longer will time out. For async responses, a service account with the Chat API is needed (future enhancement).
- No push delivery: server→bridge push requires the async Chat API with a service account. Currently pushes are logged but not delivered.
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 ← this package@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@mulmobridge/xmpp— XMPP / Jabber@mulmobridge/zulip— Zulip
License
MIT
