home / mcp / slack mcp server

Slack MCP Server

Provides a Slack MCP Server to manage channels, messages, DMs, and search via MCP clients.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bcharleson-slack-mcp-server": {
      "command": "/path/to/slack-mcp-server/venv/bin/python",
      "args": [
        "-m",
        "slack_mcp_server"
      ],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-bot-token-here",
        "SLACK_USER_TOKEN": "xoxp-your-user-token-here"
      }
    }
  }
}

You run a Slack MCP Server to let AI assistants interact with your Slack workspace. It exposes channels, messaging, DMs, and search through a consistent MCP interface, enabling automated workflows and seamless workspace automation.

How to use

Launch the server in your environment and connect an MCP client to perform actions such as listing channels, posting messages, starting DMs, and searching workspace content. Use a standard MCP client to issue tool calls that map to the server’s capabilities, such as channel management, messaging, and user lookup.

How to install

Prerequisites include Python 3.10 or higher and a Slack workspace with admin access to create apps. You will need a Slack Bot Token for most operations and, if you require search, a Slack User Token.

1. Create a Python virtual environment and activate it.

2. Install the server package in editable mode or install dependencies.

3. Prepare your Slack app with the necessary scopes and tokens as described in Slack app setup.

Configuration and usage notes

Configure environment variables in a .env file at the project root. The server requires SLACK_BOT_TOKEN for most operations and can optionally use SLACK_USER_TOKEN for search functionality.

Example tokens (placeholders shown): SLACK_BOT_TOKEN=xoxb-your-bot-token-here and SLACK_USER_TOKEN=xoxp-your-user-token-here.

To run the server, you can start it as a Python module or via its CLI entry point. The recommended runtime is to execute the module form during development.

Example commands you will use locally (adjust paths to your environment):

# Activate the virtual environment
source venv/bin/activate

# Run as a Python module
python -m slack_mcp_server

# Or start via the CLI entry point
slack-mcp-server

Available tools

list_channels

List all accessible channels (public and private) including details like IDs and names.

get_channel_info

Retrieve details about a specific channel, such as topic, purpose, and member list.

create_channel

Create a new channel with a given name and visibility.

archive_channel

Archive an existing channel to remove it from active usage.

get_channel_history

Fetch message history for a channel, including timestamps and user info.

join_channel

Join a channel to participate in conversations.

leave_channel

Leave a channel to stop receiving its messages.

set_channel_topic

Set or update the topic of a channel.

post_message

Post a message to a channel.

reply_to_thread

Post a reply to a specific thread in a channel.

get_thread_replies

Retrieve all replies within a thread.

add_reaction

Add an emoji reaction to a message.

remove_reaction

Remove an emoji reaction from a message.

get_message_reactions

Get the list of reactions on a message.

update_message

Update the content of an existing message.

delete_message

Delete a message from a channel.

send_dm

Send a direct message to a user.

list_conversations

List direct message and group DM conversations.

get_dm_history

Fetch the history of a DM conversation.

open_dm

Open a new DM conversation with a user.

search_messages

Search messages across the workspace (requires User Token).

search_files

Search files in the workspace (requires User Token).

search_all

Search both messages and files (requires User Token).

list_users

List workspace users.

get_user_info

Get detailed information about a user.

get_user_presence

Check if a user is currently online.

lookup_user_by_email

Find a user by their email address.

get_user_profile

Get a user’s detailed profile information.

get_bot_info

Retrieve identity information about the bot.

get_team_info

Obtain basic workspace information.