home / mcp / slack mcp server

Slack MCP Server

A Slack MCP server

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ubie-oss-slack-mcp-server": {
      "url": "http://localhost:3000/mcp",
      "headers": {
        "SLACK_BOT_TOKEN": "<your-bot-token>",
        "SLACK_USER_TOKEN": "<your-user-token>",
        "SLACK_SAFE_SEARCH": "true"
      }
    }
  }
}

You deploy a Slack MCP Server to give AI assistants a standardized way to interact with the Slack API. It supports local (stdio) and remote (HTTP) transports, making it easy to integrate with desktop copilots or web apps while enforcing safe search and structured responses.

How to use

You connect your MCP client to the Slack MCP Server using either the Stdio transport for local integration or the Streamable HTTP transport for web-based clients. The server exposes tools to list channels, post messages, manage threads and reactions, fetch histories and user profiles, and perform powerful message searches with flexible filters.

How to install

Prerequisites: Node.js and npm must be installed on your system.

Install the Slack MCP Server package from the package registry.

npm install @ubie-oss/slack-mcp-server

Additional configuration and usage notes

Environment variables you need to set for proper operation include the Slack bot token, the user token, and an optional safe search flag. You can place these in a .env file or export them in your shell session.

Required environment variables: - SLACK_BOT_TOKEN: Slack Bot User OAuth Token - SLACK_USER_TOKEN: Slack User OAuth Token (required for some features like message search) Optional: - SLACK_SAFE_SEARCH: Enable safe search mode by setting to true (locks private channels, DMs, and group DMs out of search results)

Run the server locally (stdio transport)

Start the server for local, process-based communication using the stdio transport.

npx @ubie-oss/slack-mcp-server

Run the server for remote clients (HTTP transport)

Start the server with streamable HTTP transport on a specific port. You can connect to the MCP endpoint at the provided URL.

SLACK_BOT_TOKEN=<your-bot-token> SLACK_USER_TOKEN=<your-user-token> npx @ubie-oss/slack-mcp-server -port 3000

Client connection URL

Connect to the MCP endpoint at http://localhost:3000/mcp from your HTTP MCP client.

Available tools

slack_list_channels

List public channels with pagination to help you discover workspace channels.

slack_post_message

Post a new message to a specified Slack channel.

slack_reply_to_thread

Reply to a specific message thread in Slack.

slack_add_reaction

Add a reaction emoji to a Slack message.

slack_get_channel_history

Fetch recent messages from a channel.

slack_get_thread_replies

Retrieve all replies within a message thread.

slack_get_users

Retrieve basic profile information for all users in the workspace.

slack_get_user_profiles

Fetch multiple user profiles in bulk for efficient batch operations.

slack_search_messages

Search workspace messages with filters like in_channel, from_user, date ranges, and content criteria.