Skip to content
Documentation
Documentation

Server Setup Overview

The browser can’t call the Slack API directly because it would expose your bot token. MUS routes all Slack communication through a server-side handler that reads SLACK_BOT_TOKEN from the environment.

There are two ways to provide this handler:

PathBest for
mus-server Docker imageVite SPAs, any app without a backend
@datachef/mus/server handlersNext.js, Express, Fastify, Hono, Remix

  • Voice upload: receives WebM audio from the browser, converts to MP3 with ffmpeg, uploads to Slack
  • Standalone upload: receives screenshot PNG + optional voice, posts both to Slack
  • Support channel: creates (or finds existing) private Slack channel, invites user + support team

All three endpoints are under /api/mus/:

EndpointHandler
POST /api/mus/voice-uploadPOST
POST /api/mus/standalone-uploadPOSTStandalone
POST /api/mus/support-channelPOSTSupportChannel


All paths require one environment variable:

Terminal window
SLACK_BOT_TOKEN=xoxb-your-token

The token needs these Slack bot scopes:

  • chat:write: post messages
  • files:write: upload voice recordings
  • channels:manage or groups:write: create support channels
  • users:read.email: look up users by email for channel invites