slack — Claude Code MCP server: messages and threads
An MCP server for Slack that reads channels and threads, posts and edits messages, and adds reactions. Useful when your agent has to work with chat without leaving the editor.
claude mcp add --env SLACK_BOT_TOKEN=<SLACK_BOT_TOKEN> --env ENABLED_TOOLGROUPS=<ENABLED_TOOLGROUPS> --transport stdio slack -- npx -y slack-workspace-mcp-serverWhat slack does
The server hands your agent a set of Slack tools. For reading there is slack_get_channels for the channels it can reach, slack_get_channel for channel details plus recent messages, and slack_get_thread for a full conversation. For writing: slack_post_message sends something new, slack_reply_to_thread keeps a discussion going, slack_update_message changes a message you already sent, slack_react_to_message adds an emoji, and slack_upload_snippet pushes long text as a file when it will not fit in a message.
It runs through npx, so Node has to be on the machine. Set up the bot first: create an app at api.slack.com/apps, add the Bot Token Scopes (channels:read, channels:history, groups:read, groups:history, chat:write, reactions:write, files:write), install it into the workspace, then copy the xoxb- token. No SLACK_BOT_TOKEN, no server. ENABLED_TOOLGROUPS is optional — readonly strips the write tools, write keeps everything.
What the bot may see depends on its scopes. Private channels stay invisible without groups:read and groups:history, and no agent can talk its way around that.
What it helps with
- pull a thread and find the decisions in it
- post to a channel from the terminal
- fix a message that already went out
- react to a message with an emoji
- upload a long log as a snippet
Example prompts for the agent
- Show me the latest messages in #backend
- Reply in the thread about the deploy
- Post a release note to #releases
How to install slack
Platform CLI
claude mcp add --env SLACK_BOT_TOKEN=<SLACK_BOT_TOKEN> --env ENABLED_TOOLGROUPS=<ENABLED_TOOLGROUPS> --transport stdio slack -- npx -y slack-workspace-mcp-serverReplace <…> with your own values
Platform CLI
codex mcp add slack --env SLACK_BOT_TOKEN=<SLACK_BOT_TOKEN> --env ENABLED_TOOLGROUPS=<ENABLED_TOOLGROUPS> -- npx -y slack-workspace-mcp-serverReplace <…> with your own values
Config file
{
"mcpServers": {
"slack": {
"command": "npx",
"args": [
"-y",
"slack-workspace-mcp-server"
],
"env": {
"SLACK_BOT_TOKEN": "<SLACK_BOT_TOKEN>",
"ENABLED_TOOLGROUPS": "<ENABLED_TOOLGROUPS>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"slack": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"slack-workspace-mcp-server"
],
"env": {
"SLACK_BOT_TOKEN": "<SLACK_BOT_TOKEN>",
"ENABLED_TOOLGROUPS": "<ENABLED_TOOLGROUPS>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e SLACK_BOT_TOKEN=<SLACK_BOT_TOKEN> -e ENABLED_TOOLGROUPS=<ENABLED_TOOLGROUPS> slack npx -y slack-workspace-mcp-serverReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about slack
How do I install slack in Claude Code?
Run claude mcp add slack -e SLACK_BOT_TOKEN=<SLACK_BOT_TOKEN> -- npx -y slack-workspace-mcp-server. To set ENABLED_TOOLGROUPS as well, use the two---env form: `claude mcp add --env SLACK_BOT_TOKEN=<SLACK_BOT_TOKEN> --env ENABLED_TOOLGROUPS=<ENABLED_TOOLGROUPS> --transport stdio slack -- npx -y slack-workspace-mcp-server`.
What does the slack MCP server do?
It gives an agent access to Slack: listing channels, reading a channel or thread, posting messages and replies, editing your own messages, adding reactions and uploading snippets.
What do I need before running it?
A Slack workspace where you can create apps, plus a Bot User OAuth Token passed as SLACK_BOT_TOKEN. The server starts via npx, so Node must be installed.