Slack MCP Server — Slack Integration for AI
MCP server for Slack workspace integration. Read channels, post messages, search conversations, and manage threads from Claude Code or Cursor.
What it is
This Slack MCP Server provides Slack workspace integration for AI tools via the Model Context Protocol. It lets AI assistants like Claude Code and Cursor read channels, post messages, search conversations, and manage threads within Slack workspaces. The server runs locally and communicates with the Slack API using a bot token.
This integration targets developers who want their AI coding tools to participate in team communication without switching to the Slack app. The AI agent reads context from channels and posts updates directly.
Why it saves time or tokens
Context switching between coding and team communication breaks focus. This MCP server keeps everything in one interface. The AI agent can search Slack history for past decisions, post code review summaries to channels, and notify teams about deployments without the developer leaving their editor.
How to use
- Create a Slack Bot with the necessary OAuth scopes in your Slack workspace settings
- Add the MCP server configuration to your AI tool's settings with the bot token
- Use natural language to instruct the agent to interact with Slack
Example
{
'mcpServers': {
'slack': {
'command': 'npx',
'args': ['-y', 'slack-mcp-server'],
'env': {
'SLACK_BOT_TOKEN': 'xoxb-your-bot-token',
'SLACK_TEAM_ID': 'T01234567'
}
}
}
}
Example agent commands:
- 'Read the last 10 messages in #engineering'
- 'Post to #releases: v3.2.0 deployed successfully'
- 'Search Slack for database migration discussions'
| Capability | Description |
|---|---|
| Read channels | Fetch recent messages and history |
| Post messages | Send to any channel the bot joined |
| Search | Full-text search across workspace |
| Threads | Reply to and manage threads |
| Users | Look up user profiles |
Related on TokRepo
- MCP Slack integration — dedicated Slack MCP page on TokRepo
- AI tools for automation — communication automation tools
Common pitfalls
- The bot must be explicitly invited to each channel it needs to access; it cannot read channels it has not joined
- Slack rate limits apply to bot API calls; rapid operations may be throttled
- Bot tokens with broad scopes can read sensitive channels; use the principle of least privilege when configuring OAuth scopes
Frequently Asked Questions
The bot needs channels:read and channels:history to read public channels, chat:write to post messages, search:read to search history, and users:read for user lookups. For private channels, add groups:read and groups:history. Configure only the scopes you need.
Yes, if the bot has groups:read and groups:history scopes and has been invited to the private channel. The bot cannot discover or access private channels without an explicit invitation from a channel member.
Yes. Any AI tool that supports the Model Context Protocol can use this server. Claude Code and Cursor both support MCP servers through their configuration files. Add the server entry and the tool automatically discovers Slack capabilities.
No. The MCP server runs locally on your machine. Slack data is fetched from the Slack API and passed to your AI tool locally. The only external communication is between the server and Slack's official API endpoints over HTTPS.
Yes. The MCP server supports thread operations. You can instruct the agent to reply to a specific message thread by referencing the thread timestamp. This keeps discussions organized and avoids cluttering the main channel.
Citations (3)
- MCP Specification— MCP servers connect AI tools to external services
- Slack API Docs— Slack Bot API for programmatic workspace access
- Slack Scopes— Slack OAuth scopes for bot permissions
Related on TokRepo
Source & Thanks
Created by Anthropic. Licensed under MIT. modelcontextprotocol/servers