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.
Features
Available tools:
slack_list_channels
- List public channels in the workspace with paginationslack_post_message
- Post a new message to a Slack channelslack_reply_to_thread
- Reply to a specific message thread in Slackslack_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_profile
- Get a user’s profile informationslack_search_messages
- Search for messages in the workspace
Quick Start
Installation
npm install @ubie-oss/slack-mcp-server
NOTE: 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)
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
Usage
Start the MCP server
Directly:
npx @ubie-oss/slack-mcp-server
Or, run the installed module with node:
node node_modules/.bin/slack-mcp-server
Edit MCP configuration json for your client:
{
"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>"
}
}
}
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 run fix
- Automatically fix linting issues
Contributing
- Fork the repository
- Create your feature branch
- Run tests and linting:
npm run lint
- Commit your changes
- Push to the branch
- Create a Pull Request
Slack MCP Server
Project Details
- ubie-oss/slack-mcp-server
- Apache License 2.0
- Last Updated: 4/14/2025
Categories
Recomended MCP Servers
Model Context Protocol with Neo4j
An MCP server implementing the think tool for Claude
基于 FastAPI 和 MCP(模型上下文协议),实现 AI 模型与开发环境 之间的标准化上下文交互,提升 AI 应用的可扩展性和可维护性。
A Model Context Protocol (MCP) server that automates generating LinkedIn post drafts from YouTube videos. This server provides...
MCP server implementation for using Claude API with Claude Desktop, providing advanced API integration and conversation management.
An intelligent MCP server that provides tools for collecting and documenting code from directories
为 Cursor、Windsurf、Cline 和其他 AI 驱动的编码工具提供访问飞书文档的能力,基于 Model Context Protocol 服务器实现。