Skip to main content

MCP server for Slack workspace operations — send messages, manage channels, search conversations, and more.

Project description

Slack MCP Server

A production-ready Model Context Protocol (MCP) server for Slack workspace operations. Connect any AI agent to Slack — send messages, manage channels, search conversations, react to messages, upload files, and look up user profiles.

This is an independent, generalized MCP server. It is not tied to any specific project and can be connected to any AI agent that supports MCP (Claude Desktop, Cursor, WorkOS, or custom agents).

Features

  • 📨 Messaging: Send messages, read channels, reply to threads, send DMs
  • 📁 Channels: List, create, archive channels, set topics
  • 🔍 Search: Full-text search across workspace messages
  • 😀 Reactions: Add/remove emoji reactions, pin/unpin messages
  • 👤 Users: Look up user profiles (name, email, title, status)
  • 📎 Files: Upload text files to channels

Installation

Recommended — no pre-install required (uses uv):

# uv manages a temporary isolated environment automatically
uvx --from workos-slack-mcp-server slack-mcp-server

Or install permanently with pip:

pip install workos-slack-mcp-server

Or install from source:

git clone https://github.com/workos/workos-slack-mcp-server
cd workos-slack-mcp-server
pip install -e .

Quick Start

export SLACK_BOT_TOKEN="xoxb-your-bot-token"
export SLACK_USER_TOKEN="xoxp-your-user-token"      # Optional, for search
export SLACK_SIGNING_SECRET="your-signing-secret"    # Optional, for verification

# Recommended: run via uvx (no install needed)
uvx --from workos-slack-mcp-server slack-mcp-server

# Or if installed via pip
slack-mcp-server

# Or run as a Python module
python -m slack_mcp_server

Configuration

Environment Variables

Variable Required Description
SLACK_BOT_TOKEN ✅ Yes Bot User OAuth Token (xoxb-...)
SLACK_USER_TOKEN ⬜ No User OAuth Token (xoxp-...) — enables broader search results
SLACK_SIGNING_SECRET ⬜ No App Signing Secret — for request verification

Getting Slack Tokens

  1. Go to api.slack.com/apps and create a new app
  2. Under OAuth & Permissions, add Bot Token Scopes:
    • channels:read, channels:write, channels:history
    • chat:write, chat:write.public
    • reactions:read, reactions:write
    • pins:read, pins:write
    • users:read, users:read.email
    • files:read, files:write
    • search:read (user token scope)
    • im:write, im:read
  3. Install the app to your workspace
  4. Copy the Bot User OAuth Token (xoxb-...)
  5. Copy the User OAuth Token (xoxp-...)
  6. Copy the Signing Secret from Basic Information page

Connecting to AI Agents

Note: Use uvx --from workos-slack-mcp-server slack-mcp-server in all configs below. The --from flag is needed because the PyPI package name (workos-slack-mcp-server) differs from the CLI entry point (slack-mcp-server). You must have uv installed (brew install uv on macOS).

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "slack": {
      "command": "uvx",
      "args": ["--from", "workos-slack-mcp-server", "slack-mcp-server"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-token",
        "SLACK_USER_TOKEN": "xoxp-your-token",
        "SLACK_SIGNING_SECRET": "your-secret"
      }
    }
  }
}

Alternative — if you have installed via pip install workos-slack-mcp-server and prefer not to use uvx, use the full absolute path to the binary instead:

{ "command": "/path/to/your/bin/slack-mcp-server" }

Find the path with: which slack-mcp-server

Cursor

Edit ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):

{
  "mcpServers": {
    "slack": {
      "command": "uvx",
      "args": ["--from", "workos-slack-mcp-server", "slack-mcp-server"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-token",
        "SLACK_USER_TOKEN": "xoxp-your-token",
        "SLACK_SIGNING_SECRET": "your-secret"
      }
    }
  }
}

VS Code (GitHub Copilot / MCP extension)

Edit .vscode/mcp.json in your project:

{
  "servers": {
    "slack": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "workos-slack-mcp-server", "slack-mcp-server"],
      "env": {
        "SLACK_BOT_TOKEN": "${input:slackBotToken}"
      }
    }
  },
  "inputs": [
    {
      "id": "slackBotToken",
      "type": "promptString",
      "description": "Slack Bot Token (xoxb-...)",
      "password": true
    }
  ]
}

WorkOS / Custom Agents

Add to .mcp.json in your project root:

{
  "mcpServers": {
    "slack": {
      "transport": "stdio",
      "command": "uvx",
      "args": ["--from", "workos-slack-mcp-server", "slack-mcp-server"],
      "env": {
        "SLACK_BOT_TOKEN": "${SLACK_BOT_TOKEN}",
        "SLACK_USER_TOKEN": "${SLACK_USER_TOKEN}",
        "SLACK_SIGNING_SECRET": "${SLACK_SIGNING_SECRET}"
      }
    }
  }
}

Available Tools (15)

Tool Description
slack_send_message Send a message to a channel
slack_read_messages Read recent messages from a channel
slack_reply_thread Reply to a message thread
slack_send_dm Send a direct message to a user
slack_list_channels List workspace channels
slack_create_channel Create a new channel
slack_archive_channel Archive a channel
slack_set_channel_topic Set channel topic
slack_search_messages Search messages across workspace
slack_add_reaction Add emoji reaction to a message
slack_remove_reaction Remove emoji reaction
slack_pin_message Pin a message in a channel
slack_unpin_message Unpin a message
slack_get_user_profile Get user profile information
slack_upload_file Upload a text file to a channel

Development

git clone https://github.com/workos/workos-slack-mcp-server
cd workos-slack-mcp-server
pip install -e .

# Run tests
pytest

# Run the server locally
SLACK_BOT_TOKEN=xoxb-... python -m slack_mcp_server

Publishing

To PyPI

pip install build twine
rm -rf dist/ build/ src/*.egg-info
python -m build
pip install "packaging>=24.2"   # required for Metadata 2.4 support in twine
twine check dist/*              # validate before uploading
twine upload dist/*

To MCP Registry

mcp-publisher login github
mcp-publisher publish

License

MIT — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

workos_slack_mcp_server-1.0.2.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

workos_slack_mcp_server-1.0.2-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file workos_slack_mcp_server-1.0.2.tar.gz.

File metadata

  • Download URL: workos_slack_mcp_server-1.0.2.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for workos_slack_mcp_server-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6805bbf063edd507b5b472c08a7810213de070002a9f77040ea87479da0e44dc
MD5 b3200cb42f02b46a64c069473fa747e8
BLAKE2b-256 285fede6ebe7490b320bafd892594e3c336f45c0d3ce69373eb6a9f19aa3ff35

See more details on using hashes here.

File details

Details for the file workos_slack_mcp_server-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for workos_slack_mcp_server-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4e3dec3d85a87b5961e65161c8175d4a9633016a5e9f9c9bae0e607a90a23579
MD5 bb82d64fbe1bd43f9bba34dd351540a2
BLAKE2b-256 fc292fc1ffdf995d84e00da0fe6d55393cafffb40714aa9ef3643bdd55e6156a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page