slack-notify-mcp
Slack Webhook
Documentation
Slack Webhook MCP Server
A Model Context Protocol (MCP) server for posting messages to Slack via webhooks or bot tokens.
Features
- Two modes of operation: Webhooks or Bot API
- Post messages to Slack channels
- Support for channel overrides
- Configurable bot username and emoji
- Slack-specific mention support (``, ``, ``)
- Comprehensive error handling and validation
Installation
bun installSetup
Option 1: Webhook Mode (Simple)
1. Create a Slack App and Webhook:
2. Configure MCP Client:
{
"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"
}
}
}Option 2: Bot Token Mode (Advanced)
1. Create a Slack App with Bot Token:
2. Get Channel IDs:
3. Configure MCP Client:
{
"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"
}
}
}Usage
Command Line Arguments
Webhook Mode:
- `--webhook-url ` - Slack webhook URL (required)
- `--channel ` - Default channel name (optional, e.g., "#general")
Bot Mode:
- `--bot-token ` - Slack bot token (required, starts with `xoxb-`)
- `--channel ` - Default channel ID (required, e.g., "CXXXXXXXXXX")
Common Options:
- `--username ` - Default bot username (optional)
- `--icon-emoji ` - Default bot emoji (optional, e.g., ":robot_face:")
- `--help` - Show help message
Examples
Webhook Mode:
bun run src/index.ts \
--webhook-url "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX" \
--channel "#general" \
--username "Assistant"Bot Mode:
bun run src/index.ts \
--bot-token "xoxb-YOUR-BOT-TOKEN" \
--channel "CXXXXXXXXXX" \
--username "Assistant"Available Tools
`post_slack_message`
Post a message to your configured Slack integration.
Parameters:
- `message` (required): The message content to send (max 4000 characters)
- `channel` (optional): Channel to post to (overrides default)
- Webhook mode: Channel name (e.g., "#random")
- Bot mode: Channel ID (e.g., "CXXXXXXXXXX")
- `username` (optional): Override the default username for this message
- `icon_emoji` (optional): Override the default emoji for this message
Example usage in MCP client:
Please post "Hello from MCP!" to the general channelMode Comparison
| Feature | Webhook Mode | Bot Mode |
|---|---|---|
| Setup | Simple | Requires OAuth setup |
| Channel Reference | Names (#general) | IDs (CXXXXXXXXXX) |
| Permissions | Limited to webhook channel | Configurable scopes |
| Rate Limits | Higher | Standard API limits |
| Features | Basic messaging | Full API access |
| Authentication | URL-based | Token-based |
Slack-Specific Features
Mentions
- User mention: ``
- Channel notification: ``
- Here notification: ``
Channel References
- Webhook mode: Use `#channel-name` format
- Bot mode: Use channel IDs like `CXXXXXXXXXX`
Development
Scripts
- `bun run start` - Start the server
- `bun run dev` - Start with file watching
- `bun run build` - Build for production
Project Structure
slack-webhook-mcp-server/
├── package.json # Dependencies and scripts
├── src/
│ └── index.ts # Main server implementation
├── types/
│ └── slack.ts # TypeScript types and schemas
└── README.md # This fileError Handling
The server includes comprehensive error handling for:
- Invalid webhook URLs and bot tokens
- Network connectivity issues
- Slack API errors (different handling for webhook vs bot)
- Message length validation (4000 char limit)
- Channel ID validation (bot mode)
- Malformed requests
License
MIT
Frequently asked questions
What is slack-notify-mcp?
slack-notify-mcp is Slack Webhook
How do I install slack-notify-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is slack-notify-mcp open source?
Yes — it is hosted on GitHub at https://github.com/SilasReinagel/slack-notify-mcp.
Related MCP tools
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server.
Enhanced MCP server for interactive user feedback and command execution in AI-assisted development, featuring dual interface support (Web UI and Desktop Application) with intelligent environment detection and cross-platform compatibility.
A powerful Zotero AI and MCP plugin with ChatGPT, Gemini 3.7, Claude Fable 5, Claude Opus 5, DeepSeek V4, Grok, OpenRouter, Kimi k3, GLM 5.3, SiliconFlow, GPT-oss, Gemma 4, Qwen 3.8
Connect your browser to AI models. Just use Dia on Chrome, Arc or Firefox.
文颜 MCP Server 可以让 AI 自动将 Markdown 文章排版后发布至微信公众号。
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP