The Slack MCP server lets your AI assistant read channels, send messages, search conversation history, and manage Slack workspace data through natural language. Set up a Slack Bot with the right OAuth scopes, add the bot token to your MCP configuration, and your AI can instantly interact with your Slack workspace — answering questions about past conversations, drafting messages, and searching for information across channels.
Connect Your AI Assistant to Slack for Reading and Sending Messages
The @modelcontextprotocol/server-slack MCP server connects your AI assistant to your Slack workspace via the Slack Web API. It can list channels, read message history, send messages, search conversations, and access user profiles. This is powerful for summarizing long threads, searching for past decisions, drafting announcements, and automating routine messages. The server authenticates using a Slack Bot Token, which you create through the Slack API portal with the specific OAuth scopes your workflow needs.
Prerequisites
- A Slack workspace where you have permission to install apps (or admin access)
- Node.js 18 or later installed on your machine
- Claude Desktop, Cursor, or another MCP-compatible AI host
- Basic familiarity with Slack channels and workspaces
Step-by-step guide
Create a Slack App and Bot
Create a Slack App and Bot
Go to api.slack.com/apps and click Create New App. Choose 'From scratch' and select your workspace. Under OAuth & Permissions, add the following Bot Token Scopes: channels:history (read public channel messages), channels:read (list channels), chat:write (send messages), search:read (search messages), users:read (read user profiles). You may also want groups:history and im:history if you need access to private channels or direct messages.
1Required Bot Token Scopes:2- channels:history — Read public channel messages3- channels:read — List public channels4- chat:write — Send messages5- search:read — Search workspace messages6- users:read — Read user profiles78Optional scopes:9- groups:history — Read private channel messages10- groups:read — List private channels11- im:history — Read direct messages12- reactions:read — Read emoji reactionsExpected result: You have a Slack app with the required Bot Token Scopes configured.
Install the app and copy the Bot Token
Install the app and copy the Bot Token
In your Slack app settings, go to OAuth & Permissions and click 'Install to Workspace'. Authorize the requested permissions. After installation, copy the Bot User OAuth Token — it starts with xoxb-. This is the token you will use in your MCP configuration. Also invite the bot to any channels you want it to access by typing /invite @your-bot-name in each channel.
Expected result: You have a Bot User OAuth Token (xoxb-...) and the bot is invited to your target channels.
Add the Slack MCP server to your configuration
Add the Slack MCP server to your configuration
Open your MCP host's configuration file and add a slack entry. The bot token is passed as an environment variable called SLACK_BOT_TOKEN. For Claude Desktop and Cursor, use the mcpServers key. The server uses npx with the -y flag for automatic installation.
1{2 "mcpServers": {3 "slack": {4 "command": "npx",5 "args": [6 "-y",7 "@modelcontextprotocol/server-slack"8 ],9 "env": {10 "SLACK_BOT_TOKEN": "xoxb-your-bot-token-here"11 }12 }13 }14}Expected result: Your configuration file contains the Slack MCP server entry with your bot token.
Restart your AI host and verify the connection
Restart your AI host and verify the connection
Fully quit and reopen Claude Desktop, Cursor, or VS Code. The Slack MCP server will authenticate with your workspace using the bot token. Once connected, its tools will be available. In Claude Desktop, the hammer icon indicates tools are ready. If the connection fails, verify your bot token and that the app is installed to your workspace.
Expected result: The Slack MCP server shows as connected with tools for reading channels, sending messages, and searching.
Read channels and search message history
Read channels and search message history
Start with read operations to verify the connection. Ask the AI to list channels, read recent messages from a specific channel, or search for messages containing specific keywords. The AI uses the Slack Web API through the MCP server to fetch this data in real time.
1Example prompts:23"List all public channels in my Slack workspace"45"Show me the last 20 messages in the #general channel"67"Search for messages mentioning 'product launch' in the last 7 days"Expected result: The AI returns channel lists, message history, and search results from your Slack workspace.
Send messages and interact with your workspace
Send messages and interact with your workspace
Once reading works, try sending messages. The AI can post messages to channels, reply to threads, and help draft announcements. Always review the message content before approving it in Claude Desktop's confirmation dialog. The bot will appear as the sender in Slack.
1Example prompts:23"Send a message to #team-updates saying: Deployment to production completed successfully at 3pm ET"45"Summarize the last 50 messages in #engineering and post a summary to #engineering-digest"67"Draft a standup update based on the messages I sent in #dev today and post it to #standups"Expected result: The AI sends messages to the specified channels and they appear in Slack from the bot.
Complete working example
1{2 "mcpServers": {3 "slack": {4 "command": "npx",5 "args": [6 "-y",7 "@modelcontextprotocol/server-slack"8 ],9 "env": {10 "SLACK_BOT_TOKEN": "xoxb-your-bot-token-here"11 }12 }13 }14}1516// VS Code variant (.vscode/mcp.json):17// {18// "servers": {19// "slack": {20// "command": "npx",21// "args": ["-y", "@modelcontextprotocol/server-slack"],22// "env": {23// "SLACK_BOT_TOKEN": "xoxb-your-bot-token-here"24// }25// }26// }27// }2829// Required Bot Token Scopes (api.slack.com/apps):30// - channels:history31// - channels:read32// - chat:write33// - search:read34// - users:read3536// Available tools:37// - list_channels: List workspace channels38// - read_channel_messages: Read message history39// - send_message: Post a message to a channel40// - search_messages: Search across workspace41// - get_user_info: Get user profile details42// - get_channel_info: Get channel metadata43// - reply_to_thread: Reply in a message threadCommon mistakes when using the Slack MCP server
Why it's a problem: Using a User Token (xoxp-) instead of a Bot Token (xoxb-)
How to avoid: The MCP server requires a Bot User OAuth Token, which starts with xoxb-. User tokens have different permission models and scopes. Use the Bot token from OAuth & Permissions in your Slack app settings.
Why it's a problem: Forgetting to invite the bot to channels
How to avoid: Slack bots can only access channels they are invited to. Use /invite @your-bot-name in each channel you want the AI to read or post to. Without an invitation, channel operations will return permission errors.
Why it's a problem: Not adding the search:read scope
How to avoid: Message search requires the search:read Bot Token Scope. If you forgot this scope, go to your Slack app settings > OAuth & Permissions, add the scope, and reinstall the app to your workspace.
Why it's a problem: Sending messages without reviewing them first
How to avoid: Always verify the message content in the approval dialog before confirming. The AI might misinterpret your intent or draft an inappropriate message. You are responsible for everything the bot posts.
Best practices
- Start with read-only scopes and add write permissions only when needed
- Invite the bot to specific channels rather than giving it broad workspace access
- Review all outgoing messages before approving them in the confirmation dialog
- Use the search tool to find information before asking the AI to summarize entire channels
- Set up a dedicated bot name that makes it clear messages come from AI (e.g., Claude Assistant)
- Rotate your bot token periodically for security
- Use thread replies instead of channel messages for follow-up discussions
- Combine with other MCP servers — search Slack for context, then update code or databases
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I want to set up the Slack MCP server so my AI assistant can read channels and send messages in my workspace. Walk me through creating a Slack app, getting the right scopes, and configuring Claude Desktop to use the server.
Search Slack for all messages mentioning 'API error' in the last 3 days, summarize the issues found, and post a summary to the #incidents channel with action items.
Frequently asked questions
Can the AI read private channels and direct messages?
Only if you add the groups:history scope (for private channels) and im:history scope (for DMs) to your bot, and invite the bot to those private channels. By default, the bot only accesses public channels it has been invited to.
Will messages sent by the bot show my name or the bot's name?
Messages are sent as the bot, not as your personal account. The bot's name and icon (configured in your Slack app settings) will appear as the sender. Make sure your bot has a clear name so recipients know it is AI-generated.
Is there a rate limit on Slack API calls?
Yes. Slack's Web API has rate limits (typically 1 request per second for most methods). The MCP server handles this automatically with retries, but asking the AI to fetch thousands of messages or search repeatedly in quick succession may hit limits.
Can I use this with Slack Enterprise Grid?
The MCP server works with individual workspaces. For Enterprise Grid with multiple workspaces, you need to install the app to each workspace separately and create separate MCP server entries for each bot token.
What happens if I revoke the bot token?
The MCP server will fail to connect and show as disconnected in your AI host. You will need to reinstall the Slack app, copy the new bot token, update your MCP config, and restart your AI host.
Can I use this to automate Slack workflows for my team?
The MCP server is designed for interactive AI-assisted use, not autonomous automation. For production Slack automation, consider using Slack's Workflow Builder or a dedicated automation platform. RapidDev can help design and build custom Slack integrations for complex team workflows.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation