How to Set Up Slack MCP Server (2026)
Connect Slack to AI assistants via the Model Context Protocol
Start Building with Hypereal
Access Kling, Flux, Sora, Veo & more through a single API. Free credits to start, scale to millions.
No credit card required • 100k+ developers • Enterprise ready
How to Set Up Slack MCP Server in 2026
The Model Context Protocol (MCP) lets AI assistants connect to external tools and data sources through a standardized interface. A Slack MCP server gives your AI assistant direct access to Slack -- reading channels, searching messages, posting updates, and managing workflows without leaving your coding environment.
This guide walks you through setting up a Slack MCP server, connecting it to AI tools like Claude Code and Cursor, and using it effectively in your development workflow.
What Can a Slack MCP Server Do?
With a Slack MCP server, your AI assistant can:
| Capability | Description |
|---|---|
| Read channels | List and read messages from public and private channels |
| Search messages | Find specific messages across your workspace |
| Post messages | Send messages and replies to channels |
| List channels | Get a list of all channels in the workspace |
| Manage threads | Read and reply to thread conversations |
| Get user info | Look up user profiles and status |
| React to messages | Add emoji reactions to messages |
| Upload files | Share files and code snippets to channels |
Prerequisites
Before you start, you need:
- A Slack workspace where you have admin permissions (or can request app installation)
- Node.js 18+ installed on your machine
- An MCP-compatible AI tool such as Claude Code, Cursor, or Windsurf
Step 1: Create a Slack App
First, create a Slack App to get the credentials your MCP server needs.
- Go to api.slack.com/apps.
- Click Create New App.
- Choose From scratch.
- Name your app (e.g., "MCP Server") and select your workspace.
- Click Create App.
Configure OAuth Scopes
Navigate to OAuth & Permissions in the sidebar and add these Bot Token Scopes:
channels:history - View messages in public channels
channels:read - View basic channel info
chat:write - Send messages as the app
groups:history - View messages in private channels
groups:read - View basic private channel info
im:history - View direct messages
im:read - View basic DM info
reactions:read - View emoji reactions
reactions:write - Add emoji reactions
search:read - Search messages
users:read - View basic user info
files:write - Upload files
Install to Workspace
- Scroll up to OAuth Tokens for Your Workspace.
- Click Install to Workspace.
- Review the permissions and click Allow.
- Copy the Bot User OAuth Token (starts with
xoxb-).
Step 2: Install the Slack MCP Server
The most widely used Slack MCP server is the official one from Anthropic's MCP repository:
# Install globally
npm install -g @anthropic/mcp-server-slack
# Or use npx (no install needed)
npx @anthropic/mcp-server-slack
Alternatively, clone and build from source:
git clone https://github.com/modelcontextprotocol/servers.git
cd servers/src/slack
npm install
npm run build
Step 3: Configure Environment Variables
The Slack MCP server needs your bot token and optionally a team ID:
# Required
export SLACK_BOT_TOKEN="xoxb-your-bot-token-here"
# Optional: restrict to a specific workspace
export SLACK_TEAM_ID="T01ABCDEFGH"
You can also create a .env file:
# .env
SLACK_BOT_TOKEN=xoxb-your-bot-token-here
SLACK_TEAM_ID=T01ABCDEFGH
Step 4: Connect to Claude Code
Add the Slack MCP server to your Claude Code configuration:
# Add via CLI
claude mcp add slack -- npx @anthropic/mcp-server-slack
Or manually edit your MCP config file at ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"slack": {
"command": "npx",
"args": ["@anthropic/mcp-server-slack"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-bot-token-here",
"SLACK_TEAM_ID": "T01ABCDEFGH"
}
}
}
}
Restart Claude Code to pick up the new configuration.
Step 5: Connect to Cursor
For Cursor, add the MCP server in your project's .cursor/mcp.json or the global MCP config:
{
"mcpServers": {
"slack": {
"command": "npx",
"args": ["@anthropic/mcp-server-slack"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-bot-token-here",
"SLACK_TEAM_ID": "T01ABCDEFGH"
}
}
}
}
Open Cursor, go to Settings > MCP, and verify the Slack server shows as connected.
Step 6: Connect to Claude Desktop
For Claude Desktop, edit the config at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"slack": {
"command": "npx",
"args": ["@anthropic/mcp-server-slack"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-bot-token-here",
"SLACK_TEAM_ID": "T01ABCDEFGH"
}
}
}
}
Restart Claude Desktop to activate the connection.
Using the Slack MCP Server
Once connected, you can ask your AI assistant to interact with Slack using natural language. Here are practical examples:
Read Channel Messages
"Read the last 10 messages from the #engineering channel"
The AI will use the slack_get_channel_history tool to fetch recent messages and summarize them.
Search for Information
"Search Slack for messages about the database migration plan"
The AI uses slack_search_messages to find relevant conversations across all channels.
Post Updates
"Post a message to #deployments saying: v2.4.1 deployed to production. All health checks passing."
The AI uses slack_post_message to send the message to the specified channel.
Summarize Discussions
"Read the thread about the API redesign in #backend and summarize the key decisions"
The AI reads the thread, processes all replies, and provides a summary.
Check for Context Before Coding
"Check if anyone in #frontend discussed the new auth flow implementation today"
This is particularly useful when starting work on a feature -- your AI assistant can check Slack for relevant context before writing code.
Available MCP Tools
The Slack MCP server exposes these tools to your AI assistant:
| Tool | Description |
|---|---|
slack_list_channels |
List all channels in the workspace |
slack_get_channel_history |
Get recent messages from a channel |
slack_post_message |
Send a message to a channel |
slack_reply_to_thread |
Reply to a specific message thread |
slack_search_messages |
Search messages across the workspace |
slack_get_user_info |
Get profile info for a user |
slack_add_reaction |
Add an emoji reaction to a message |
slack_get_thread_replies |
Get all replies in a thread |
Security Best Practices
Use minimal scopes. Only add the OAuth scopes your workflow actually needs. If you only need to read messages, skip
chat:write.Restrict to specific channels. If your MCP server only needs access to certain channels, invite the bot only to those channels rather than granting workspace-wide access.
Rotate tokens regularly. Regenerate your bot token periodically, especially if it was stored in a config file.
Never commit tokens. Add your MCP config files to
.gitignoreor use environment variables rather than hardcoding tokens.Audit bot activity. Check the Slack App's activity logs periodically to ensure the MCP server is only performing expected actions.
# .gitignore
.cursor/mcp.json
claude_desktop_config.json
.env
Troubleshooting
| Issue | Solution |
|---|---|
| "not_authed" error | Verify your SLACK_BOT_TOKEN is correct and starts with xoxb- |
| "missing_scope" error | Add the required scope in your Slack App's OAuth settings and reinstall |
| Cannot see private channels | Invite the bot to the private channel first |
| MCP server not showing in tool | Restart your AI tool after changing the config |
| Slow responses | Check your network connection; Slack API has rate limits of ~1 req/sec |
Frequently Asked Questions
Is the Slack MCP server free? Yes, both the MCP server software and the Slack API are free for standard usage. Slack's API has generous rate limits for bot tokens.
Can the AI assistant read DMs?
Only if you add im:history scope and the bot is in the DM conversation. The bot cannot read DMs it has not been explicitly invited to.
Does this work with Slack Enterprise Grid? Yes, but you may need additional admin approvals for the app installation and OAuth scopes.
Can I use this with multiple Slack workspaces? Yes. Add multiple MCP server entries in your config, each with a different bot token and server name.
What AI tools support MCP? Claude Code, Claude Desktop, Cursor, Windsurf, Cline, and other tools implementing the MCP standard.
Wrapping Up
A Slack MCP server bridges the gap between your team communication and your AI coding assistant. Instead of switching between Slack and your editor to check context, your AI can pull in relevant discussions, post updates, and keep your team informed, all from within your development workflow.
If you are building projects that involve AI-generated media like images, video, or talking avatars, try Hypereal AI free -- 35 credits, no credit card required. Combine it with your MCP-powered workflow for seamless AI media generation.
Related Articles
Start Building Today
Get 35 free credits on signup. No credit card required. Generate your first image in under 5 minutes.
