Slack

The Slack connector allows AI agents to read workspace messages, post to channels, search content, and manage basic channel settings. It uses a Slack OAuth app under the hood — your workspace credentials are stored encrypted in MCPGate's vault.

Bot vs. user token

MCPGate uses a user OAuth token (not a bot token), so actions appear as coming from your Slack account rather than a bot user. This gives full access to all channels you are a member of, including private channels.

Tool reference#

The Slack connector exposes 8 tools across two categories: read (4 tools) and write (4 tools).

ToolCategoryDescription
slack_list_channelsreadList all channels the bot is a member of
slack_read_messagesreadRead messages from a channel or DM thread
slack_searchreadFull-text search across messages and files
slack_list_usersreadList workspace users and their profiles
slack_post_messagewritePost a message to a channel or DM
slack_set_topicwriteUpdate a channel topic or purpose
slack_add_reactionwriteAdd an emoji reaction to a message
slack_upload_filewriteUpload a file to a channel

Common guardrail recipes#

Read-only access#

Enable only the four read tools (slack_list_channels, slack_read_messages, slack_search, slack_list_users) and deny the write tools. This prevents the agent from posting any messages or modifying channels.

Block mass mentions#

Apply the block_mass_mentions template to slack_post_message. This prevents the AI from posting messages that include @channel, @here, or @everyone — reducing accidental noise in active channels.

Restrict to specific channels#

Apply the allow_values template to slack_post_message and target the channel field. Provide a list of channel IDs the agent is permitted to post to. Any attempt to post elsewhere will be denied.

Troubleshooting#

  • Channel not found — The agent can only access channels you are a member of. Ensure your Slack account has joined the target channel before calling slack_read_messages.
  • Search returns no results — Slack search requires at least one character. Empty queries return an error rather than all messages.
  • File upload failsslack_upload_file accepts content as a base64 string. Ensure the AI client is encoding the file correctly before passing it to the tool.