mcp-slack
This server lets you list Slack channels, read recent channel messages, and post messages to channels.
List channels accessible to the bot, including names, IDs, and topics.
Read the last N messages from a channel by name or ID (default 20, max 100).
Post a message to a channel by name or ID; this is an immediate external write, so confirm destination and text first.
Note: the provided schema exposes only these three tools; the README’s
slack_find_userand DM-focused behavior are not present in the schema.
Provides tools for listing channels, reading messages, and posting messages to Slack using a bot token.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-slack Read last 20 messages from #announcements"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-slack
MCP server for Slack integration, built with FastMCP. Provides tools for listing channels, finding workspace members, reading channel and direct-message history, and posting to a channel or as a direct message (DM) to a person.
Listing, user lookup and reading are observational. slack_post_message
performs an external write immediately when invoked, so callers must confirm
the resolved destination and the exact message text with the requester before
calling it. There is no default destination: an empty, unknown or ambiguous
destination fails without posting.
Install
pip install -e ".[dev]"Related MCP server: slack-mcp-server
Environment Variables
Variable | Required | Description |
| Yes | Slack OAuth token. A Bot User OAuth Token ( |
Copy .env.example to .env and fill in your values.
SLACK_DEFAULT_CHANNEL is no longer read. Earlier versions posted to it when
slack_post_message received an empty channel; pass the destination explicitly
in every call instead.
Tools
Tool | Description |
| List all channels accessible by the token |
| Find workspace members by e-mail (exact) or by handle, display name, real name or e-mail substring |
| Read the last N messages (default: 20, max: 100) of a channel or of the DM with a person; never creates a DM |
| Post to a channel, or open (or reuse) the DM with a person and post there |
Every tool declares MCP safety annotations: the three read tools are marked
read-only; slack_post_message is marked as a non-idempotent external write.
Destinations
The channel parameter of slack_read_channel and slack_post_message
accepts:
Form | Example | Resolves to |
Channel name, with or without |
| Public or private channel visible to the token |
Conversation ID |
| Used as-is (channel, private channel or multi-party DM, direct message) |
|
| DM with that member; fails when zero or several members match |
| DM with the member that owns the e-mail | |
User ID |
| DM with that member |
Bots, deactivated members and Slackbot are never matched by name. When a name matches several members, the error lists the candidates so the caller can pass the intended user ID or e-mail.
Sending a DM safely
slack_find_userto identify the recipient; confirm the listed person with the requester.slack_read_channelwith the user ID to review the existing conversation.Show the requester the destination and the exact text; post only after explicit confirmation, using the user ID.
The message is sent as the identity that owns the token. With a bot token, the recipient sees a DM from the app's bot user, and only the bot's own DMs can be read; reading or writing a person's DMs requires that person's user token.
Slack App Setup
Go to api.slack.com/apps and create a new app
Under OAuth & Permissions, add the required scopes for the tools you want to use (Bot Token Scopes for a bot token, User Token Scopes for a user token):
Tool
Required scopes
slack_list_channelschannels:read,groups:readslack_find_userusers:read,users:read.emailslack_read_channel(channels)channels:history,groups:history, pluschannels:read,groups:readto resolve namesslack_read_channel(DMs)im:history,im:write,users:read,users:read.emailslack_post_message(channels)chat:write, pluschannels:read,groups:readto resolve namesslack_post_message(DMs)chat:write,im:write,users:read,users:read.emailconversations.open(scopeim:write) locates the DM with a person; reads passprevent_creationso they never create one. Multi-party DMs are supported by conversation ID (G...) and needmpim:historyto read. A bot token only sees channels it is a member of.Install the app to your workspace (reinstall after adding scopes)
Copy the OAuth token to
SLACK_BOT_TOKENInvite the bot to channels it should access:
/invite @your-bot-name
Troubleshooting: missing_scope Error
If a tool fails with a missing_scope error, the token lacks a permission the
tool needs. Check the error message to see which scope is missing,
cross-reference it with the table above, add the scope in your Slack App's
OAuth & Permissions page and reinstall the app to your workspace.
Usage
Standalone
mcp-slackClaude Code
Keep the token out of command-line arguments. One option is a local .env
file (mode 600, never committed) loaded by uv:
claude mcp add --scope user slack -- \
uv run --directory /path/to/mcp-slack --env-file /path/to/mcp-slack/.env mcp-slackClaude Desktop config
{
"mcpServers": {
"slack": {
"command": "mcp-slack",
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token"
}
}
}
}Development
pip install -e ".[dev]"
ruff check src/ tests/
ruff format src/ tests/
pytestLicense
MIT
Documentation and roadmap
Priorities live in GitHub Issues and Projects. Delivery history lives in closed Issues, pull requests and GitHub Releases.
Available Tools
3 toolsslack_list_channelsA
List all Slack channels accessible by the bot.
Returns a formatted list of channel names with their IDs and topics.
Inputs: no named parameters. Returns: result
slack_post_messageA
Send a message to a Slack channel.
Args: channel: Channel name (without #) or channel ID. text: The message text to send. Supports Slack markdown.
Inputs: text (required), channel (required). Returns: result
slack_read_channelA
Read the last N messages from a Slack channel.
Args: channel: Channel name (without #) or channel ID. limit: Number of messages to retrieve (default: 20, max: 100).
Inputs: channel (required), limit. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool maps to a distinct Slack action+resource: listing channels, reading messages, and posting messages. There is no overlap in purpose or argument shape between them.
All three tools use a consistent slack_ prefix with a clear verb_noun pattern (slack_list_channels, slack_read_channel, slack_post_message). The convention is predictable throughout.
Three tools is on the thin side for a Slack integration; the set covers only the most basic read/write loop. It is functional but leaves little room for common adjacent operations.
Core operations (list channels, read messages, post message) are present, but there are notable gaps: no thread replies, reactions, message search, user/DM lookup, or message editing. Agents can do basic workflows but will hit dead ends on common Slack tasks.
Maintenance
Related MCP Connectors
Enable interaction with Slack workspaces. Supports subscribing to Slack events through Resources.
Connect a Discord bot (bot token from the developer portal) to read/send messages, list guilds and c
Chat with your AI agents from Slack: each gets a thread in your DM, and your replies there wake it.
Connect assistants to your workspace knowledge, skills, and work tools.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables interaction with Slack workspaces as a user, supporting channel listing, message posting, threading, reactions, and user management via the Slack API.811MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Slack workspaces, including listing channels, posting messages, replying to threads, adding reactions, and retrieving user information.1019 npmMIT
- FlicenseAqualityDmaintenanceEnables AI agents to interact with Slack using a user token, providing full access to message search, channel history, DMs, and posting as the user.8-
- AlicenseBqualityBmaintenanceEnables AI assistants to interact with Slack workspaces, providing tools for reading messages, posting content, managing channels, and more.2244MIT