Get the FREE Ultimate OpenClaw Setup Guide →

slack

A Slack MCP server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ubie-oss-slack-mcp-server npx -y @ubie-oss/slack-mcp-server \
  --env SLACK_BOT_TOKEN="<your-bot-token>" \
  --env SLACK_USER_TOKEN="<your-user-token>" \
  --env SLACK_SAFE_SEARCH="true"

How to use

This MCP server exposes the Slack API through a standardized MCP interface, enabling AI assistants to list channels, post messages, manage threads and reactions, and query message history and user profiles using simple MCP commands. It supports both the traditional Stdio transport for local integration and the Streamable HTTP transport for web applications, making it suitable for embedded assistants as well as remote clients. The server authenticates with Slack using bot and user tokens and enforces optional safe search constraints to omit private channels and DMs from search results when enabled.

Available tools include slack_list_channels, slack_post_message, slack_reply_to_thread, slack_add_reaction, slack_get_channel_history, slack_get_thread_replies, slack_get_users, slack_get_user_profiles, and slack_search_messages. Each tool accepts parameters via the MCP request schema and returns a structured JSON response. For example, slack_list_channels can be used to paginate public channels, while slack_search_messages supports rich filters such as by channel, user, date ranges, content conditions, and sorting by relevance or timestamp.

How to install

Prerequisites:

  • Node.js (preferred) and npm installed on your machine
  • Access token for the GitHub Package Registry if you rely on the hosted package (PAT configured in your environment)

Install the MCP server package:

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

Environment variables (required or optional as described):

  • SLACK_BOT_TOKEN: Slack Bot User OAuth Token
  • SLACK_USER_TOKEN: Slack User OAuth Token (required for some features like search)
  • SLACK_SAFE_SEARCH: Optional; set to true to exclude private channels, DMs, and group DMs from search results

Running the server (Stdio transport, default):

npx @ubie-oss/slack-mcp-server

Running the server with HTTP transport (streamable):

npx @ubie-oss/slack-mcp-server -port 3000

Alternatively, install and run via Node directly from node_modules:

# Stdio transport
node node_modules/.bin/slack-mcp-server

# HTTP transport
node node_modules/.bin/slack-mcp-server -port 3000

Client configuration examples (from the README) are provided to help you wire up your MCP clients.

Additional notes

Tips and caveats:

  • Ensure your Slack tokens have the required scopes for the operations you intend to perform (e.g., channels:read, chat:write, users:read).
  • If you enable SLACK_SAFE_SEARCH, the server will automatically exclude private channels, DMs, and group DMs from search results; this behavior cannot be overridden by clients.
  • For HTTP transport, the server exposes an endpoint at /mcp (e.g., http://localhost:3000/mcp). You may need to configure CORS or authentication if exposing this publicly.
  • The server uses Zod schemas to validate requests and responses to ensure consistent shapes; supply correct parameter names and types as defined by the MCP API for each tool.
  • If you plan to deploy behind a reverse proxy or in a container, remember to forward the port used by the HTTP transport (default 3000) and keep your tokens secure.

Related MCP Servers

Sponsor this space

Reach thousands of developers