Slack MCP Server
Slack MCP servers enable AI models to interact with Slack workspaces, providing capabilities for channel management, message posting, thread handling, and team collaboration workflows.
Overview
The Slack MCP Server enables AI models to interact with Slack workspaces through the Model Context Protocol. This server provides comprehensive access to channels, messages, threads, reactions, and user information for team collaboration and workflow automation.
Official Server (Archived) + Community:
Official: Developed by Anthropic (now archived)
Community: korotovsky/slack-mcp-server - Enhanced implementation with DMs, search, and multiple transport support
Key Features
Message Management
Post messages, reply to threads, and manage conversations across channels
Channel Operations
List, search, and retrieve channel information and history
Message Search
Search messages across channels, DMs, and threads with filters
User Management
Access user profiles, lists, and team member information
Available Tools
Quick Reference
| Tool | Purpose | Category |
|---|---|---|
slack_list_channels | List workspace channels | Channels |
slack_post_message | Send message to channel | Messaging |
slack_reply_to_thread | Reply to message thread | Messaging |
slack_add_reaction | Add emoji reaction | Reactions |
slack_get_channel_history | Retrieve channel messages | History |
slack_get_thread_replies | Get thread responses | Threads |
slack_get_users | List workspace users | Users |
slack_get_user_profile | Get user details | Users |
slack_search_messages | Search across workspace | Search |
Detailed Usage
slack_list_channels▶
Retrieve list of public channels in the workspace with pagination support.
// List all channels (default: 100)
use_mcp_tool({
server_name: "slack",
tool_name: "slack_list_channels",
arguments: {}
});
// List channels with custom limit
use_mcp_tool({
server_name: "slack",
tool_name: "slack_list_channels",
arguments: {
limit: 50
}
});
// Paginate through channels
use_mcp_tool({
server_name: "slack",
tool_name: "slack_list_channels",
arguments: {
limit: 100,
cursor: "dXNlcjpVMDYxTkZUVDI="
}
});
Returns channel IDs, names, and basic metadata.
slack_post_message▶
Post a message to a specific channel.
// Simple text message
use_mcp_tool({
server_name: "slack",
tool_name: "slack_post_message",
arguments: {
channel_id: "C1234567890",
text: "Hello from Claude!"
}
});
// Message with formatting
use_mcp_tool({
server_name: "slack",
tool_name: "slack_post_message",
arguments: {
channel_id: "C1234567890",
text: "*Bold text*, _italic text_, and `code`"
}
});
// Message with blocks (rich formatting)
use_mcp_tool({
server_name: "slack",
tool_name: "slack_post_message",
arguments: {
channel_id: "C1234567890",
text: "Fallback text",
blocks: [
{
type: "section",
text: {
type: "mrkdwn",
text: "Project *Alpha* is ready for review"
}
}
]
}
});
Returns message timestamp and channel ID.
slack_reply_to_thread▶
Reply to an existing message thread.
use_mcp_tool({
server_name: "slack",
tool_name: "slack_reply_to_thread",
arguments: {
channel_id: "C1234567890",
thread_ts: "1234567890.123456",
text: "This is a reply to the thread"
}
});
// Reply and broadcast to channel
use_mcp_tool({
server_name: "slack",
tool_name: "slack_reply_to_thread",
arguments: {
channel_id: "C1234567890",
thread_ts: "1234567890.123456",
text: "Important update for everyone",
reply_broadcast: true
}
});
Returns reply message timestamp.
slack_add_reaction▶
Add an emoji reaction to a message.
// Add thumbs up
use_mcp_tool({
server_name: "slack",
tool_name: "slack_add_reaction",
arguments: {
channel_id: "C1234567890",
timestamp: "1234567890.123456",
reaction: "thumbsup"
}
});
// Add custom emoji
use_mcp_tool({
server_name: "slack",
tool_name: "slack_add_reaction",
arguments: {
channel_id: "C1234567890",
timestamp: "1234567890.123456",
reaction: "rocket"
}
});
Returns success confirmation.
slack_get_channel_history▶
Retrieve recent messages from a channel.
// Get last 10 messages (default)
use_mcp_tool({
server_name: "slack",
tool_name: "slack_get_channel_history",
arguments: {
channel_id: "C1234567890"
}
});
// Get last 50 messages
use_mcp_tool({
server_name: "slack",
tool_name: "slack_get_channel_history",
arguments: {
channel_id: "C1234567890",
limit: 50
}
});
// Get messages with time range
use_mcp_tool({
server_name: "slack",
tool_name: "slack_get_channel_history",
arguments: {
channel_id: "C1234567890",
oldest: "1234567890.000000",
latest: "1234567900.000000"
}
});
Returns array of messages with timestamps, text, and user IDs.
slack_get_thread_replies▶
Retrieve all replies in a message thread.
use_mcp_tool({
server_name: "slack",
tool_name: "slack_get_thread_replies",
arguments: {
channel_id: "C1234567890",
thread_ts: "1234567890.123456"
}
});
// Get replies with pagination
use_mcp_tool({
server_name: "slack",
tool_name: "slack_get_thread_replies",
arguments: {
channel_id: "C1234567890",
thread_ts: "1234567890.123456",
limit: 100
}
});
Returns array of thread messages in chronological order.
slack_get_users▶
List all users in the workspace with basic profile information.
// Get all users
use_mcp_tool({
server_name: "slack",
tool_name: "slack_get_users",
arguments: {}
});
// Get users with pagination
use_mcp_tool({
server_name: "slack",
tool_name: "slack_get_users",
arguments: {
limit: 100,
cursor: "dXNlcjpVMDYxTkZUVDI="
}
});
Returns user IDs, names, real names, and status.
slack_get_user_profile▶
Get detailed profile information for a specific user.
use_mcp_tool({
server_name: "slack",
tool_name: "slack_get_user_profile",
arguments: {
user_id: "U1234567890"
}
});
Returns full profile including email, phone, title, and custom fields.
slack_search_messages▶
Community Implementation:
This tool is available in community implementations like korotovsky/slack-mcp-server
Search messages across channels, DMs, and threads.
// Search by keyword
use_mcp_tool({
server_name: "slack",
tool_name: "slack_search_messages",
arguments: {
query: "project alpha"
}
});
// Search with date range
use_mcp_tool({
server_name: "slack",
tool_name: "slack_search_messages",
arguments: {
query: "deployment",
after: "2024-01-01",
before: "2024-12-31"
}
});
// Search by user
use_mcp_tool({
server_name: "slack",
tool_name: "slack_search_messages",
arguments: {
query: "review",
from: "U1234567890"
}
});
Returns matching messages with context and metadata.
Installation
Official Slack MCP Server (Archived)
{
"mcpServers": {
"slack": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-slack"
],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-bot-token",
"SLACK_TEAM_ID": "T1234567890"
}
}
}
}
Optional: Restrict to specific channels
{
"mcpServers": {
"slack": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-slack"
],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-bot-token",
"SLACK_TEAM_ID": "T1234567890",
"SLACK_CHANNEL_IDS": "C1234567890,C0987654321"
}
}
}
}
Setup Guide
1. Create Slack App
- Go to Slack API Apps
- Click "Create New App"
- Choose "From scratch"
- Enter app name and select workspace
- Click "Create App"
2. Configure OAuth Scopes
Navigate to OAuth & Permissions and add these Bot Token Scopes:
Required Scopes:
channels:history- View messages in public channelschannels:read- View basic channel informationchat:write- Send messages as the botreactions:write- Add emoji reactionsusers:read- View users in workspaceusers:read.email- View user email addresses
Optional Scopes:
groups:history- View messages in private channelsgroups:read- View private channel informationim:history- View direct messagesmpim:history- View group direct messagesfiles:read- View files shared in channels
3. Install App to Workspace
- Scroll to OAuth Tokens for Your Workspace
- Click "Install to Workspace"
- Review permissions and click "Allow"
- Copy the Bot User OAuth Token (starts with
xoxb-)
4. Get Team ID
Option A: From Workspace URL
- Your Slack URL:
https://yourworkspace.slack.com - Team ID appears in workspace settings
Option B: Using API
curl https://slack.com/api/team.info \
-H "Authorization: Bearer xoxb-your-token"
5. Configure MCP Server
Add the bot token and team ID to your MCP configuration as shown in the Installation section.
Common Use Cases
1. Automated Status Updates
Post automated updates to team channels:
// Post deployment notification
use_mcp_tool({
server_name: "slack",
tool_name: "slack_post_message",
arguments: {
channel_id: "C1234567890",
text: ":rocket: Deployment to production completed successfully!\n\n*Version:* v2.3.0\n*Time:* 14:30 UTC\n*Changes:* 15 commits merged"
}
});
// Add reaction to confirm
use_mcp_tool({
server_name: "slack",
tool_name: "slack_add_reaction",
arguments: {
channel_id: "C1234567890",
timestamp: "1234567890.123456",
reaction: "white_check_mark"
}
});
2. Thread-Based Discussions
Manage threaded conversations:
// Get original message context
use_mcp_tool({
server_name: "slack",
tool_name: "slack_get_channel_history",
arguments: {
channel_id: "C1234567890",
limit: 1
}
});
// Reply to thread with summary
use_mcp_tool({
server_name: "slack",
tool_name: "slack_reply_to_thread",
arguments: {
channel_id: "C1234567890",
thread_ts: "1234567890.123456",
text: "Thread summary:\n• Issue identified\n• Fix deployed\n• Tests passing"
}
});
// Get all thread replies
use_mcp_tool({
server_name: "slack",
tool_name: "slack_get_thread_replies",
arguments: {
channel_id: "C1234567890",
thread_ts: "1234567890.123456"
}
});
3. Team Notifications
Send targeted notifications to team members:
// Get team members
use_mcp_tool({
server_name: "slack",
tool_name: "slack_get_users",
arguments: {}
});
// Post notification with mentions
use_mcp_tool({
server_name: "slack",
tool_name: "slack_post_message",
arguments: {
channel_id: "C1234567890",
text: "<@U1234567890> <@U0987654321> Code review needed for PR #123"
}
});
4. Channel Activity Monitoring
Track channel activity and conversations:
// Get recent channel activity
use_mcp_tool({
server_name: "slack",
tool_name: "slack_get_channel_history",
arguments: {
channel_id: "C1234567890",
limit: 50
}
});
// Search for specific mentions
use_mcp_tool({
server_name: "slack",
tool_name: "slack_search_messages",
arguments: {
query: "urgent OR priority",
after: "2024-12-01"
}
});
5. Onboarding Automation
Automate new team member onboarding:
// Welcome message to general channel
use_mcp_tool({
server_name: "slack",
tool_name: "slack_post_message",
arguments: {
channel_id: "C1234567890",
text: "Welcome to the team, <@U1234567890>! :tada:"
}
});
// Post onboarding checklist
use_mcp_tool({
server_name: "slack",
tool_name: "slack_post_message",
arguments: {
channel_id: "C1234567890",
blocks: [
{
type: "section",
text: {
type: "mrkdwn",
text: "*Onboarding Checklist*\n:white_large_square: Complete profile\n:white_large_square: Review docs\n:white_large_square: Setup dev environment"
}
}
]
}
});
6. Workflow Automation
Create automated workflows and bot interactions:
// Monitor for keywords
use_mcp_tool({
server_name: "slack",
tool_name: "slack_get_channel_history",
arguments: {
channel_id: "C1234567890",
limit: 10
}
});
// Auto-respond to requests
use_mcp_tool({
server_name: "slack",
tool_name: "slack_reply_to_thread",
arguments: {
channel_id: "C1234567890",
thread_ts: "1234567890.123456",
text: "I've created a ticket for this issue: PROJ-1234"
}
});
// Add status reaction
use_mcp_tool({
server_name: "slack",
tool_name: "slack_add_reaction",
arguments: {
channel_id: "C1234567890",
timestamp: "1234567890.123456",
reaction: "eyes" // Acknowledge request
}
});
Message Formatting
Markdown Support
Slack supports mrkdwn formatting:
*bold*- bold text_italic_- italic text~strikethrough~-strikethrough text`code`- inline code```code block```- code block<https://example.com|link text>- hyperlinks<@U1234567890>- user mentions<#C1234567890>- channel mentions
Block Kit
For rich message formatting:
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "Deployment Report"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Status:* Success\n*Version:* 2.3.0"
}
},
{
"type": "divider"
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Deployed by CI/CD Pipeline"
}
]
}
]
}
Best Practices
- Rate Limiting: Respect Slack API rate limits (1+ request per second)
- Channel Permissions: Only post to channels where the bot is a member
- Thread Etiquette: Use threads for follow-up discussions to keep channels organized
- Reaction Consistency: Use consistent emoji reactions for status indicators
- Message Formatting: Use Block Kit for rich, structured messages
- Error Handling: Check for API errors and handle gracefully
- User Privacy: Don't access DMs unless explicitly permitted
OAuth Scopes Reference
Bot Token Scopes (xoxb-)
| Scope | Permission | Use Case |
|---|---|---|
channels:history | Read public channel messages | Get channel history |
channels:read | View public channels | List channels |
chat:write | Send messages | Post messages |
reactions:write | Add reactions | Add emoji reactions |
reactions:read | View reactions | See message reactions |
users:read | View users | List workspace users |
users:read.email | View user emails | Get user profiles |
groups:history | Read private channel messages | Access private channels |
im:history | Read DMs | Access direct messages |
mpim:history | Read group DMs | Access group messages |
files:read | View files | Access shared files |
Security Considerations
Token Security:
Never commit Slack tokens to version control. Use environment variables or secure credential management.
Security Best Practices
- Token Storage: Store tokens securely using environment variables
- Scope Minimization: Request only necessary OAuth scopes
- Channel Whitelisting: Restrict message posting to specific channels
- Token Rotation: Regenerate tokens periodically
- Audit Logging: Monitor bot activity for unexpected behavior
- User Privacy: Respect user privacy when accessing DMs
- Workspace Permissions: Ensure bot has appropriate workspace-level permissions
Troubleshooting
Common Issues
Issue: "not_in_channel" error
- Invite the bot to the channel first:
/invite @BotName - Ensure bot has
channels:historyscope
Issue: "missing_scope" error
- Add required OAuth scope in Slack app settings
- Reinstall app to workspace to apply new scopes
Issue: Messages not appearing
- Verify channel ID is correct
- Check bot is member of channel
- Ensure
chat:writescope is granted
Issue: Cannot read channel history
- Bot must be invited to channel
- Verify
channels:historyscope exists - Check channel type (public vs private)
Issue: Rate limit errors
- Implement exponential backoff
- Reduce request frequency
- Batch operations when possible
Performance Tips
- Cache User Data: Store user list locally to reduce API calls
- Batch Requests: Combine multiple operations when possible
- Use Pagination: Retrieve large datasets in chunks
- Filter Channels: Restrict to relevant channels only
- Optimize History Requests: Request only necessary message count
- Implement Caching: Cache channel metadata and user profiles
Limitations
- Rate Limits: Tier-based rate limits (1+ req/sec for tier 1)
- Message Size: Messages limited to 40,000 characters
- Channel Access: Bot must be invited to private channels
- File Upload: Limited file upload capabilities
- DM Access: Requires specific scopes and user permissions
- App Mentions: Requires events API for real-time mentions
Resources
- Slack API Documentation
- Block Kit Builder
- OAuth Scopes Reference
- Rate Limits Guide
- Message Formatting
Sources
Related Articles
Business Productivity MCP Servers
The Business & Productivity category provides integration with essential business tools and productivity platforms, enabling efficient workflow management and business process optimization.
Txtai MCP Server
Txtai MCP servers enable AI models to interact with txtai, an AI-powered search engine that builds vector indexes (also known as embeddings) to perform similarity searches.
Ansible MCP Server
Ansible MCP servers enable AI models to interact with Ansible, providing capabilities for infrastructure automation, configuration management, and application deployment.