Slack MCP Server
Overview​
Slack is a business communication platform for team collaboration. The Slack MCP server enables Enterprise h2oGPTe agents to send messages, read channel history, manage conversations, and interact with Slack workspaces programmatically.
For more information, visit Slack.
When to Use​
This MCP server is useful for:
- Enabling Enterprise h2oGPTe agents to send automated messages and notifications to Slack channels based on conversation outcomes or triggers
- Allowing agents to read and summarize Slack channel conversations to provide context for questions or generate reports
- Integrating Slack communications with Enterprise h2oGPTe's knowledge base for unified team collaboration and information sharing
- Automating team communication workflows where agents can post updates, share findings, or notify team members about important information
Requirements​
Before configuring this MCP server, ensure you have:
- Slack workspace access
- One of the following Slack tokens — you do not need both:
- A user token (
xoxp-…) — for full workspace access, including message search - A bot token (
xoxb-…) — for posting in channels the bot has been invited to
- A user token (
Key Features​
The Slack MCP server provides the following capabilities:
- Send messages to Slack channels and direct messages
- Read channel history and conversation threads
- Search messages across Slack workspaces (user token only — see Authentication)
- Manage conversation threads and replies
- Post formatted messages with attachments and rich content
Configuration​
Add the following configuration in Agents > Tools > New Tool > Remote MCP Tools:
{
"slack": {
"setup_commands": [
"npx -y slack-mcp-server@latest"
],
"command": "npx",
"args": [
"-y",
"slack-mcp-server@latest",
"--transport",
"stdio"
],
"env": {
"SLACK_MCP_XOXP_TOKEN": "os.environ/SLACK_MCP_XOXP_TOKEN",
"SLACK_MCP_XOXB_TOKEN": "os.environ/SLACK_MCP_XOXB_TOKEN"
}
}
}
You only need to configure one token. In Agents > Authentication, assign only the token type you are using — the other can be left unset.
Authentication​
Provide one of the following tokens in Agents > Authentication. You do not need both.
Token types​
User token (xoxp-…) | Bot token (xoxb-…) | |
|---|---|---|
| Environment variable | SLACK_MCP_XOXP_TOKEN | SLACK_MCP_XOXB_TOKEN |
| Posts as | The authenticated Slack user | The Slack app's bot user |
| Channel access | All channels the user can see | Only channels the bot has been invited to |
| Message search | Supported | Not supported |
| When to use | Acting on behalf of a specific user; when message search is needed | Automated notifications and workflows; posting as the app without linking activity to a personal account |
Message search is not available with a bot token. If your agent needs to search Slack messages, use a user token instead.
Obtaining a user token (xoxp-…)​
User tokens are issued through Slack's OAuth flow after a user installs and authorizes the Slack app. To create one:
- Go to api.slack.com/apps and open your app.
- Under OAuth & Permissions, add the required User Token Scopes for the operations your agent will perform.
- Click Install to Workspace and complete the OAuth authorization.
- Copy the User OAuth Token (starts with
xoxp-).
Obtaining a bot token (xoxb-…)​
Bot tokens are issued to the Slack app itself and do not depend on any individual user account. To create one:
- Go to api.slack.com/apps and open your app.
- Under OAuth & Permissions, add the required Bot Token Scopes for the operations your agent will perform.
- Click Install to Workspace.
- Copy the Bot User OAuth Token (starts with
xoxb-). - Invite the bot to each Slack channel it needs to access (
/invite @your-bot-name).
Notes​
- This MCP server uses STDIO transport protocol.
- Requires Node.js and npm to be installed for the
npxcommand. - Only one token needs to be configured — set
SLACK_MCP_XOXP_TOKENfor a user token orSLACK_MCP_XOXB_TOKENfor a bot token, not both. - Refer to the Slack MCP server documentation for the full list of scopes required by each operation.
- Submit and view feedback for this page
- Send feedback about Enterprise h2oGPTe to cloud-feedback@h2o.ai