Enables interaction with Slack workspaces, providing tools to list channels, post messages, reply to threads, add emoji reactions, retrieve channel history, get thread replies, list workspace users, and access user profile information.
slack-mcp-server
Disclaimer
This project includes code originally developed by Anthropic and released under the MIT License. Substantial modifications and new functionality have been added by For Good AI Inc. (dba Zencoder Inc.), and are licensed under the Apache License, Version 2.0.
Overview
A Model Context Protocol (MCP) server for interacting with Slack workspaces. This server provides tools to list channels, post messages, reply to threads, add reactions, get channel history, and manage users.
Available Tools
- slack_list_channels
- List public or pre-defined channels in the workspace
- Optional inputs:
limit
(number, default: 100, max: 200): Maximum number of channels to returncursor
(string): Pagination cursor for next page
- Returns: List of channels with their IDs and information
- slack_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 and timestamp
- slack_reply_to_thread
- Reply to a specific message thread
- Required inputs:
channel_id
(string): The channel containing the threadthread_ts
(string): Timestamp of the parent messagetext
(string): The reply text
- Returns: Reply confirmation and timestamp
- slack_add_reaction
- Add an emoji reaction to a message
- Required inputs:
channel_id
(string): The channel containing the messagetimestamp
(string): Message timestamp to react toreaction
(string): Emoji name without colons
- Returns: Reaction confirmation
- slack_get_channel_history
- Get recent messages from a channel
- Required inputs:
channel_id
(string): The channel ID
- Optional inputs:
limit
(number, default: 10): Number of messages to retrieve
- Returns: List of messages with their content and metadata
- slack_get_thread_replies
- Get all replies in a message thread
- Required inputs:
channel_id
(string): The channel containing the threadthread_ts
(string): Timestamp of the parent message
- Returns: List of replies with their content and metadata
- slack_get_users
- Get list of workspace users with basic profile information
- Optional inputs:
cursor
(string): Pagination cursor for next pagelimit
(number, default: 100, max: 200): Maximum users to return
- Returns: List of users with their basic profiles
- slack_get_user_profile
- Get detailed profile information for a specific user
- Required inputs:
user_id
(string): The user's ID
- Returns: Detailed user profile information
Slack Bot Setup
To use this MCP server, you need to create a Slack app and configure it with the necessary permissions:
1. Create a Slack App
- Visit the Slack Apps page
- Click "Create New App"
- Choose "From scratch"
- Name your app and select your workspace
2. 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
3. Install App to Workspace
- Click "Install to Workspace" and authorize the app
- Save the "Bot User OAuth Token" that starts with
xoxb-
4. Get Your Team ID
Get your Team ID (starts with a T
) by following this guidance
5. Add Bot to Channels (Optional)
For the bot to access private channels or to post messages, you may need to invite it to specific channels using /invite @your-bot-name
Features
- Multiple Transport Support: Supports both stdio and Streamable HTTP transports
- Modern MCP SDK: Updated to use the latest MCP SDK (v1.13.2) with modern APIs
- Comprehensive Slack Integration: Full set of Slack operations including:
- List channels (with predefined channel support)
- Post messages
- Reply to threads
- Add reactions
- Get channel history
- Get thread replies
- List users
- Get user profiles
Installation
Local Development
Global Installation (NPM)
Docker Installation
Configuration
Set the following environment variables:
Usage
Command Line Options
Local Usage Examples
Using the slack-mcp command (after global installation)
Using node directly (for development)
Docker Usage Examples
Using Docker directly
Using Docker Compose
Create a docker-compose.yml
file:
Then run:
Transport Types
Stdio Transport
- Use case: Command-line tools and direct integrations
- Communication: Standard input/output streams
- Default: Yes
Streamable HTTP Transport
- Use case: Remote servers and web-based integrations
- Communication: HTTP POST requests with optional Server-Sent Events streams
- Features:
- Session management
- Bidirectional communication
- Resumable connections
- RESTful API endpoints
- Bearer token authentication
Authentication (Streamable HTTP Transport Only)
When using Streamable HTTP transport, the server supports Bearer token authentication:
- Command Line: Use
--token <token>
to specify a custom token - Environment Variable: Set
AUTH_TOKEN=<token>
as a fallback - Auto-generated: If neither is provided, a random token is generated
The command line option takes precedence over the environment variable. Include the token in HTTP requests using the Authorization: Bearer <token>
header.
Troubleshooting
If you encounter permission errors, verify that:
- All required scopes are added to your Slack app
- The app is properly installed to your workspace
- The tokens and workspace ID are correctly copied to your configuration
- The app has been added to the channels it needs to access
Development
Build
Watch Mode
API Endpoints (Streamable HTTP Transport)
When using Streamable HTTP transport, the server exposes the following endpoints:
POST /mcp
- Client-to-server communicationGET /mcp
- Server-to-client notifications (Server-Sent Events streams)DELETE /mcp
- Session termination
Changes from Previous Version
- Updated MCP SDK: Upgraded from v1.0.1 to v1.13.2
- Modern API: Migrated from low-level Server class to high-level McpServer class
- Zod Validation: Added proper schema validation using Zod
- Transport Flexibility: Added support for Streamable HTTP transport
- Command Line Interface: Added CLI arguments for transport selection
- Session Management: Implemented proper session handling for HTTP transport
- Better Error Handling: Improved error handling and logging
This server cannot be installed
Interact with Slack Workspaces over the Slack API. Supports stdio and Streamable HTTP transport. Extended from Anthropic's archived server
Related MCP Servers
- AsecurityAlicenseAqualityEnables interaction with Slack workspaces as a user, supporting channel listing, message posting, threading, reactions, and user management via the Slack API.Last updated -87JavaScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server implementation that enables AI assistants to interact with Slack workspaces, allowing them to browse channels, send messages, reply to threads, add reactions, and retrieve user information.Last updated -161JavaScriptApache 2.0
- AsecurityAlicenseAqualityThe most powerful MCP server for Slack Workspaces. This integration supports both Stdio and SSE transports, proxy settings and does not require any permissions or bots being created or approved by Workspace admins 😏.Last updated -2377GoMIT License
- -securityAlicense-qualityEnables AI assistants to interact with Slack workspaces through the Model Context Protocol, providing tools for reading/sending messages, managing channels, and accessing Slack API functionality.Last updated -PythonMIT License