A simplified MCP (Model Context Protocol) server for accessing Slack API. This server allows AI assistants to interact with essential Slack messaging and channel operations through a standardized interface.
This server uses stdio transport only for direct integration with MCP clients like Claude Desktop.
Available tools focused on core messaging and channel operations:
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 thread
npm install simple-slack-mcp-serverYou need to set the following environment variable:
SLACK_BOT_TOKEN: Slack Bot User OAuth Token
You can create a .env file to set this environment variable:
SLACK_BOT_TOKEN=xoxb-your-bot-token
npx simple-slack-mcp-serverYou can also run the installed module with node:
node node_modules/.bin/slack-mcp-serverFor Claude Desktop and other MCP clients:
{
"slack": {
"command": "npx",
"args": [
"simple-slack-mcp-server"
],
"env": {
"SLACK_BOT_TOKEN": "<your-bot-token>"
}
}
}See examples/README.md for detailed client examples.
Your Slack bot needs the following OAuth scopes:
channels:read- To list channelschat:write- To post messageschat:write.public- To post in public channelsreactions:write- To add reactions
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.
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 issuesnpm run examples- Run the example client
- 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