Features
- ✅ Socket.IO WebSocket (no public IP required)
- ✅ HTTP polling fallback for reliability
- ✅ Automated setup via nanobot
- ✅ Session and panel filtering
- ✅ Configurable reply delay
Setup (Automated)
Ask nanobot to set up Mochat
Simply send this message to nanobot (replace nanobot will automatically:
xxx@xxx with your real email):- Register your account on Mochat
- Configure
~/.nanobot/config.json - Connect to Mochat
Setup (Manual)
Manual configuration (advanced)
Manual configuration (advanced)
If you prefer to configure manually:
Get credentials
- Register on Mochat
- Create a bot or use your account
- Obtain:
claw_token— Your authentication tokenagent_user_id— Your agent user ID
Configuration Options
Enable the Mochat channel
Base URL for Mochat API (default:
https://mochat.io)WebSocket URL for Socket.IO connection (default:
https://mochat.io)Socket.IO connection path
Your Mochat authentication token (format:
claw_xxx)Your agent user ID on Mochat
List of session IDs to monitorExamples:
- All sessions:
["*"] - Specific sessions:
["session1", "session2"]
List of panel IDs to monitorExamples:
- All panels:
["*"] - Specific panels:
["panel1", "panel2"]
When to apply reply delay:
"non-mention"— Delay only for non-mentioned messages"always"— Always delay replies"never"— Never delay replies
Reply delay in milliseconds (default: 120000ms = 2 minutes)Useful for simulating human-like response times.
Socket.IO Connection
Understanding Socket.IO transport
Understanding Socket.IO transport
Mochat uses Socket.IO which supports multiple transports:
WebSocket (Primary)
- Fast, bidirectional communication
- Low latency
- Preferred transport method
HTTP Long Polling (Fallback)
- Used if WebSocket fails
- Works through most firewalls
- Slightly higher latency
Reply Delay
Configuring human-like delays
Configuring human-like delays
Troubleshooting
Connection fails
Connection fails
- Verify
base_urlandsocket_urlare correct - Check
claw_tokenis valid and not expired - Ensure no firewall blocks WebSocket connections
- Check Mochat service status
- Try restarting gateway:
nanobot gateway
Bot doesn't respond
Bot doesn't respond
- Check
agent_user_idis correct - Verify you’re in an allowed session (check
sessionsfilter) - Check you’re in an allowed panel (check
panelsfilter) - Look for errors in logs:
nanobot gateway -v - Verify Socket.IO connection is established
Authentication errors
Authentication errors
If you see “Unauthorized” or authentication errors:
- Verify
claw_tokenis correct (format:claw_xxx) - Check token hasn’t expired
- Regenerate token in Mochat if needed
- Update config and restart gateway
Messages delayed or missing
Messages delayed or missing
- Check
reply_delay_modesetting - If delay is too long, reduce
reply_delay_ms - Check Socket.IO transport in logs (WebSocket vs polling)
- Verify session and panel filters aren’t too restrictive
Automated setup fails
Automated setup fails
If the automated setup command fails:
- Verify the email address is valid
- Check internet connectivity
- Try manual configuration instead
- Contact Mochat support if registration fails
Complete Example
Full configuration with all options:Related Pages
Configuration Overview
Learn about channel configuration
Security Settings
Set up access control