All integrations

Slack

Channels and messaging.

OAuth 5 tools

Overview

Connect Slack workspaces so AI can read channel history, post messages, and send direct messages through an installed bot.

Prerequisites

  • A Slack workspace where you can install apps
  • A stackgate.ai account
  • The stackgate.ai operator must configure Slack OAuth credentials on the hub

Getting credentials

Operator setup (hub admin)

Before users can connect, configure a Slack app at api.slack.com/apps:

  1. Create an app (or use an existing one) for your organization.
  2. Under OAuth & Permissions → Redirect URLs, add: https://stackgate.ai/oauth/slack/callback
  3. Under OAuth & Permissions → Bot Token Scopes, add: channels:read, channels:history, channels:join, groups:read, groups:history, chat:write, im:write, users:read, users:read.email
  4. Copy Client ID and Client Secret to the hub .env: SLACK_CLIENT_ID, SLACK_CLIENT_SECRET
  5. Reinstall the app to any test workspace after changing scopes.

Recommended: OAuth (end user)

  1. Open Integrations → Slack in stackgate.ai.
  2. Click Activate, then Connect Slack.
  3. Choose your workspace and approve the requested bot scopes.
  4. On the channel picker page, select the channels AI should access.
  5. Public channels are joined automatically. For private channels, invite the bot in Slack after saving (/invite @YourAppName).

Advanced: bot token

Expand Advanced: paste bot token on the setup page if you already have a Slack bot token (xoxb-…). Manual connections can access any channel the bot is already a member of — there is no channel picker allowlist.

Available tools

  • list_channels — channels visible to the bot
  • list_users — workspace members (for resolving DMs)
  • read_channel_messages — recent history with optional time window
  • send_channel_message — post plain text, Block Kit blocks, or thread replies
  • send_direct_message — DM by user ID or email

Using with AI clients

  • Dedicated endpoint: POST /mcp/slack
  • Private gateway: slack__* tools

Troubleshooting

  • Missing channels — OAuth connections only allow tools in channels you selected at setup. Use Manage channels on the integration page.
  • Private channel errors — invite the bot to the private channel in Slack, then add it on the channel picker if needed.
  • Reconnect required — disconnect and reconnect if the workspace admin revoked app permissions.

Available tools

  • list_channels

    List Slack channels accessible to the connected workspace bot token.

  • list_users

    List Slack workspace members. Use the returned user IDs for direct messages.

  • read_channel_messages

    Read recent messages from a Slack channel.

  • send_channel_message

    Send a message to a Slack channel. Supports plain text, Block Kit blocks, and thread replies.

  • send_direct_message

    Send a direct message to a Slack user by user ID or email.

MCP endpoint: https://stackgate.ai/mcp/slack (HTTP) or via the private gateway.