by korotovsky
Provides a powerful Model Context Protocol interface for Slack workspaces, enabling message retrieval, search, and optional posting via Stdio or SSE transports without requiring bot permissions.
Slack MCP Server exposes a Model Context Protocol endpoint that lets applications interact with Slack workspaces. It can fetch channel, thread, DM, and group‑DM histories, perform smart pagination, search messages with rich filters, and (optionally) post new messages—all through standard MCP transports (Stdio or Server‑Sent Events).
xoxp-…
token or the pair of browser tokens xoxc-…
and xoxd-…
via environment variables (SLACK_MCP_XOXP_TOKEN
or SLACK_MCP_XOXC_TOKEN
/SLACK_MCP_XOXD_TOKEN
).go run mcp/mcp-server.go
). The server listens on the configured host/port and accepts MCP connections over Stdio or SSE.conversations_history
, conversations_replies
, conversations_search_messages
, conversations_add_message
, channels_list
) to read or write Slack data.conversations_add_message
, set SLACK_MCP_ADD_MESSAGE_TOOL
(true, a whitelist of channel IDs, or a blacklist using !
).#general
or @username_dm
instead of raw IDs.1d
, 7d
, 1m
) or message count.Q: Which authentication tokens are required?
A: Provide either an OAuth xoxp-…
token or both the browser token xoxc-…
and cookie token xoxd-…
. At least one method must be set.
Q: How do I enable message posting?
A: Set SLACK_MCP_ADD_MESSAGE_TOOL
to true
(all channels), a comma‑separated whitelist of channel IDs, or a !
‑prefixed list to allow all except specified channels.
Q: Can the server run behind a corporate proxy?
A: Yes. Define SLACK_MCP_PROXY
with the proxy URL.
Q: What is the purpose of the users and channels caches?
A: Caches reduce API calls on startup and enable tools to resolve #name
or @handle
without extra lookups. Paths are configurable via SLACK_MCP_USERS_CACHE
and SLACK_MCP_CHANNELS_CACHE
.
Q: Which transports are supported? A: Stdio (for local MCP clients) and Server‑Sent Events (SSE) for HTTP‑based clients. The transport is chosen by the client connection.
Q: How do I limit the server’s log verbosity?
A: Set SLACK_MCP_LOG_LEVEL
to debug
, info
, warn
, error
, panic
, or fatal
.
Q: Is this an official Slack product? A: No. It is an open‑source implementation released under the MIT license.
Model Context Protocol (MCP) server for Slack Workspaces. The most powerful MCP Slack server — supports Stdio and SSE transports, proxy settings, DMs, Group DMs, Smart History fetch (by date or count), may work via OAuth or in complete stealth mode with no permissions and scopes in Workspace 😏.
[!IMPORTANT]
We need your support! Each month, over 30,000 engineers visit this repository, and more than 9,000 are already using it.If you appreciate the work our contributors have put into this project, please consider giving the repository a star.
This feature-rich Slack MCP Server has:
#Name
@Lookup
: Fetch messages from channels and threads, including activity messages, and retrieve channels using their names (e.g., #general) as well as their IDs.conversations_add_message
tool is disabled by default for safety. Enable it via an environment variable, with optional channel restrictions.Get messages from the channel (or DM) by channel_id, the last row/column in the response is used as 'cursor' parameter for pagination if not empty
channel_id
(string, required): - channel_id
(string): ID of the channel in format Cxxxxxxxxxx or its name starting with #...
or @...
aka #general
or @username_dm
.include_activity_messages
(boolean, default: false): If true, the response will include activity messages such as channel_join
or channel_leave
. Default is boolean false.cursor
(string, optional): Cursor for pagination. Use the value of the last row and column in the response as next_cursor field returned from the previous request.limit
(string, default: "1d"): Limit of messages to fetch in format of maximum ranges of time (e.g. 1d - 1 day, 1w - 1 week, 30d - 30 days, 90d - 90 days which is a default limit for free tier history) or number of messages (e.g. 50). Must be empty when 'cursor' is provided.Get a thread of messages posted to a conversation by channelID and thread_ts
, the last row/column in the response is used as cursor
parameter for pagination if not empty.
channel_id
(string, required): ID of the channel in format Cxxxxxxxxxx
or its name starting with #...
or @...
aka #general
or @username_dm
.thread_ts
(string, required): Unique identifier of either a thread’s parent message or a message in the thread. ts must be the timestamp in format 1234567890.123456
of an existing message with 0 or more replies.include_activity_messages
(boolean, default: false): If true, the response will include activity messages such as 'channel_join' or 'channel_leave'. Default is boolean false.cursor
(string, optional): Cursor for pagination. Use the value of the last row and column in the response as next_cursor field returned from the previous request.limit
(string, default: "1d"): Limit of messages to fetch in format of maximum ranges of time (e.g. 1d - 1 day, 1w - 1 week, 30d - 30 days, 90d - 90 days which is a default limit for free tier history) or number of messages (e.g. 50). Must be empty when 'cursor' is provided.Add a message to a public channel, private channel, or direct message (DM, or IM) conversation by channel_id and thread_ts.
Note: Posting messages is disabled by default for safety. To enable, set the
SLACK_MCP_ADD_MESSAGE_TOOL
environment variable. If set to a comma-separated list of channel IDs, posting is enabled only for those specific channels. See the Environment Variables section below for details.
channel_id
(string, required): ID of the channel in format Cxxxxxxxxxx
or its name starting with #...
or @...
aka #general
or @username_dm
.thread_ts
(string, optional): Unique identifier of either a thread’s parent message or a message in the thread_ts must be the timestamp in format 1234567890.123456
of an existing message with 0 or more replies. Optional, if not provided the message will be added to the channel itself, otherwise it will be added to the thread.payload
(string, required): Message payload in specified content_type format. Example: 'Hello, world!' for text/plain or '# Hello, world!' for text/markdown.content_type
(string, default: "text/markdown"): Content type of the message. Default is 'text/markdown'. Allowed values: 'text/markdown', 'text/plain'.Search messages in a public channel, private channel, or direct message (DM, or IM) conversation using filters. All filters are optional, if not provided then search_query is required.
search_query
(string, optional): Search query to filter messages. Example: 'marketing report' or full URL of Slack message e.g. 'https://slack.com/archives/C1234567890/p1234567890123456', then the tool will return a single message matching given URL, herewith all other parameters will be ignored.filter_in_channel
(string, optional): Filter messages in a specific channel by its ID or name. Example: C1234567890
or #general
. If not provided, all channels will be searched.filter_in_im_or_mpim
(string, optional): Filter messages in a direct message (DM) or multi-person direct message (MPIM) conversation by its ID or name. Example: D1234567890
or @username_dm
. If not provided, all DMs and MPIMs will be searched.filter_users_with
(string, optional): Filter messages with a specific user by their ID or display name in threads and DMs. Example: U1234567890
or @username
. If not provided, all threads and DMs will be searched.filter_users_from
(string, optional): Filter messages from a specific user by their ID or display name. Example: U1234567890
or @username
. If not provided, all users will be searched.filter_date_before
(string, optional): Filter messages sent before a specific date in format YYYY-MM-DD
. Example: 2023-10-01
, July
, Yesterday
or Today
. If not provided, all dates will be searched.filter_date_after
(string, optional): Filter messages sent after a specific date in format YYYY-MM-DD
. Example: 2023-10-01
, July
, Yesterday
or Today
. If not provided, all dates will be searched.filter_date_on
(string, optional): Filter messages sent on a specific date in format YYYY-MM-DD
. Example: 2023-10-01
, July
, Yesterday
or Today
. If not provided, all dates will be searched.filter_date_during
(string, optional): Filter messages sent during a specific period in format YYYY-MM-DD
. Example: July
, Yesterday
or Today
. If not provided, all dates will be searched.filter_threads_only
(boolean, default: false): If true, the response will include only messages from threads. Default is boolean false.cursor
(string, default: ""): Cursor for pagination. Use the value of the last row and column in the response as next_cursor field returned from the previous request.limit
(number, default: 20): The maximum number of items to return. Must be an integer between 1 and 100.Get list of channels
channel_types
(string, required): Comma-separated channel types. Allowed values: mpim
, im
, public_channel
, private_channel
. Example: public_channel,private_channel,im
sort
(string, optional): Type of sorting. Allowed values: popularity
- sort by number of members/participants in each channel.limit
(number, default: 100): The maximum number of items to return. Must be an integer between 1 and 1000 (maximum 999).cursor
(string, optional): Cursor for pagination. Use the value of the last row and column in the response as next_cursor field returned from the previous request.The Slack MCP Server exposes two special directory resources for easy access to workspace metadata:
slack://<workspace>/channels
— Directory of ChannelsFetches a CSV directory of all channels in the workspace, including public channels, private channels, DMs, and group DMs.
slack://<workspace>/channels
text/csv
id
: Channel ID (e.g., C1234567890
)name
: Channel name (e.g., #general
, @username_dm
)topic
: Channel topic (if any)purpose
: Channel purpose/descriptionmemberCount
: Number of members in the channelslack://<workspace>/users
— Directory of UsersFetches a CSV directory of all users in the workspace.
slack://<workspace>/users
text/csv
userID
: User ID (e.g., U1234567890
)userName
: Slack username (e.g., john
)realName
: User’s real name (e.g., John Doe
)Variable | Required? | Default | Description |
---|---|---|---|
SLACK_MCP_XOXC_TOKEN |
Yes* | nil |
Slack browser token (xoxc-... ) |
SLACK_MCP_XOXD_TOKEN |
Yes* | nil |
Slack browser cookie d (xoxd-... ) |
SLACK_MCP_XOXP_TOKEN |
Yes* | nil |
User OAuth token (xoxp-... ) — alternative to xoxc/xoxd |
SLACK_MCP_PORT |
No | 13080 |
Port for the MCP server to listen on |
SLACK_MCP_HOST |
No | 127.0.0.1 |
Host for the MCP server to listen on |
SLACK_MCP_SSE_API_KEY |
No | nil |
Bearer token for SSE transport |
SLACK_MCP_PROXY |
No | nil |
Proxy URL for outgoing requests |
SLACK_MCP_USER_AGENT |
No | nil |
Custom User-Agent (for Enterprise Slack environments) |
SLACK_MCP_CUSTOM_TLS |
No | nil |
Send custom TLS-handshake to Slack servers based on SLACK_MCP_USER_AGENT or default User-Agent. (for Enterprise Slack environments) |
SLACK_MCP_SERVER_CA |
No | nil |
Path to CA certificate |
SLACK_MCP_SERVER_CA_TOOLKIT |
No | nil |
Inject HTTPToolkit CA certificate to root trust-store for MitM debugging |
SLACK_MCP_SERVER_CA_INSECURE |
No | false |
Trust all insecure requests (NOT RECOMMENDED) |
SLACK_MCP_ADD_MESSAGE_TOOL |
No | nil |
Enable message posting via conversations_add_message by setting it to true for all channels, a comma-separated list of channel IDs to whitelist specific channels, or use ! before a channel ID to allow all except specified ones, while an empty value disables posting by default. |
SLACK_MCP_ADD_MESSAGE_MARK |
No | nil |
When the conversations_add_message tool is enabled, any new message sent will automatically be marked as read. |
SLACK_MCP_ADD_MESSAGE_UNFURLING |
No | nil |
Enable to let Slack unfurl posted links or set comma-separated list of domains e.g. github.com,slack.com to whitelist unfurling only for them. If text contains whitelisted and unknown domain unfurling will be disabled for security reasons. |
SLACK_MCP_USERS_CACHE |
No | .users_cache.json |
Path to the users cache file. Used to cache Slack user information to avoid repeated API calls on startup. |
SLACK_MCP_CHANNELS_CACHE |
No | .channels_cache_v2.json |
Path to the channels cache file. Used to cache Slack channel information to avoid repeated API calls on startup. |
SLACK_MCP_LOG_LEVEL |
No | info |
Log-level for stdout or stderr. Valid values are: debug , info , warn , error , panic and fatal |
*You need either xoxp
or both xoxc
/xoxd
tokens for authentication.
Users Cache | Channels Cache | Limitations |
---|---|---|
:x: | :x: | No cache, No LLM context enhancement with user data, tool channels_list will be fully not functional. Tools conversations_* will have limited capabilities and you won't be able to search messages by @userHandle or #channel-name , getting messages by @userHandle or #channel-name won't be available either. |
:white_check_mark: | :x: | No channels cache, tool channels_list will be fully not functional. Tools conversations_* will have limited capabilities and you won't be able to search messages by @userHandle or #channel-name , getting messages by @userHandle or #channel-name won't be available either. |
:white_check_mark: | :white_check_mark: | No limitations, fully functional Slack MCP Server. |
# Run the inspector with stdio transport
npx @modelcontextprotocol/inspector go run mcp/mcp-server.go --transport stdio
# View logs
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
Licensed under MIT - see LICENSE file. This is not an official Slack product.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by lharries
Enables searching, reading, and sending personal WhatsApp messages and media through a Model Context Protocol (MCP) server, storing all data locally in SQLite and exposing controlled tools for LLMs like Claude.
by iFurySt
Provides authenticated access to XiaoHongShu (RedNote) notes, supporting keyword search, note retrieval by URL, and cookie persistence via a Model Context Protocol server.
by ZubeidHendricks
Provides a standardized interface for interacting with YouTube content, enabling video retrieval, transcript access, channel and playlist management, and advanced analytics through the Model Context Protocol.
by InditexTech
Provides Microsoft Teams integration via the Model Context Protocol, enabling reading, creating, replying to messages and mentioning members.
by chigwell
Provides a full‑featured Telegram integration for MCP‑compatible clients, enabling programmatic access to chats, messages, contacts, profile management, and group administration.
by EnesCinr
Interact with Twitter to post tweets and search tweets programmatically via an MCP server.
by chaindead
Manages Telegram dialogs, messages, drafts, and read statuses via the Model Context Protocol, enabling AI assistants to query and interact with Telegram accounts.
by carterlasalle
Securely interfaces with the macOS Messages database via MCP, enabling LLMs to query, analyze, filter, and send iMessage or SMS communications with built‑in phone number validation, attachment handling, and group chat support.
by v-3
Enables large language models to interact with Discord channels, allowing them to send and read messages through Discord's API while keeping user control and security.