slack
A Model Context Protocol (MCP) server for Slack integration with comprehensive Block Kit support
claude mcp add --transport stdio piekstra-slack-mcp-server python -m slack_mcp \ --env SLACK_API_TOKEN="xoxb-your-slack-bot-token"
How to use
The Slack MCP Server exposes a set of tools that let you manage Slack workspaces via the Slack Web API through the MCP (Model Context Protocol) interface. It includes capabilities for channel management (listing channels, retrieving channel info, creating, archiving/unarchiving channels, and setting topics or purposes), user management (listing users, getting user info, inviting users to channels), messaging (sending, updating, and deleting messages; retrieving channel history and searching messages), rich Block Kit formatted messages (sending formatted messages, status notifications, and formatted lists), file management (uploading files to channels), and workspace information (getting basic workspace info). You can interact with these tools through the MCP client by listing available tools and calling a tool by name with the appropriate parameters. For example, list_channels can return channels in the workspace, while send_message can post text or Block Kit formatted messages to a channel. Note that search_messages relies on Slack’s search API, which may require user tokens with specific scopes, and some token types (bot tokens) may have limitations.
To use the server, connect with your MCP client (e.g., the Claude MCP client) and call tools by name, passing in the required parameters. The server authenticates using Slack API tokens configured securely (via keychain, environment variables, or other configured credential stores) and uses the Slack API scopes described in the documentation to perform actions on your workspace.
How to install
Prerequisites:
- Python 3.8+ (recommended)
- pip (comes with Python)
- Optional: macOS Keychain setup if you plan to use the quick secure credential storage flow described in the README
Installation (recommended - Global Install):
- Install the package globally so you can run the MCP server with a standard command:
pip install slack-mcp-server
- If you want to run from source, clone the repository and install in editable mode:
git clone <repository-url>
cd slack-mcp-server
pip install -e .
- Set up credentials securely (recommended):
slack-mcp-setup
If you cannot use keychain, you can configure credentials via environment variables as a fallback (see next section).
Configure credentials (environment variable fallback):
export SLACK_API_TOKEN=xoxb-your-slack-bot-token
export SLACK_WORKSPACE_ID=your-workspace-id # optional
Running the server:
# If installed globally
slack-mcp
# Or run via Python module
python -m slack_mcp
Additional notes
Environment and credentials:
- Keychain (macOS) is recommended for secure storage of API tokens. Use slack-mcp-setup or python -m slack_mcp.setup to store credentials securely.
- If using environment variables, ensure they are loaded in the environment where the MCP client runs. The server can read SLACK_API_TOKEN and optional SLACK_WORKSPACE_ID.
OAuth scopes: The required scopes are listed in the README (channels:read, channels:manage, groups:read, groups:write, chat:write, files:write, im:read, mpim:read, reactions:read, reactions:write, team:read, users:read). Note that search_messages requires search:read and may not work with bot tokens (xoxb). If search functionality is needed, consider using a user token or adjusting scopes accordingly.
Usage with Claude or MCP clients: You can integrate the server path and run commands through the client by specifying the tool name and parameters, as illustrated in the README examples. If you plan to run multiple MCP servers, keep track of each server’s token scope and environment configuration to avoid cross-talk or token leakage.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP