Slack MCP Server
The Slack MCP Server enables AI assistants to interact with Slack's API through a standardized interface, providing tools for:
Message Management: Post messages to channels, reply to threads, add emoji reactions
Channel Operations: List public channels, get channel message history
User Information: Retrieve basic and detailed user profile information
Search Functionality: Find messages across the workspace with customizable filters
These capabilities allow AI assistants to effectively communicate and gather information within Slack workspaces.
Supports environment variable configuration through .env files for storing Slack tokens and other configuration settings.
Integrated for code linting during development to maintain code quality and consistency.
Hosts the package in GitHub Registry, requiring a Personal Access Token (PAT) for installation and access to the MCP server package.
Used as the package manager for installing and running the MCP server package.
Used for code formatting to ensure consistent code style across the project.
Provides tools for interacting with Slack API, including listing channels, posting messages, replying to threads, adding reactions, retrieving channel history, getting thread replies, retrieving user information, and searching messages in a Slack workspace.
Used for defining and validating request/response schemas, ensuring proper data structure for API interactions and limiting response fields to necessary data.
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 MCP Server post a message to the #general channel saying 'Team meeting starts in 5 minutes'"
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
A MCP(Model Context Protocol) server for accessing Slack API. This server allows AI assistants to interact with the Slack API through a standardized interface.
Transport Support
This server supports both traditional and modern MCP transport methods:
Stdio Transport (default): Process-based communication for local integration
Streamable HTTP Transport: HTTP-based communication for web applications and remote clients
Related MCP server: Slack MCP Server
Features
Available tools:
slack_list_channels- List public channels in the workspace with paginationslack_post_message- Post a new message to a Slack channel.textis standard Markdown that Slack renders; setformat: "slack_mrkdwn"to write Slack mrkdwn insteadslack_reply_to_thread- Reply to a specific message thread in Slack. Takestextandformatlikeslack_post_messageslack_add_reaction- Add a reaction emoji to a messageslack_get_channel_history- Get recent messages from a channelslack_get_thread_replies- Get all replies in a message threadslack_get_users- Retrieve basic profile information of all users in the workspaceslack_get_user_profiles- Get multiple users' profile information in bulk (efficient for batch operations)slack_search_messages- Search for messages in the workspace with powerful filters:Basic query search
Location filters:
in_channelUser filters:
from_user,withDate filters:
before(YYYY-MM-DD),after(YYYY-MM-DD),on(YYYY-MM-DD),during(e.g., "July", "2023")Content filters:
has(emoji reactions),is(saved/thread)Sorting options by relevance score or timestamp
Quick Start
Installation
npm install @ubie-oss/slack-mcp-serverNOTE: Its now hosted in GitHub Registry so you need your PAT.
Configuration
You need to set the following environment variables:
SLACK_BOT_TOKEN: Slack Bot User OAuth TokenSLACK_USER_TOKEN: Slack User OAuth Token (required for some features like message search)SLACK_SAFE_SEARCH(optional): When set totrue, message searches use Slack's Real-time Search API withchannel_types: ["public_channel"]. The user token must have thesearch:read.publicscope. The public-channel restriction applies before results are selected and paginated; clients cannot override it. This option affects message search, not the permissions of other tools.
You can also create a .env file to set these environment variables:
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_USER_TOKEN=xoxp-your-user-token
SLACK_SAFE_SEARCH=true # Optional: Enable safe search modePublic message search
With SLACK_SAFE_SEARCH=true, slack_search_messages calls assistant.search.context using the user token, public channels only, message results only, and keyword search. It does not call legacy search.messages, including when the new API is unavailable or the token lacks a required scope.
The search tool keeps the existing keyword, channel, user, date and sorting fields. Public mode uses limit (1–20, default 20) and cursor instead of count and page. Pass next_cursor back with the same query and filters to read another page. An empty cursor marks the end of the results.
{"query":"project update","limit":20,"cursor":"cursor-from-the-previous-response"}Each successful MCP call returns a single text content block containing this JSON contract. It has no total counts, page numbers, ranking metadata, contextual messages or other result types. channel.name and user may be omitted; next_cursor is always a string.
{
"contract": "slack-public-search-v1",
"messages": {
"matches": [{
"channel": {"id": "C1234567", "name": "general"},
"text": "Public project update",
"ts": "1234567890.123456",
"user": "U1234567",
"permalink": "https://example.slack.com/archives/C1234567/p1234567890123456"
}]
},
"next_cursor": ""
}To upgrade an existing safe-search deployment:
Add the
search:read.publicuser scope to the Slack app and reauthorize it. A token with only legacysearch:readis insufficient. Do not share tokens in configuration examples or logs.Deploy this server with safe search enabled. Verify a public query and a subsequent cursor request. A
missing_scopeerror explains the required scope; other API failures do not trigger a legacy fallback.Upgrade clients to accept the
slack-public-search-v1response and cursor input. Clients that depend on a public-only boundary should reject legacy responses instead of forwarding their metadata.
When SLACK_SAFE_SEARCH is unset or false, the existing legacy search API, count/page inputs and response shape remain unchanged.
Usage
Start the MCP server
Stdio Transport (default):
npx @ubie-oss/slack-mcp-serverStreamable HTTP Transport:
npx @ubie-oss/slack-mcp-server -port 3000You can also run the installed module with node:
# Stdio transport
node node_modules/.bin/slack-mcp-server
# HTTP transport
node node_modules/.bin/slack-mcp-server -port 3000Command Line Options:
-port <number>: Start with Streamable HTTP transport on specified port-h, --help: Show help message
Client Configuration
For Stdio Transport (Claude Desktop, etc.):
{
"slack": {
"command": "npx",
"args": [
"-y",
"@ubie-oss/slack-mcp-server"
],
"env": {
"NPM_CONFIG_//npm.pkg.github.com/:_authToken": "<your-github-pat>",
"SLACK_BOT_TOKEN": "<your-bot-token>",
"SLACK_USER_TOKEN": "<your-user-token>",
"SLACK_SAFE_SEARCH": "true"
}
}
}For Streamable HTTP Transport (Web applications):
Start the server:
SLACK_BOT_TOKEN=<your-bot-token> SLACK_USER_TOKEN=<your-user-token> npx @ubie-oss/slack-mcp-server -port 3000Connect to: http://localhost:3000/mcp
See examples/README.md for detailed client examples.
Implementation Pattern
This server adopts the following implementation pattern:
Define request/response using Zod schemas
Request schema: Define input parameters
Response schema: Define responses limited to necessary fields
Implementation flow:
Validate request with Zod schema
Call Slack WebAPI
Parse response with Zod schema to limit to necessary fields
Return as JSON
For example, the slack_list_channels implementation parses the request with ListChannelsRequestSchema, calls slackClient.conversations.list, and returns the response parsed with ListChannelsResponseSchema.
Development
Available Scripts
npm run dev- Start the server in development mode with hot reloadingnpm run build- Build the project for productionnpm run start- Start the production servernpm run lint- Run linting checks (ESLint and Prettier)npm test- Run the message-search boundary tests with Node's test runnernpm run fix- Automatically fix linting issues
Contributing
Fork the repository
Create your feature branch
Run tests and linting:
npm run lintCommit your changes
Push to the branch
Create a Pull Request
Available Tools
11 toolsslack_add_reactionA
Add a reaction emoji to a message
Inputs: reaction (required), timestamp (required), channel_id (required).
slack_get_channel_historyA
Get messages from a channel in chronological order. Use this when: 1) You need the latest conversation flow without specific filters, 2) You want ALL messages including bot/automation messages, 3) You need to browse messages sequentially with pagination. Do NOT use if you have specific search criteria (user, keywords, dates) - use slack_search_messages instead.
Inputs: channel_id (required), limit, cursor.
slack_get_thread_repliesB
Get all replies in a message thread
Inputs: thread_ts (required), channel_id (required), limit, cursor.
slack_get_user_profilesB
Get multiple users profile information in bulk
Inputs: user_ids (required).
slack_get_usersB
Retrieve basic profile information of all users in the workspace
Inputs: limit, cursor.
slack_list_channelsA
List public channels in the workspace with pagination
Inputs: limit, cursor.
slack_post_messageC
Post a new message to a Slack channel
Inputs: text (required), channel_id (required), format.
slack_reply_to_threadC
Reply to a specific message thread in Slack
Inputs: text (required), thread_ts (required), channel_id (required), format.
slack_search_channelsA
Search for channels by partial name match. Use this when you need to find channels containing specific keywords in their names. Returns up to the specified limit of matching channels.
Inputs: query (required), limit, include_archived.
slack_search_messagesA
Search for messages with specific criteria/filters. Use this when: 1) You need to find messages from a specific user, 2) You need messages from a specific date range, 3) You need to search by keywords, 4) You want to filter by channel. This tool is optimized for targeted searches. For general channel browsing without filters, use slack_get_channel_history instead.
Inputs: on, page, sort, after, +8 more.
slack_search_usersA
Search for users by partial name match across username, display name, and real name. Use this when you need to find users containing specific keywords in their names. Returns up to the specified limit of matching users.
Inputs: query (required), limit, include_bots.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools target distinct actions (post, reply, react, list, search), and the history-vs-search-messages pair is explicitly disambiguated in the descriptions. The main overlap is slack_get_users (all users, basic info) versus slack_get_user_profiles (bulk profile info) versus slack_search_users, where the boundary between the first two is unclear.
All tools use a uniform slack_<verb>_<noun> snake_case convention (slack_post_message, slack_list_channels, slack_search_users), with verbs chosen sensibly for the action. No mixed casing or inconsistent prefixes.
Eleven tools is well within a reasonable range for a Slack integration and each tool maps to a recognizable Slack operation. Nothing feels padded or missing at the count level.
Core read/write workflows (post, reply, react, read history/threads, search, list channels/users) are covered, but the message lifecycle is incomplete: no update_message, delete_message, or remove_reaction, and there is no direct-message or channel-management (create/join) coverage. These are notable gaps that would force agents into dead ends for common Slack tasks.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Hosted Slack MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server implementation that enables AI assistants to interact with Slack workspaces, allowing them to browse channels, send messages, reply to threads, add reactions, and retrieve user information.965 npm2Apache 2.0
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that integrates with Slack API, allowing users to send messages, view channel history, manage channels, send direct messages, and retrieve user lists from Slack workspaces.1-
- AlicenseNot gradedqualityDmaintenanceA simple Model Context Protocol server for Slack integration that enables messaging, channel management, and workspace search capabilities.MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables LLMs to interact with Slack workspaces through OAuth 2.0 authentication. It provides tools for listing channels and posting messages while supporting secure token persistence and dynamic client registration.-