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.
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
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:
Usage
Start the MCP server
Directly:
Or, run the installed module with node:
Edit MCP configuration json for your client:
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
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A server implementing Model Context Protocol that enables AI assistants to interact with Slack API through a standardized interface, providing tools for messaging, channel management, user information retrieval, and more.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants to interact with Strapi CMS instances through a standardized interface, supporting content types and REST API operations.Last updated -56520JavaScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables AI assistants to interact with Telegram, allowing them to search channels, list available channels, retrieve messages, and filter messages by regex patterns.Last updated -713JavaScriptMIT License
- -securityAlicense-qualityA 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.Last updated -18JavaScriptApache 2.0
Kong Konnect MCP Serverofficial
AsecurityAlicenseAqualityA Model Context Protocol server enabling AI assistants to interact with Kong Konnect's API Gateway, providing tools to query analytics data, inspect configurations, and manage control planes through natural language.Last updated -1022TypeScriptApache 2.0