- Home
- MCP servers
- Slack Notify
Slack Notify
- javascript
0
GitHub Stars
javascript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"silasreinagel-slack-notify-mcp": {
"command": "bun",
"args": [
"run",
"src/index.ts",
"--bot-token",
"xoxb-YOUR-BOT-TOKEN",
"--channel",
"CXXXXXXXXXX",
"--username",
"MCP Bot"
]
}
}
}This MCP server lets you post messages to Slack through either webhooks or the Slack Bot API. It provides convenient modes for simple posting or full API interactions, supports channel overrides, and handles Slack-specific mention syntax and validation to ensure reliable messaging from your MCP workflows.
How to use
You set up the server in one of two modes and then send messages through your MCP client. In webhook mode you configure a Slack webhook URL and an optional default channel. In bot mode you use a bot token and a channel ID. You can override the default username and emoji for individual messages and rely on Slack’s mention syntax for targeted notifications.
How to install
Prerequisites: you need a runtime that can execute the MCP server. This setup uses Bun as the runtime. Ensure Bun is installed on your system before proceeding.
-
Install dependencies using Bun.
-
Start the MCP server using the provided runtime command blocks for either webhook or bot mode.
Configuration and usage notes
Choose a mode and configure the MCP client with one of the following server definitions. Each definition specifies how messages are sent to Slack. Use the webhook mode for simple posting via a Slack webhook, or the bot mode for full API access with a Bot User OAuth Token.
{
"mcpServers": {
"slack-webhook": {
"command": "bun",
"args": [
"run",
"src/index.ts",
"--webhook-url",
"https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK",
"--channel",
"#general"
],
"cwd": "/path/to/slack-webhook-mcp-server"
}
}
}
{
"mcpServers": {
"slack-bot": {
"command": "bun",
"args": [
"run",
"src/index.ts",
"--bot-token",
"xoxb-YOUR-BOT-TOKEN",
"--channel",
"CXXXXXXXXXX",
"--username",
"MCP Bot"
],
"cwd": "/path/to/slack-webhook-mcp-server"
}
}
}
Slack-specific features and tips
This server supports Slack mentions, channel overrides, and per-message customization. Use <@USERID> to mention users, <!channel> or <!here> for channel-wide alerts, and set --username or --icon_emoji to tailor each message.
In webhook mode you reference channels by name (for example, #general). In bot mode you reference channels by ID (for example, CXXXXXXXXXX). Ensure you have the appropriate permissions for the mode you choose.
Mode comparison
Webhook Mode is simple to set up and uses a Slack webhook URL with basic messaging permissions. Bot Mode offers full API access but requires OAuth setup and channel IDs.
Error handling and validation
The server performs validation on webhook URLs and bot tokens, handles network issues, maps Slack API errors to clear messages, enforces the 4000 character limit for messages, validates channel references, and checks for malformed requests to ensure reliable operation.
Development
Development scripts include starting, watching, and building the server to production readiness. Use the provided commands to run or develop the MCP locally.
Project structure
Slack MCP server layout includes a TypeScript source, types definitions, and build artifacts. You will work with the main entry in src/index.ts and type definitions in types/slack.ts.
Error handling and troubleshooting notes
If you encounter invalid URLs, token errors, network failures, Slack API responses, or message length issues, verify your configuration, re-authenticate tokens if needed, and check that the channel references (name or ID) match your workspace setup.
Notes on security and usage
Keep your Slack credentials secure. Do not expose webhook URLs or bot tokens in public configs. Use environment-based or secret management where possible and rotate credentials if exposure is suspected.
Available tools
post_slack_message
Post a message to Slack using either webhook or bot mode, with optional overrides for channel, username, and icon.