Slack Workspace Integration
STDIOMCP server for Slack Workspaces supporting Stdio and SSE transports without admin permissions.
MCP server for Slack Workspaces supporting Stdio and SSE transports without admin permissions.
Model Context Protocol (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 😏.
[!IMPORTANT]
We need your support! Each month, over 10,000 engineers visit this repository, and more than 2,000 are already using it.If you appreciate the work our contributors have put into this project, please consider giving the repository a star.
conversations_history
channel_id
(string): ID of the channel in format Cxxxxxxxxxx or its name starting with #... aka #general.include_activity_messages
(bool, default: false): If true, the response will include activity messages such as 'channel_join' or 'channel_leave'. 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
(string, default: 28): Limit of messages to fetch.conversations_replies
channel_id
(string): ID of the channel in format Cxxxxxxxxxx or its name starting with #... aka #general.thread_ts
(string): 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
(bool, default: false): If true, the response will include activity messages such as 'channel_join' or 'channel_leave'. 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
(string, default: 28): Limit of messages to fetch.channels_list
channel_types
(string): Comma-separated channel types. Allowed values: 'mpim', 'im', 'public_channel', 'private_channel'. Example: 'public_channel,private_channel,im'.sort
(string): Type of sorting. Allowed values: 'popularity' - sort by number of members/participants in each channel.limit
(number, default: 100): Limit of channels to fetch.cursor
(string): Cursor for pagination. Use the value of the last row and column in the response as next_cursor field returned from the previous request.Open up your Slack in your browser and login.
SLACK_MCP_XOXC_TOKEN
Tools -> Browser Tools -> Web Developer tools
in the menu barMore Tools -> Developer Tools
JSON.parse(localStorage.localConfig_v2).teams[document.location.pathname.match(/^\/client\/([A-Z0-9]+)/)[1]].token
Token value is printed right after the executed command (it starts with
xoxc-
), save it somewhere for now.
SLACK_MCP_XOXD_TOKEN
d
. That's right, just the letter d
.Choose one of these installation methods:
You can configure the MCP server using command line arguments and environment variables.
If you have npm installed, this is the fastest way to get started with slack-mcp-server
on Claude Desktop.
Open your claude_desktop_config.json
and add the mcp server to the list of mcpServers
:
{ "mcpServers": { "slack": { "command": "npx", "args": [ "-y", "slack-mcp-server@latest", "--transport", "stdio" ], "env": { "SLACK_MCP_XOXC_TOKEN": "xoxc-...", "SLACK_MCP_XOXD_TOKEN": "xoxd-..." } } } }
{ "mcpServers": { "slack": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "SLACK_MCP_XOXC_TOKEN", "-e", "SLACK_MCP_XOXD_TOKEN", "ghcr.io/korotovsky/slack-mcp-server", "mcp-server", "--transport", "stdio" ], "env": { "SLACK_MCP_XOXC_TOKEN": "xoxc-...", "SLACK_MCP_XOXD_TOKEN": "xoxd-..." } } } }
Please see Docker for more information.
sse
transport:In case you would like to run it in sse
mode, then you should use mcp-remote
wrapper for Claude Desktop and deploy/expose MCP server somewhere e.g. with ngrok
or docker-compose
.
{ "mcpServers": { "slack": { "command": "npx", "args": [ "-y", "mcp-remote", "https://x.y.z.q:3001/sse", "--header", "Authorization: Bearer ${SLACK_MCP_SSE_API_KEY}" ], "env": { "SLACK_MCP_SSE_API_KEY": "my-$$e-$ecret" } } } }
{ "mcpServers": { "slack": { "command": "C:\\Progra~1\\nodejs\\npx.cmd", "args": [ "-y", "mcp-remote", "https://x.y.z.q:3001/sse", "--header", "Authorization: Bearer ${SLACK_MCP_SSE_API_KEY}" ], "env": { "SLACK_MCP_SSE_API_KEY": "my-$$e-$ecret" } } } }
There are several reasons why you might need to setup HTTPS for your SSE.
mcp-remote
is capable to handle only https schemes;You could use ngrok
:
ngrok http 3001
and then use the endpoint https://903d-xxx-xxxx-xxxx-10b4.ngrok-free.app
for your mcp-remote
argument.
For detailed information about all environment variables, see Environment Variables.
export SLACK_MCP_XOXC_TOKEN=xoxc-... export SLACK_MCP_XOXD_TOKEN=xoxd-... docker pull ghcr.io/korotovsky/slack-mcp-server:latest docker run -i --rm \ -e SLACK_MCP_XOXC_TOKEN \ -e SLACK_MCP_XOXD_TOKEN \ slack-mcp-server mcp-server --transport stdio
Or, the docker-compose way:
wget -O docker-compose.yml https://github.com/korotovsky/slack-mcp-server/releases/latest/download/docker-compose.yml wget -O .env https://github.com/korotovsky/slack-mcp-server/releases/latest/download/default.env.dist nano .env # Edit .env file with your tokens from step 1 of the setup guide docker-compose up -d
Argument | Required ? | Description |
---|---|---|
--transport or -t | Yes | Select transport for the MCP Server, possible values are: stdio , sse |
Variable | Required ? | Default | Description |
---|---|---|---|
SLACK_MCP_XOXC_TOKEN | Yes | nil | Authentication data token field token from POST data field-set (xoxc-... ) |
SLACK_MCP_XOXD_TOKEN | Yes | nil | Authentication data token from cookie d (xoxd-... ) |
SLACK_MCP_SERVER_PORT | No | 3001 | Port for the MCP server to listen on |
SLACK_MCP_SERVER_HOST | No | 127.0.0.1 | Host for the MCP server to listen on |
SLACK_MCP_SSE_API_KEY | No | nil | Authorization Bearer token when transport is sse |
SLACK_MCP_PROXY | No | nil | Proxy URL for the MCP server to use |
SLACK_MCP_SERVER_CA | No | nil | Path to the CA certificate of the trust store |
SLACK_MCP_SERVER_CA_INSECURE | No | false | Trust all insecure requests (NOT RECOMMENDED) |
# 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.