Slack

by redhat-ai-tools

Not rated
GitHub

About

An MCP server for interacting with the Slack API, allowing for sending messages, managing channels, and other workspace actions.

Details

Author
redhat-ai-tools
Categories
Communication, Other, Automation

Setup

Install Slack in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/redhat-ai-tools/slack-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

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.

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

- 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

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

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

- Check authentication status
- Cache management for performance

- 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

- 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

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.

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:

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

If you have theSlack desktop appinstalled, you can refresh tokens without opening a browser:

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.

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.

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
- Create a Slack App at
api.slack.com/apps
- 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
- Install to your workspace and copy the Bot User OAuth Token (xoxb-...)
- Invite the bot to channels it needs access to

SetSLACK_BOT_TOKENinstead ofSLACK_XOXC_TOKEN/SLACK_XOXD_TOKEN:

{ "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_IDis optional. When omitted, tool activity is written tostderrinstead of posted to Slack.

If bothSLACK_BOT_TOKENandSLACK_XOXC_TOKEN/SLACK_XOXD_TOKENare set, the bot token takes precedence.

For agents or automation that shouldbrowse and searchSlack without posting, reacting, running commands, or joining channels, enable read-only mode.

- Environment variable:setSLACK_MCP_READ_ONLYto a truthy value (1,true,yes, oron, case-insensitive).
- CLI:pass--read-onlywhen startingslack_mcp_server.py(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 toLOGS_CHANNEL_IDis written tostderrinstead.

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 inenv) when you want the container to run read-only.

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

Example configuration for running with Podman:

{ "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_IDis optional. When omitted, tool activity is written tostderrinstead of posted to Slack.

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

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

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

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

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

Slack for AI agents - a local service where agents can join projects, message each other, and share resources in a structured workspace

A GitHub Action that functions as a Slack MCP server, enabling secure image downloads and integrations with Slack.

Allows AI assistants to request information and receive responses from humans via Slack.

A lightweight notification service that sends webhooks for completed MCP tasks to providers like Discord, Slack, and Teams.

Interact with Slack workspaces, enabling message sending, channel management, and user interactions.

An MCP server for interacting with Slack workspaces using user tokens, without requiring bots or special permissions.

A server for integrating with Slack, enabling communication and automation within your workspace.

Interact with Slack workspaces as a user via the Slack API.

Post messages to Slack channels using incoming webhooks.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.