Skip to main content
RapidDev - Software Development Agency
mcp-tutorial

How to use the Slack MCP server

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.

What you'll learn

  • How to create a Slack Bot and get the right OAuth scopes
  • How to configure the Slack MCP server with your bot token
  • How to read channels, search messages, and send messages through AI
  • How to set up the server in Claude Desktop, Cursor, and VS Code
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner7 min read20 minutesClaude Desktop, Cursor, Windsurf, VS Code (Copilot)March 2026RapidDev Engineering Team
TL;DR

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

1

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.

typescript
1Required Bot Token Scopes:
2- channels:history Read public channel messages
3- channels:read List public channels
4- chat:write Send messages
5- search:read Search workspace messages
6- users:read Read user profiles
7
8Optional scopes:
9- groups:history Read private channel messages
10- groups:read List private channels
11- im:history Read direct messages
12- reactions:read Read emoji reactions

Expected result: You have a Slack app with the required Bot Token Scopes configured.

2

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.

3

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.

typescript
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.

4

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.

5

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.

typescript
1Example prompts:
2
3"List all public channels in my Slack workspace"
4
5"Show me the last 20 messages in the #general channel"
6
7"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.

6

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.

typescript
1Example prompts:
2
3"Send a message to #team-updates saying: Deployment to production completed successfully at 3pm ET"
4
5"Summarize the last 50 messages in #engineering and post a summary to #engineering-digest"
6
7"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

claude_desktop_config.json
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}
15
16// 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// }
28
29// Required Bot Token Scopes (api.slack.com/apps):
30// - channels:history
31// - channels:read
32// - chat:write
33// - search:read
34// - users:read
35
36// Available tools:
37// - list_channels: List workspace channels
38// - read_channel_messages: Read message history
39// - send_message: Post a message to a channel
40// - search_messages: Search across workspace
41// - get_user_info: Get user profile details
42// - get_channel_info: Get channel metadata
43// - reply_to_thread: Reply in a message thread

Common 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.

ChatGPT Prompt

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.

MCP Prompt

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.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.