Guide
Setup
Four steps from clone to a reply in your thread. Prove each one before the next.
You need Bun 1.1+, a Spectrum project with an iMessage line, and a Grok Bot whose routines you can edit. Everything is configured in one file:
# .env at the repo root
PROJECT_ID=... # step 2, from app.photon.codes
PROJECT_SECRET=...
BRIDGE_PUBLIC_BASE_URL=https://... # step 3, no trailing slash
GROK_BOT_WEBHOOK_URL=... # step 4, from the routine panel
GROK_BOT_WEBHOOK_KEY=...
MCP_AUTH_TOKEN=... # recommended once the bridge is public1. Install
git clone https://github.com/Hanif-adedotun/grok-imessage.git
cd grok-imessage
bun install
cp .env.example .env2. Prove echo works
Fill in the two Spectrum values, then start the bridge:
bun run dev:bridge
curl -s localhost:3000/health
# {"ok":true,"service":"grok-imessage-bridge","spectrum":true,"wake":false}Text your Spectrum line and you should get echo: … back. That proves credentials, line and loop before the Bot is involved.
3. Go public
Your Bot has to reach the bridge. Run cloudflared tunnel --url http://localhost:3000 and put the printed URL in BRIDGE_PUBLIC_BASE_URL.
4. Wake your Bot
Create the routine, add its webhook URL and key to .env, and restart. /health now reports "wake":true. Text the line: you get a tapback "like", then the Bot's answer.
If nothing comes back
- No tapback at all: clear
ALLOWED_SENDERS. A mismatch drops messages silently. - Tapback, then silence: the tunnel URL changed. Update the base URL, restart, and update the Bot's connector.
- "Couldn't reach your Grok Bot": the webhook URL or key is wrong.