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
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
# Run the server
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
- Go to api.slack.com/apps and create a new app
- Under OAuth & Permissions, add Bot Token Scopes:
channels:read,channels:write,channels:historychat:write,chat:write.publicreactions:read,reactions:writepins:read,pins:writeusers:read,users:read.emailfiles:read,files:writesearch:read(user token scope)im:write,im:read
- Install the app to your workspace
- Copy the Bot User OAuth Token (
xoxb-...) - Copy the User OAuth Token (
xoxp-...) - Copy the Signing Secret from Basic Information page
Connecting to AI Agents
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"slack": {
"command": "slack-mcp-server",
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token",
"SLACK_USER_TOKEN": "xoxp-your-token",
"SLACK_SIGNING_SECRET": "your-secret"
}
}
}
}
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"slack": {
"command": "slack-mcp-server",
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token"
}
}
}
}
WorkOS / Custom Agents
Add to .mcp.json:
{
"mcpServers": {
"slack": {
"transport": "stdio",
"command": "python",
"args": ["-m", "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-test python -m slack_mcp_server
Publishing
To PyPI
pip install build twine
python -m build
twine upload dist/*
To MCP Registry
mcp-publisher login github
mcp-publisher publish
License
MIT — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file workos_slack_mcp_server-1.0.0.tar.gz.
File metadata
- Download URL: workos_slack_mcp_server-1.0.0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b7918a3d29ec1d28a0ba84a0e5772df98e9bcdbc39e349f490cc5ce99372f24
|
|
| MD5 |
9c3ada6a098a0584042d73e3f8dd4d1d
|
|
| BLAKE2b-256 |
b026e219996f71bd0dd0e567d73eb90187ccc10592042d3091c97ad7ce00ade9
|
File details
Details for the file workos_slack_mcp_server-1.0.0-py3-none-any.whl.
File metadata
- Download URL: workos_slack_mcp_server-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6efef17041b80a0974f31674b2a0d7f578c75fd6856236ea8791a0f42e031a2b
|
|
| MD5 |
1bddbf94dc5089c11d77400e05bfc1e2
|
|
| BLAKE2b-256 |
435b15d7be320a35b861dcc0fec3a749ae52ada87ca81dc475d9bd10d5a54e38
|