Sponsored by Deepsite.site

Slack MCP Server

Created By
unwieldymaste7 months ago
The most powerful MCP Slack Server with Stdio and SSE transports, Proxy support and no permission requirements on Slack Workspace! assistants, llm, mcp, mcp-server, slack, slack-api
Content

Slack MCP Server

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 😏.

Feature Demo

ezgif-316311ee04f444

Tools

  1. conversations_history
  • Get messages from the channel by channelID
  • Required inputs:
    • channel_id (string): ID of the channel in format Cxxxxxxxxxx.
    • 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.
    • limit (number, default: 28): Limit of messages to fetch.
  • Returns: List of messages with timestamps, user IDs, and text content
  1. channels_list
  • Get list of channels
  • Required inputs:
    • channel_types (array): Possible channel types. Allowed values: 'mpim', 'im', 'public_channel', 'private_channel'.
    • sort (string): Type of sorting. Allowed values: 'popularity' - sort by number of members/participants in each channel.
  • Returns: List of channels

Setup Guide

1. Authentication Setup

Open up your Slack in your browser and login.

Lookup SLACK_MCP_XOXC_TOKEN

  • Open your browser's Developer Console.
  • In Firefox, under Tools -> Browser Tools -> Web Developer tools in the menu bar
  • In Chrome, click the "three dots" button to the right of the URL Bar, then select More Tools -> Developer Tools
  • Switch to the console tab.
  • Type "allow pasting" and press ENTER.
  • Paste the following snippet and press ENTER to execute: 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.

Lookup SLACK_MCP_XOXD_TOKEN

  • Switch to "Application" tab and select "Cookies" in the left navigation pane.
  • Find the cookie with the name d. That's right, just the letter d.
  • Double-click the Value of this cookie.
  • Press Ctrl+C or Cmd+C to copy it's value to clipboard.
  • Save it for later.

2. Installation

Choose one of these installation methods:

3. Configuration and Usage

You can configure the MCP server using command line arguments and environment variables.

Using npx

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-..."
      }
    }
  }
}
Or, stdio transport with docker.
{
  "mcpServers": {
    "slack": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SLACK_MCP_XOXC_TOKEN=$SLACK_MCP_XOXC_TOKEN",
        "-e",
        "SLACK_MCP_XOXD_TOKEN=$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.

Using npx with 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"
      }
    }
  }
}
Or, sse transport for Windows.
{
  "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"
      }
    }
  }
}

TLS and Exposing to the Internet

There are several reasons why you might need to setup HTTPS for your SSE.

  • mcp-remote is capable to handle only https schemes;
  • it is generally a good practice to use TLS for any service exposed to the internet;

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.

Using Docker

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 --transport stdio

Or, the docker-compose way:

wget -O docker-compose.yml https://github.com/unwieldymaste/slack-mcp-server/releases/latest/download/docker-compose.yml
wget -O .env https://github.com/unwieldymaste/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

Console Arguments

ArgumentRequired ?Description
--transport or -tYesSelect transport for the MCP Server, possible values are: stdio, sse

Environment Variables

VariableRequired ?DefaultDescription
SLACK_MCP_XOXC_TOKENYesnilAuthentication data token field token from POST data field-set (xoxc-...)
SLACK_MCP_XOXD_TOKENYesnilAuthentication data token from cookie d (xoxd-...)
SLACK_MCP_SERVER_PORTNo3001Port for the MCP server to listen on
SLACK_MCP_SERVER_HOSTNo127.0.0.1Host for the MCP server to listen on
SLACK_MCP_SSE_API_KEYNonilAuthorization Bearer token when transport is sse
SLACK_MCP_PROXYNonilProxy URL for the MCP server to use
SLACK_MCP_SERVER_CANonilPath to the CA certificate of the trust store
SLACK_MCP_SERVER_CA_INSECURENofalseTrust all insecure requests (NOT RECOMMENDED)

Debugging Tools

# 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

Security

  • Never share API tokens
  • Keep .env files secure and private

License

Licensed under MIT - see LICENSE file. This is not an official Slack product.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
DeepChatYour AI Partner on Desktop
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
ChatWiseThe second fastest AI chatbot™
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Amap Maps高德地图官方 MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
CursorThe AI Code Editor
Serper MCP ServerA Serper MCP Server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
WindsurfThe new purpose-built IDE to harness magic
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server
Tavily Mcp
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code