Slack Gateway
BMO can expose a Slack Socket Mode gateway for direct messages via:
bmo gateway --config gateway.yamlSupported scope
Section titled “Supported scope”- Slack is the only built-in gateway adapter in this repo.
- Direct messages are the only supported interaction mode.
- Group channels, thread routing, and mention-based activation are not supported by this gateway.
Health model
Section titled “Health model”If you start the gateway with --addr, BMO exposes:
GET /healthfor liveness only
/health does not validate Slack credentials or adapter connectivity. Treat a healthy response as process liveness only.
For local readiness without contacting Slack, run:
bmo gateway check --config gateway.yamlbmo gateway check --config gateway.yaml --jsonThe check validates the YAML config, supported Slack channel shape, direct-message routing scope, local gateway session store, worker capacity, and liveness binding. Output is token-redacted. Add --live-slack only when you intentionally want BMO to call Slack Web API methods with the configured credentials.
Configuration
Section titled “Configuration”Use a YAML config file:
approval_mode: 0 # auto approvalchannels: - type: slack slack: app_token: xapp-... bot_token: xoxb-...router: dm_scope: 2 # per channel+peer direct-message sessionsGateway approval mode supports auto approval. Use a DM routing scope that matches how you want direct messages mapped into BMO sessions.
Slack app setup
Section titled “Slack app setup”Configure the Slack app around the BMO gateway contract: Slack-only, DM-first, Socket Mode.
1. Create the Slack app
Section titled “1. Create the Slack app”- Create a new internal Slack app for the target workspace.
- Add a bot user to the app.
2. Enable Socket Mode
Section titled “2. Enable Socket Mode”- Turn on Socket Mode for the app.
- Create an app-level token (
xapp-...). - Grant the app-level token the
connections:writescope.
BMO uses the app token to open the Socket Mode connection.
3. Configure bot scopes
Section titled “3. Configure bot scopes”Add these bot token scopes:
chat:writeim:history
BMO uses the bot token for auth.test, DM event handling, and message replies.
4. Subscribe to the DM event
Section titled “4. Subscribe to the DM event”Under Event Subscriptions, enable events and add:
message.im
The gateway listens for Slack direct-message events.
5. Install the app to the workspace
Section titled “5. Install the app to the workspace”- Install or reinstall the app after scopes and events are configured.
- Copy the bot token (
xoxb-...) after installation.
6. Provide both tokens to BMO
Section titled “6. Provide both tokens to BMO”You need both:
app_token:xapp-...bot_token:xoxb-...
7. Start the gateway
Section titled “7. Start the gateway”Check local posture first:
bmo gateway check --config gateway.yamlThis command does not send a Slack DM and does not contact Slack unless you add --live-slack.
bmo gateway --config gateway.yamlOptional liveness endpoint:
bmo gateway --config gateway.yaml --addr :80818. Verify behavior
Section titled “8. Verify behavior”- Send the bot a direct message in Slack.
- Confirm BMO receives it and replies.
- Confirm Slack channels remain ignored.
Limits
Section titled “Limits”- The
/healthendpoint exposes liveness, not readiness; usebmo gateway checkfor local readiness posture. - No support for Slack channels or mention-triggered activation.
- Slack MCP tools are configured separately and are not this inbound gateway.
- Teams, Mattermost, Telegram, Discord, and Google Chat adapters are not implemented.