Standalone Slack MCPL server: connects a Slack workspace (channels, private
channels, DMs, group DMs) to an MCPL host as a first-class channel surface.
Sibling of discord-mcpl, built on
@connectome/mcpl-core.
Works in plain MCP mode too (tools only, no push events or channels).
- Channels: every conversation the bot can act in is registered as an
MCPL channel (
slack:<conversationId>);channels/publishreplies into the active thread of the conversation automatically. - Real-time events via Socket Mode — no public webhook URL needed, so the server can be spawned over stdio like any other MCPL server.
- Addressing model: mentions (
<@bot>) and DMs are always delivered; ambient channel chatter flows only from subscribed conversations (auto-subscribe on first mention, opt out withunsubscribe_channel). Events carry MCPL RFC-001chat:*tags for host-side wake gating. - Threads: incoming thread replies carry
threadId;reply_messageposts into a message's thread;fetch_threadreads one (Slack's channel-level history API does not include thread replies). - Attachments: incoming files are forwarded as refs and fetched on demand
via
fetch_attachment, which is auth-locked tofiles.slack.com(the bot token is never sent to any other host) and size-capped at 5MB. - Rollback:
slack.messagingsupports MCPL checkpoints — rolling back deletes the messages the bot sent after the checkpoint (best-effort).
send_message, reply_message, send_dm, add_reaction, edit_message,
delete_message, list_channels, refresh_channels, fetch_history,
fetch_thread, find_user, fetch_attachment, subscribe_channel,
unsubscribe_channel, list_subscriptions.
Feature sets: slack.messaging (rollback-capable), slack.history,
slack.subscriptions.
Go to https://api.slack.com/apps → Create New App → From a manifest, and paste:
display_information:
name: Connectome Agent
features:
bot_user:
display_name: connectome-agent
always_online: true
oauth_config:
scopes:
bot:
- channels:history
- channels:read
- groups:history
- groups:read
- im:history
- im:read
- im:write
- mpim:history
- mpim:read
- chat:write
- users:read
- reactions:write
- files:read
settings:
event_subscriptions:
bot_events:
- message.channels
- message.groups
- message.im
- message.mpim
socket_mode_enabled: true- Install to Workspace → copy the Bot User OAuth Token (
xoxb-...) →SLACK_BOT_TOKEN - Under Basic Information → App-Level Tokens, generate a token with the
connections:writescope (xapp-...) →SLACK_APP_TOKEN - Invite the bot to channels you want it to see:
/invite @connectome-agent(DMs work without invites — users can message the bot directly)
npm install
npm run build
SLACK_BOT_TOKEN=xoxb-... SLACK_APP_TOKEN=xapp-... slack-mcpl --stdio
# or: slack-mcpl --tcp 9040| Variable | Required | Description |
|---|---|---|
SLACK_BOT_TOKEN |
yes | Bot token (xoxb-…) for Web API calls |
SLACK_APP_TOKEN |
yes | App-level token (xapp-…, connections:write) for Socket Mode |
SLACK_DM_USERS |
no | Comma-separated user-ID whitelist for DMs; others' DMs are dropped |
SLACK_SUBSCRIPTIONS_FILE |
no | JSON file persisting ambient subscriptions across restarts |
SLACK_BACKSCROLL_LIMIT |
no | Messages fetched on first interaction with a conversation (default 50) |
SLACK_MCPL_DEBUG_LOG |
no | Absolute path for a diagnostic file log |
npm testThe Slack domain logic (Socket Mode event handling, mrkdwn formatting, cursor-drained history pagination, attachment URL allowlisting) was salvaged from zulip-mcp PR #8's multi-platform branch and re-homed here as a standalone MCPL server following discord-mcpl's structure.