Slack MCP Server
Connect your AI agent to Slack. Read channels, search conversations, post messages, manage threads, and turn team discussions into structured action items.
Paste this into Claude Code to set it up:
I want to add the Slack MCP Server to my Claude Code setup.
IMPORTANT: Never use Read/Edit tools on ~/.claude.json. Use jq via Bash instead.
Prerequisites: You need a Slack Bot Token (starts with xoxb-). To get one:
1. Go to api.slack.com/apps and click "Create New App" > "From scratch"
2. Under OAuth and Permissions, add scopes: channels:history, channels:read, chat:write, groups:history, groups:read, search:read, users:read
3. Install the app to your workspace and copy the Bot User OAuth Token
Run this command to add the MCP server (replace xoxb-your-token with your actual token):
```bash
jq '.mcpServers["slack"] = {"type": "stdio", "command": "npx", "args": ["-y", "@anthropic/slack-mcp"], "env": {"SLACK_BOT_TOKEN": "xoxb-your-token"}}' ~/.claude.json > /tmp/claude-json-tmp && mv /tmp/claude-json-tmp ~/.claude.json
```
After adding, restart Claude Code. Remember to invite the bot to any channels it should access with /invite @your-bot-name in Slack.01What It Does
02Real Scenarios
"Summarize #engineering today"
The agent reads all messages, identifies key discussions and decisions, and provides a structured summary in 30 seconds instead of 15 minutes of scrolling.
"What happened while I was on PTO?"
The agent reads your key channels from the past week, filters noise, and creates a digest of important discussions and anything mentioning you.
"Create tasks from the standup thread"
The agent reads the standup thread, extracts blockers and commitments, and creates prioritized tasks in Todoist for each action item.
"Post the deploy notification to #releases"
After a deployment, the agent posts a formatted message with version number, changes included, and relevant links.
03Setup
Create a Slack App
Go to api.slack.com/apps, click "Create New App," choose "From scratch," and select your workspace.
Add Bot Token Scopes
Under OAuth and Permissions, add: channels:history, channels:read, chat:write, groups:history, groups:read, search:read, users:read.
Install and Copy Token
Install the app to your workspace. Copy the Bot User OAuth Token (starts with xoxb-).
Invite the Bot
In Slack, invite the bot to channels it should access with /invite @your-bot-name.
"slack": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@anthropic/slack-mcp"],
"env": { "SLACK_BOT_TOKEN": "xoxb-your-token" }
}