slack
This server provides an MCP interface to interact with Slack workspaces, including public and private channels, messages, threads, reactions, and users.
List public and private channels with pagination
Read channel message history with configurable limits
Retrieve full thread replies for a message
Post new messages to channels
Reply to existing message threads
Add emoji reactions to messages
List workspace users with basic profiles
Fetch detailed user profile information
Enforces optional channel allowlist via SLACK_CHANNEL_IDS
Handles Slack API errors and missing-scope guidance
Enables interaction with Slack workspaces, providing tools for listing channels, posting messages, replying to threads, adding reactions, retrieving channel history and thread replies, and accessing user profiles.
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., "@slack send a message to channel C12345: 'Hello from Claude!'"
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.
Slack MCP Server for Private Channels
An independently maintained Model Context Protocol (MCP) server for Slack. It supports public and private channel discovery, channel history, thread history, messages, reactions, and user profiles.
This is not the official @modelcontextprotocol/server-slack package and is not affiliated with Anthropic, Slack, or the Model Context Protocol project. It is derived from Anthropic's archived MIT-licensed Slack server; see Attribution.
Requirements
Node.js 20 or newer
A Slack app with a bot token (
xoxb-...)The Slack app installed in the target workspace
The app invited to every private channel it needs to access
Related MCP server: slack-mpm
Slack scopes
Grant only the scopes needed for the tools you intend to use:
Capability | Public channel scope | Private channel scope |
List channels |
|
|
Read channel and thread history |
|
|
Post messages and thread replies |
|
|
Add reactions |
|
|
List users |
| — |
Read detailed profiles |
| — |
Scopes alone do not expose private channels: invite the Slack app to each private channel first. After changing scopes, reinstall the app to the workspace.
Install
Run directly with npm:
npx -y @gustavonline/slack-mcp-server-private-channelsOr install globally:
npm install --global @gustavonline/slack-mcp-server-private-channels
slack-mcp-private-channelsMCP client configuration
{
"mcpServers": {
"slack-private-channels": {
"command": "npx",
"args": [
"-y",
"@gustavonline/slack-mcp-server-private-channels"
],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-bot-token",
"SLACK_TEAM_ID": "T01234567",
"SLACK_CHANNEL_IDS": "C01234567,G76543210"
}
}
}
}SLACK_CHANNEL_IDS is optional. When present, it is an enforced allowlist for every channel-specific tool, not merely a filter for channel listing. Leave it unset to let Slack permissions and channel membership determine access.
Never commit a real Slack token to source control. Prefer your MCP client's secret storage or an environment-injection mechanism.
Tools
slack_list_channels— list public and private channels, with cursor paginationslack_get_channel_history— read messages in a channel, with cursor paginationslack_get_thread_replies— read a complete thread page, with cursor paginationslack_post_message— post a channel messageslack_reply_to_thread— reply to a threadslack_add_reaction— add an emoji reactionslack_get_users— list workspace users, with cursor paginationslack_get_user_profile— read a user's detailed profile
Slack responses are returned as JSON text. Slack API failures are marked as MCP tool errors. Missing private-channel scopes include actionable guidance for groups:read or groups:history.
Environment variables
Variable | Required | Description |
| Yes | Bot User OAuth Token; normally starts with |
| Yes | Workspace/team ID; starts with |
| No | Comma-separated channel allowlist, enforced on reads and writes |
The server keeps the MCP connection available when required configuration is missing and returns a configuration error for tool calls. It does not log tokens, message text, or complete tool arguments.
Docker
Build from the repository root:
docker build -t slack-mcp-private-channels .Run it as a stdio MCP server:
docker run --rm -i \
-e SLACK_BOT_TOKEN \
-e SLACK_TEAM_ID \
-e SLACK_CHANNEL_IDS \
slack-mcp-private-channelsThe image runs as the unprivileged node user.
Development
npm ci
npm run check
npm pack --dry-run
npm publish --dry-runTests mock Slack's HTTP API and specifically cover private channel discovery, conversations.history, conversations.replies, scope errors, pagination, and allowlist enforcement. No real Slack credentials are required.
Release bootstrap
Publishing is intentionally separate from CI. The
Publish to npm workflow runs only after a
manual workflow_dispatch and targets the protected GitHub Environment
npm-publish. It requests only contents: read and id-token: write, stores
no npm token, verifies the package again, and publishes with npm provenance.
Before using the workflow, the package owner must:
Approve the exact package name and version and confirm that the version is not already present in the npm registry.
Establish the package under the
@gustavonlinescope using an owner-authorized npm first-publish/bootstrap path. If npm requires an authenticated first publication before a Trusted Publisher can be added, that one-time action must be performed explicitly by the owner; this workflow does not bootstrap ownership.In npm package settings, configure a GitHub Actions Trusted Publisher for owner
gustavonline, repositoryslack-mcp-server-private-channels, workflow filenamerelease.yml, and environmentnpm-publish.In GitHub repository settings, create the
npm-publishEnvironment, limit it to the intended release branch, and add an owner as required reviewer.Confirm that npm Trusted Publisher access, GitHub Environment approval, and repository push authority are all active before running the workflow.
The workflow must not be run merely to test publishing. Use
npm publish --dry-run locally or in CI for payload validation. A workflow run
performs a real public npm publication after the environment approval gate.
Troubleshooting private channels
If a private channel is missing or history fails:
Add
groups:readfor discovery andgroups:historyfor channel/thread history.Reinstall the Slack app after changing OAuth scopes.
Invite the app to the private channel.
If
SLACK_CHANNEL_IDSis set, include that channel's ID (often starting withG).Inspect the returned Slack error such as
missing_scopeornot_in_channel.
Security
Use the smallest practical Slack scope set and optionally configure SLACK_CHANNEL_IDS as a defense-in-depth allowlist. See SECURITY.md for private vulnerability reporting.
Attribution
This project is derived from the Slack server in the archived Model Context Protocol servers repository, originally Copyright © 2024 Anthropic, PBC and released under the MIT License. Subsequent private-channel support and maintenance are by Gustav Anderson.
The package identity, maintainer, repository, and documentation describe this fork rather than implying that it is the official upstream package. See NOTICE and LICENSE.
Available Tools
8 toolsslack_add_reactionB
Add a reaction emoji to a message
Inputs: reaction (required), timestamp (required), channel_id (required).
slack_get_channel_historyB
Get recent messages from a channel. Requires 'groups:history' scope for private channels.
Inputs: channel_id (required), limit.
slack_get_thread_repliesB
Get all replies in a message thread
Inputs: thread_ts (required), channel_id (required).
slack_get_user_profileB
Get detailed profile information for a specific user
Inputs: user_id (required).
slack_get_usersB
Get a list of all users in the workspace with their basic profile information
Inputs: limit, cursor.
slack_list_channelsA
List public and private channels in the workspace with pagination. Requires 'groups:read' scope for private channels.
Inputs: limit, cursor.
slack_post_messageB
Post a new message to a Slack channel
Inputs: text (required), channel_id (required).
slack_reply_to_threadB
Reply to a specific message thread in Slack
Inputs: text (required), thread_ts (required), channel_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct action: adding reactions, fetching history, retrieving threads, user profiles, user lists, channel lists, posting messages, and replying to threads. There is no ambiguity between tools.
All tool names follow the consistent pattern 'slack_verb_noun' using snake_case, such as slack_get_channel_history and slack_post_message. No deviations.
8 tools is well-suited for a Slack integration, covering core messaging, reactions, user and channel info, and threads. The count is neither too sparse nor excessive.
The set covers essential read and write operations but lacks message update/delete, channel creation, file uploads, and direct messaging. Notable gaps that agents may encounter.
Related MCP Connectors
Hosted Slack MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Hosted Airtable MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- -licenseNot gradedqualityBmaintenanceMCP Server for the Slack API, enabling Claude to interact with Slack workspaces.70,822 npm91,952MIT
- FlicenseBqualityDmaintenanceMCP server for Slack workspace integration, exposing 40+ Slack operations as tools for Claude Desktop and providing a clean async Python API.641-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server for Slack integration, allowing Claude to interact with your Slack workspace.53,813 npmMIT
- AlicenseAqualityDmaintenanceMCP server that connects Claude Code to Slack, allowing two-way communication via Slack Socket Mode without tunnels.1MIT