Overview
Read, write, and manage Slack messages, channels, and users.
Setup
Run with npx:
npx -y @modelcontextprotocol/server-slackConfiguration
SLACK_BOT_TOKEN environment variable (xoxb-...)Documentation
Slack MCP
Overview
Slack MCP is a Model Context Protocol server that enables AI agents to interact with Slack workspaces. It allows agents to read messages, send messages, manage channels, and integrate with Slack's collaboration features.
Key Features
💬 Messaging
- Read Messages: Fetch messages from channels and DMs
- Send Messages: Post messages to channels or users
- Reply to Threads: Respond to specific thread messages
- React to Messages: Add emojis to messages
📺 Channel Management
- List Channels: View all public and private channels
- Create Channels: Create new channels
- Join/Leave Channels: Manage channel membership
- Get Channel Info: View channel details and members
👥 User Management
- List Users: View all workspace members
- Get User Info: View user profile details
- Get User Email: Retrieve user email addresses
🔍 Search
- Search Messages: Find messages by keyword
- Search Channels: Find channels by name
- Filter by Date: Search within date ranges
Installation
# Using npx (recommended)
npx -y @modelcontextprotocol/server-slack
# With Slack token
SLACK_BOT_TOKEN=xoxb-your-bot-token npx -y @modelcontextprotocol/server-slack
Configuration
Required Setup
-
Create a Slack App:
- Visit Slack API
- Click "Create New App" → "From scratch"
- Name your app and select your workspace
-
Configure OAuth Scopes: Go to OAuth & Permissions and add these scopes:
channels:history- View messages in channelschannels:read- View channel list and infochannels:manage- Create and manage channelschat:write- Send messagesusers:read- View user list and infousers:read.email- View user emailsreactions:write- Add emoji reactionssearch:read- Search messages and files
-
Install to Workspace:
- Click "Install to Workspace"
- Authorize the app
- Copy the Bot User OAuth Token (starts with
xoxb-)
-
Enable Message Subscription (optional, for real-time updates):
- Go to Event Subscriptions
- Enable events
- Add bot event subscriptions
-
Configure in Claude Desktop:
{ "mcpServers": { "slack": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-slack"], "env": { "SLACK_BOT_TOKEN": "xoxb-your-bot-token-here" } } } }
Available Tools
| Tool | Description |
|---|---|
list_channels | List all accessible channels |
get_channel_info | Get details about a specific channel |
get_channel_members | Get members of a specific channel |
join_channel | Join a channel |
leave_channel | Leave a channel |
create_channel | Create a new channel |
list_users | List all workspace users |
get_user_info | Get details about a specific user |
get_user_email | Get email address of a user |
get_messages | Get messages from a channel |
post_message | Post a message to a channel |
reply_to_thread | Reply to a message thread |
add_reaction | Add an emoji reaction to a message |
search_messages | Search for messages by keyword |
search_channels | Search for channels by name |
Usage Examples
List Channels
Show me all the channels I'm in
Returns:
Channels:
- #general (156 members)
- #engineering (89 members)
- #product (45 members)
- #random (203 members)
- #announcements (156 members)
Get Channel Messages
Show me the last 10 messages from #engineering
Returns recent messages with timestamps and authors.
Search Messages
Find messages mentioning "deployment" from last week
Agent searches with:
- Query:
deployment - Date range: Last 7 days
Post a Message
Post this message to #general: "Team meeting tomorrow at 2pm"
Create a Channel
Create a new channel called #project-alpha
Get User Info
Who is @john.doe?
Returns:
Name: John Doe
Email: john.doe@company.com
Title: Senior Engineer
Status: 🚀 Shipping v2.0
Timezone: America/Los_Angeles
Reply to Thread
Reply to the last message in #engineering with "Thanks for the update!"
Add Reaction
Add a 👍 reaction to the message "Deployment successful" in #engineering
Search for Files
Find PDF files shared in #product last month
Integration with AI Agents
Meeting Assistant
Claude: "I see you have a team meeting in #general..."
[Reads meeting announcement]
Claude: "Would you like me to create a follow-up channel for meeting notes?"
[Creates #meeting-notes-2026-05-15]
Claude: "I'll track action items from the meeting and post summaries..."
Customer Support
User: "Someone asked about pricing in #support"
Claude: "Let me find that message..."
[Searches #support for pricing questions]
Claude: "Here's the message. Would you like me to draft a response?"
[Drafts response, posts to thread]
Team Coordination
Claude: "I noticed @alice mentioned a blocker in #engineering..."
[Reads message, identifies blocker]
Claude: "Should I notify the engineering lead?"
[Posts notification to #engineering-lead]
Daily Digest
Claude: "Here's your daily Slack digest..."
[Summarizes mentions, reactions, and important messages]
Claude: "You have 3 unread messages in #project-alpha and 2 mentions..."
Custom Agent Integration
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
import os
# Connect to Slack MCP
server_params = StdioServerParameters(
command="npx",
args=["-y", "@modelcontextprotocol/server-slack"],
env={"SLACK_BOT_TOKEN": os.environ["SLACK_BOT_TOKEN"]}
)
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
# List channels
channels = await session.call_tool("list_channels", arguments={})
# Get messages
messages = await session.call_tool(
"get_messages",
arguments={"channel_id": "C123456", "limit": 10}
)
# Post message
result = await session.call_tool(
"post_message",
arguments={
"channel_id": "C123456",
"text": "Hello from the AI agent!"
}
)
# Search messages
results = await session.call_tool(
"search_messages",
arguments={"query": "deployment", "count": 20}
)
Security Considerations
Bot Token Security
⚠️ Important: Protect your Slack bot token:
- Never commit tokens to version control
- Use environment variables or secret managers
- Rotate tokens regularly
- Use the minimum required scopes
Channel Access
- Bot only sees channels it's invited to
- Private channels require explicit invitation
- Consider using a dedicated bot user for MCP
Message Privacy
- Bot can only read messages in channels it has access to
- DMs require additional permissions
- Be mindful of sensitive information in channels
Pros
- ✅ Real-Time Collaboration: Direct Slack integration
- ✅ Rich Messaging: Send, read, reply, react
- ✅ Channel Management: Create and manage channels
- ✅ User Directory: Access workspace user information
- ✅ Search Capabilities: Find messages and channels
- ✅ Thread Support: Work with threaded conversations
Cons
- ❌ Token Required: Must create Slack app and bot
- ❌ Scope Permissions: Need multiple OAuth scopes
- ❌ Rate Limits: Slack API has rate limits
- ❌ Bot Limitations: Can't access all user features
- ❌ Setup Complexity: Multi-step Slack app setup
When to Use
Choose Slack MCP when:
- Your team uses Slack for communication
- You want AI to participate in Slack conversations
- You need to search and analyze Slack messages
- You want automated Slack notifications
Consider alternatives when:
- Your team uses Discord, Teams, or other platforms
- You only need occasional Slack access
- You need advanced Slack workflow automation
Resources
- GitHub: https://github.com/modelcontextprotocol/servers/tree/main/src/slack
- Slack API Docs: https://api.slack.com/
- Slack App Management: https://api.slack.com/apps
- MCP Servers Repo: https://github.com/modelcontextprotocol/servers
Comparison
| Feature | Slack MCP | Discord MCP | Teams MCP |
|---|---|---|---|
| Platform | Slack | Discord | Microsoft Teams |
| Setup | ⚠️ Moderate | ✅ Easy | ⚠️ Complex |
| Message Access | ✅ Full | ✅ Full | ⚠️ Limited |
| Channel Mgmt | ✅ Yes | ✅ Yes | ⚠️ Limited |
| Search | ✅ Yes | ✅ Yes | ⚠️ Limited |
| Enterprise | ✅ Yes | ⚠️ No | ✅ Yes |
Last updated: May 2026
