slack-mcp logo

slack-mcp

Organization
redhat-community-ai-tools

A Model Context Protocol (MCP) server that enables AI assistants to interact with Slack workspaces. This server provides a bridge between AI tools and Slack, allowing you to read messages, post…

Publisherredhat-community-ai-tools
Repositoryslack-mcp
LanguagePython
Forks
49
Stars
38
Available tools
0
Transport typestdio, streamable-http
Categories
Links
  • Connect tools to AI workflows

    slack-mcp exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    38 stars and 49 forks from the linked repository.

slack-mcp

A Model Context Protocol (MCP) server that enables AI assistants to interact with Slack workspaces. This server provides a bridge between AI tools and Slack, allowing you to read messages, post content, and manage Slack channels programmatically through MCP-compatible clients.

Disclaimer: This is not an official Red Hat tool.

What is this and why should I use it?

This MCP server transforms your Slack workspace into an AI-accessible environment. It provides 21+ tools for comprehensive Slack interaction:

Message & Thread Operations

  • Read channel history with date filtering and thread support
  • Post messages and replies to threads
  • Search messages across workspace or within specific channels
  • Execute Slack commands

Channel Management

  • List, join, create, and rename channels
  • Look up channel IDs by name
  • Invite users to channels

Reactions & Users

  • Add and view emoji reactions
  • Send direct messages and group DMs
  • Manage usergroups (clear members)

Utility

  • Check authentication status
  • Cache management for performance

Key Benefits

  • Seamless Integration: Connect your AI assistant directly to Slack without manual copy-pasting
  • Automated Workflows: Build AI-powered Slack bots that can read, analyze, and respond to messages
  • Enhanced Productivity: Let AI help manage notifications, summarize conversations, or automate routine Slack tasks
  • Real-time Collaboration: Enable AI assistants to participate in team discussions and provide instant insights

Use Cases

  • Team Assistant: Have an AI that can read team updates and provide summaries
  • Notification Manager: Automatically categorize and respond to incoming messages
  • Knowledge Base: AI that can search through channel history and provide context
  • Meeting Scheduler: AI that can read meeting requests and help coordinate schedules

Setting Up with Claude Code

This repo ships as a Claude Code plugin with a guided setup skill. Claude will walk you through the entire process — no manual config editing required.

Run the setup script. It handles everything — venv, Playwright, token extraction, wrapper script, and Claude Code registration. The only interaction required is logging in to Slack when the browser opens, and entering an optional channel ID for server logs, if desired.

bash
python3 <(curl -fsSL https://raw.githubusercontent.com/redhat-community-ai-tools/slack-mcp/main/scripts/setup-slack-mcp.py)

Or clone the repo first and run it locally:

bash
git clone https://github.com/redhat-community-ai-tools/slack-mcp
python3 slack-mcp/scripts/setup-slack-mcp.py

Options:

FlagDescription
--logs-channel DXXXXXXXXXSlack channel ID for server logs (optional; logs go to stderr if omitted)
--workspace https://myco.slack.comSpecific Slack workspace to open
--refresh-tokensRe-extract tokens when they expire (skips all other steps)
--skip-verifySkip the post-setup smoke test

When tokens expire, just run:

bash
python3 slack-mcp/scripts/setup-slack-mcp.py --refresh-tokens

Desktop App Token Refresh (Linux)

If you have the Slack desktop app installed, you can refresh tokens without opening a browser:

bash
slack-mcp/scripts/slack-refresh-tokens --validate

This reads tokens directly from the desktop app's local storage on disk — no DevTools, no Playwright, no manual steps. Requires the Slack app to be signed in.

FlagDescription
--validateVerify tokens against Slack's API after extraction
--envPrint tokens as env vars to stdout (for piping into other tools)
--output FILEWrite tokens to a custom path (default: ~/.local/share/slack-mcp/tokens.env)

Requirements: python3, python3-cryptography, secret-tool (libsecret/gnome-keyring), curl, jq

This is useful for CI hooks or session startup scripts that need to silently refresh tokens before launching the MCP server.


Bot token authentication (recommended)

For better security, use a Slack App bot token (xoxb-) instead of browser session tokens. Bot tokens provide:

  • Scoped access — only the OAuth permissions you grant, not full user access
  • Distinct identity — actions appear as the bot, not as your user account
  • Central management — IT can audit and revoke via the Slack admin panel
  • No browser DevTools — tokens are generated once in the Slack App settings

Setup

  1. Create a Slack App at api.slack.com/apps
  2. Add OAuth scopes: channels:read, channels:history, channels:manage, groups:read, groups:history, groups:write, chat:write, reactions:read, reactions:write, search:read, users:read, commands, mpim:write
  3. Install to your workspace and copy the Bot User OAuth Token (xoxb-...)
  4. Invite the bot to channels it needs access to

Running with a bot token

Set SLACK_BOT_TOKEN instead of SLACK_XOXC_TOKEN/SLACK_XOXD_TOKEN:

json
{
  "mcpServers": {
    "slack": {
      "command": "podman",
      "args": [
        "run", "-i", "--rm",
        "-e", "SLACK_BOT_TOKEN",
        "-e", "LOGS_CHANNEL_ID",
        "quay.io/redhat-ai-tools/slack-mcp"
      ],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-...",
        "LOGS_CHANNEL_ID": "C7000000"
      }
    }
  }
}

LOGS_CHANNEL_ID is optional. When omitted, tool activity is written to stderr instead of posted to Slack.

If both SLACK_BOT_TOKEN and SLACK_XOXC_TOKEN/SLACK_XOXD_TOKEN are set, the bot token takes precedence.

Read-only mode

For agents or automation that should browse and search Slack without posting, reacting, running commands, or joining channels, enable read-only mode.

  • Environment variable: set SLACK_MCP_READ_ONLY to a truthy value (1, true, yes, or on, case-insensitive).
  • CLI: pass --read-only when starting the server (e.g. slack-mcp --read-only, equivalent to setting the variable).

In read-only mode, tools that mutate Slack state (post_message, send_dm, post_command, add_reaction, join_channel) raise a clear error. Read tools (history, search, threads, whoami, channel listing, cache refresh helpers, and so on) behave as usual. Tool activity that would normally be mirrored to LOGS_CHANNEL_ID is written to stderr instead.

On startup, the server logs a line to stderr when read-only mode is active.

For Podman or Docker, add -e SLACK_MCP_READ_ONLY=true (and the matching key in env) when you want the container to run read-only.

Running as a uv tool (local, no container)

Prefer not to run a container? Install slack-mcp as a uv tool. This puts a slack-mcp command on your PATH that runs the server directly.

Requires uv and Python ≥ 3.10.

bash
# from a clone of this repo
uv tool install .

# or straight from git
uv tool install git+https://github.com/redhat-community-ai-tools/slack-mcp

Run slack-mcp --help for a summary of flags and environment variables.

Tokens from tokens.env (recommended)

slack-mcp reads Slack session tokens from ~/.local/share/slack-mcp/tokens.env when they are not already set in the environment — the same file the token tooling writes:

bash
scripts/slack-refresh-tokens          # or: python3 scripts/setup-slack-mcp.py

Then the MCP client config needs no env block — just the command:

json
{
  "mcpServers": {
    "slack": {
      "command": "slack-mcp"
    }
  }
}

The file uses SLACK_MCP_XOXC_TOKEN / SLACK_MCP_XOXD_TOKEN; the server maps those onto the SLACK_XOXC_TOKEN / SLACK_XOXD_TOKEN it uses. Override the path with SLACK_MCP_TOKENS_FILE. Real environment variables always take precedence over the file, so you can still override per-client.

Tokens from the client config (alternative)

To keep tokens in the MCP config instead of a file, pass them in env:

json
{
  "mcpServers": {
    "slack": {
      "command": "slack-mcp",
      "env": {
        "SLACK_XOXC_TOKEN": "xoxc-...",
        "SLACK_XOXD_TOKEN": "xoxd-...",
        "LOGS_CHANNEL_ID": "C7000000"
      }
    }
  }
}

A bot token works the same way — set SLACK_BOT_TOKEN in env instead of the xoxc/xoxd pair. If the client does not inherit your PATH, use the absolute path (~/.local/bin/slack-mcp after uv tool install), or launch via uv run --directory /path/to/slack-mcp slack-mcp.

The user cache and the default tokens.env live under ~/.local/share/slack-mcp/ (override with SLACK_MCP_DATA).

Claude Code (bot token):

bash
claude mcp add slack -e SLACK_BOT_TOKEN=xoxb-... -- slack-mcp

Or, with tokens.env already in place, no env needed:

bash
claude mcp add slack -- slack-mcp

Running with Podman or Docker

You can run the slack-mcp server in a container using Podman or Docker:

Example configuration for running with Podman:

json
{
  "mcpServers": {
    "slack": {
      "command": "podman",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e", "SLACK_XOXC_TOKEN",
        "-e", "SLACK_XOXD_TOKEN",
        "-e", "MCP_TRANSPORT",
        "-e", "LOGS_CHANNEL_ID",
        "quay.io/redhat-ai-tools/slack-mcp"
      ],
      "env": {
        "SLACK_XOXC_TOKEN": "xoxc-...",
        "SLACK_XOXD_TOKEN": "xoxd-...",
        "MCP_TRANSPORT": "stdio",
        "LOGS_CHANNEL_ID": "C7000000"
      }
    }
  }
}

LOGS_CHANNEL_ID is optional. When omitted, tool activity is written to stderr instead of posted to Slack.

Activity logging

By default, tool activity is written to stderr (visible in your terminal or process logs). To mirror activity to a Slack channel instead, set LOGS_CHANNEL_ID to any channel the bot or session user has access to — a self-DM or a DM with Slackbot works well for personal use.

bash
LOGS_CHANNEL_ID=C7000000

In read-only mode, LOGS_CHANNEL_ID is ignored and all activity is always written to stderr.

Running with non-stdio transport

To run the server with a non-stdio transport (such as SSE), set the MCP_TRANSPORT environment variable to a value other than stdio (e.g., sse).

Example configuration to connect to a non-stdio MCP server:

json
{
  "mcpServers": {
    "slack": {
      "url": "https://slack-mcp.example.com/sse",
      "headers": {
        "X-Slack-Web-Token": "xoxc-...",
        "X-Slack-Cookie-Token": "xoxd-..."
      }
    }
  }
}

Extract your Slack XOXC and XOXD tokens easily using browser extensions or Selenium automation: https://github.com/maorfr/slack-token-extractor.

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "redhat-ai-tools-slack-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "slack-mcp"
      ]
    }
  }
}

Use slack-mcp MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once slack-mcp is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add slack-mcp as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the slack-mcp MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "redhat-ai-tools-slack-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "slack-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the slack-mcp MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the slack-mcp MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use slack-mcp to help me with this task?
slack-mcp
Sure. I read it.
Here is what I found using slack-mcp.

Option 2: Add an MCP server URL

Use this when slack-mcp is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter your server URL in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste your server URL into the Server URL field.
  2. Enter a connection name for slack-mcp.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the slack-mcp connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the slack-mcp tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the slack-mcp tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use slack-mcp to help me with this task?
slack-mcp
Sure. I read it.
Here is what I found using slack-mcp.

Frequently asked questions

What is the slack-mcp MCP server used for?

slack-mcp is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use slack-mcp MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use slack-mcp with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use slack-mcp MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With slack-mcp connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect slack-mcp MCP to TypingMind?

slack-mcp can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does slack-mcp MCP provide in TypingMind?

slack-mcp exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use slack-mcp MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If slack-mcp requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇