multica-slack-assistant
v2.0.0
Published
Conversational Slack AI agent (Claude) that chats in DMs, the assistant pane, and channel threads, and files issues to Multica via tool use. Runs in Socket Mode — no public URL needed.
Downloads
312
Readme
Multica Slack Assistant
A conversational Slack AI agent powered by Claude. People can chat with it in direct messages, the assistant pane (Slack's Agents & AI Apps), and channel threads (by @mentioning it). When someone describes a real bug or problem, the agent files an issue to Multica on its own using a tool — no copy-paste, no forms.
Runs in Socket Mode (no public URL). It's a long-lived process and relies on Bolt's Socket Mode to reconnect.
Run it
Run it from anywhere — no clone, no install needed:
npx multica-slack-assistantIt reads config from the environment. Either put a .env in the folder you run
it from (see Configuration), or pass the values inline:
SLACK_BOT_TOKEN=xoxb-… SLACK_APP_TOKEN=xapp-… ANTHROPIC_API_KEY=sk-ant-… \
MULTICA_WEBHOOK_URL=https://… npx multica-slack-assistantFrom a local clone (for development)
git clone <repo-url> multica-slack-assistant
cd multica-slack-assistant
npm install
cp .env.example .env # then fill in your tokens (see below)
npx . # or: npm startOn startup it validates
SLACK_BOT_TOKEN,SLACK_APP_TOKEN, andANTHROPIC_API_KEY. If any is missing it prints exactly which and exits — a clean exit on an incomplete.envis expected and means env validation works.
Stop it with Ctrl+C (clean shutdown). Otherwise leave it running — it's a long-lived process.
Configuration
All config is via environment variables (loaded from .env). See
.env.example.
| Variable | Required | Description |
| --------------------- | -------- | ----------- |
| SLACK_BOT_TOKEN | ✅ | Bot User OAuth Token (xoxb-…). |
| SLACK_APP_TOKEN | ✅ | App-Level Token for Socket Mode (xapp-…, scope connections:write). |
| ANTHROPIC_API_KEY | ✅ | Claude API key (sk-ant-…) — the agent's brain. |
| MULTICA_WEBHOOK_URL | ⛳ | Where issues are POSTed. Agent still chats without it, but can't file. |
| ANTHROPIC_MODEL | – | Claude model. Default claude-opus-4-8; use claude-sonnet-4-6 for lower latency. |
| LOG_LEVEL | – | debug | info | warn | error (default info). |
Where to paste the Multica webhook URL
Open .env and set:
MULTICA_WEBHOOK_URL=https://your-multica-autopilot-webhookThen restart. Until it's set, the agent still talks but tells users that issue filing isn't configured yet.
What gets sent to the webhook
When the agent decides to file an issue, it POSTs JSON:
{
"text": "Title\n\nA clear, self-contained issue summary written by the agent",
"slack_channel": "C0123ABC",
"slack_thread_ts": "1700000000.000100",
"slack_user": "U0123ABC"
}slack_channel / slack_thread_ts point at the conversation the issue came from
(in the assistant pane, the channel the user was viewing).
How it behaves
- Conversational — chats naturally in DMs, the assistant pane, and channel threads. It keeps per-thread context so follow-ups make sense.
- Auto-files issues — when it's confident a message is a real, concrete bug
or actionable request, it calls its
file_issuetool and POSTs to Multica, then tells the user. It does not file for greetings, small talk, or general questions, and asks a quick clarifying question when genuinely unsure. - Channel threads — @mention the app in a channel to start a thread; after that, it follows the thread and replies to follow-ups without needing another mention.
It is a thin client over Claude — it brings no business logic of its own beyond the conversation and the single issue-filing tool.
Slack app setup checklist
In https://api.slack.com/apps → your app:
- Enable the assistant. Agents & AI Apps → toggle on.
- Enable Socket Mode. Socket Mode → toggle on. (Also enables interactivity over the socket — no Request URL needed.)
- Turn on the messages tab. App Home → Show Tabs → enable the Messages Tab and check "Allow users to send Slash commands and messages from the messages tab." Without this, Slack shows "Sending messages to this app has been turned off."
- Bot token scopes (OAuth & Permissions → Scopes):
assistant:write— the assistant panechat:write— send messagesim:history— receive DMs / assistant-pane messagesapp_mentions:read— receive @mentions in channelschannels:history— follow replies in public channel threadsgroups:history— (optional) same for private channels
- Subscribe to bot events (Event Subscriptions → Subscribe to bot events):
assistant_thread_startedassistant_thread_context_changedmessage.imapp_mentionmessage.channels— follow-ups in public channel threadsmessage.groups— (optional) private channels
- Tokens:
- OAuth & Permissions → install the app → copy the Bot User OAuth Token
(
xoxb-…) intoSLACK_BOT_TOKEN. - Basic Information → App-Level Tokens → create one with the
connections:writescope → copy it (xapp-…) intoSLACK_APP_TOKEN.
- OAuth & Permissions → install the app → copy the Bot User OAuth Token
(
- (Re)install the app after changing scopes.
- Invite the app to any channel where you want to @mention it
(
/invite @YourApp).
Then npx multica-slack-assistant and DM the app or @mention it in a channel.
Requirements
Node 18+ (uses built-in fetch). Dependencies: @slack/bolt, @anthropic-ai/sdk,
dotenv.
