axivo/mcp-slack
3.1
If you are the rightful owner of mcp-slack and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
MCP server for real-time Slack event notifications.
Slack MCP Server
A MCP (Model Context Protocol) server for interacting with Slack.
Security Features
- Link Unfurling Disabled: Prevents automatic link crawling that could leak sensitive information
- Rate Limiting: Enforces 60 requests per minute per endpoint
- Markdown Conversion: Automatically converts GitHub Flavored Markdown to Slack
mrkdwn
format
Slack Setup
-
Create a Slack App:
- Visit the Slack Apps
- Click "Create New App"
- Choose "From scratch"
- Name your app and select your workspace
-
Configure Bot Token Scopes: Navigate to "OAuth & Permissions" and add these scopes:
channels:history
- View messages and other content in public channelschannels:read
- View basic channel informationchat:write
- Send messages as the appreactions:write
- Add emoji reactions to messagesusers:read
- View users and their basic informationusers.profile:read
- View detailed profiles about users
-
Install App to Workspace:
- Click "Install to Workspace" and authorize the app
- Save the "Bot User OAuth Token" that starts with
xoxb-
-
Get your Team ID (starts with a
T
)
MCP Server Configuration
Add to mcp.json
servers configuration:
{
"mcpServers": {
"slack": {
"command": "npx",
"args": [
"-y",
"@axivo/mcp-slack"
],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-bot-token",
"SLACK_TEAM_ID": "T01234567",
"SLACK_CHANNEL_IDS": "C01234567, C76543210"
}
}
}
}
Environment Variables
Required variables:
SLACK_BOT_TOKEN
- Slack bot token (starts withxoxb-
)SLACK_TEAM_ID
- Slack Team ID (starts withT
)
Optional variables:
SLACK_CHANNEL_IDS
- Comma-separated list of channel IDs to restrict access to specific channels only. If not set, the server can access all public channels the bot has permissions for.
Prompt Examples
Here are practical examples of how to use the Slack MCP server with natural language prompts:
- "Mention my name into #general Slack channel and post a project update"
- "Read the last 20 messages from #marketing Slack channel to catch up on discussions"
- "Reply to the latest thread in #support Slack channel with a solution"
- "Add a thumbs up reaction to the latest message in #announcements Slack channel"
- "Get all replies from that long thread about the API changes"
- "Edit my last message in #general Slack channel to fix the typo"
- "List all channels I have access to and find the engineering-related ones"
- "Look up John's profile information and timezone"
MCP Tools
-
add_reaction
- Add a reaction emoji to a message
- Required inputs:
channel_id
(string): The ID of the channel containing the messagetimestamp
(string): The timestamp of the message to react toreaction
(string): The name of the emoji reaction (without ::)
- Returns: Reaction addition confirmation
-
edit_message
- Edit an existing message in a Slack channel
- Required inputs:
channel_id
(string): The ID of the channel containing the messagetimestamp
(string): The timestamp of the message to edittext
(string): The message text to edit
- Returns: Message edit confirmation with updated content
-
get_channel_history
- Get recent messages from a channel
- Required inputs:
channel_id
(string): The ID of the channel
- Optional inputs:
limit
(number, default: 10): Number of messages to retrieve
- Returns: Array of recent messages with metadata
-
get_thread_replies
- Get all replies in a message thread
- Required inputs:
channel_id
(string): The ID of the channel containing the threadthread_ts
(string): The timestamp of the parent message in the format '1234567890.123456'. Timestamps in the format without the period can be converted by adding the period such that 6 numbers come after it
- Returns: Array of thread replies with message details
-
get_user_profile
- Get detailed profile information for a specific user
- Required inputs:
user_id
(string): The ID of the user
- Returns: Detailed user profile information including display name, status, timezone, etc.
-
get_users
- Get a list of all users in the workspace with their basic profile information
- Optional inputs:
limit
(number, default: 100, max: 200): Maximum number of users to returncursor
(string): Pagination cursor for next page of results
- Returns: List of workspace users with basic profile information
-
list_channels
- List public or pre-defined channels in the workspace with pagination
- Optional inputs:
limit
(number, default: 100, max: 200): Maximum number of channels to returncursor
(string): Pagination cursor for next page of results
- Returns: List of channels with their IDs and information
-
post_message
- Post a new message to a Slack channel
- Required inputs:
channel_id
(string): The ID of the channel to post totext
(string): The message text to post
- Returns: Message posting confirmation with timestamp and channel info
-
reply_to_thread
- Reply to a specific message thread in Slack
- Required inputs:
channel_id
(string): The ID of the channel containing the threadthread_ts
(string): The timestamp of the parent message in the format '1234567890.123456'. Timestamps in the format without the period can be converted by adding the period such that 6 numbers come after ittext
(string): The reply text to post
- Optional inputs:
broadcast
(boolean, default: false): Whether to also send the reply to the main channel
- Returns: Thread reply confirmation with message details