notify_me_mcp
TypeScript MCP server for sending notifications to Discord and/or Slack webhooks
A powerful Model Context Protocol (MCP) server that provides webhook notification capabilities to AI agents and LLM applications. Send rich notifications to Discord and Slack with automatic service detection, retry logic, and comprehensive security features.
✨ Features
- 🔧 Three MCP Tools:
send_notification
,validate_webhook
,list_services
- 🎯 Multi-Service Support: Discord, Slack, or both simultaneously
- 🛡️ Security First: Webhook URLs never exposed in logs or process lists
- 📱 Rich Content: Discord embeds and Slack blocks/attachments support
- 🔄 Robust Retry Logic: Handles rate limiting with exponential backoff
- ⚡ Service Auto-Detection: Automatically selects available services
- 🔍 Input Validation: Comprehensive schema validation with Zod
- 📊 Structured Logging: Secure logging with automatic URL redaction
🚀 Quick Start
Prerequisites
- Node.js ≥ 23.7.0
- npm ≥ 10.9.2
- Discord and/or Slack webhook URLs
Installation
- Clone the repository
- Install dependencies
- Configure webhooks
- Build the project
Configuration
Create a .env
file with your webhook URLs:
Getting Webhook URLs:
Discord:
- Go to Server Settings → Integrations → Webhooks
- Click "Create Webhook" → Copy webhook URL
Slack:
- Create a Slack app at https://api.slack.com/apps
- Enable "Incoming Webhooks" → Add to workspace
- Copy the webhook URL
🔧 Usage with MCP Clients
Claude Desktop Configuration
Add to your Claude Desktop claude_desktop_config.json
:
Other MCP Clients
Use the built server at dist/index.js
with any MCP-compatible client over stdio transport.
🛠️ Available Tools
send_notification
Send notifications to Discord and/or Slack webhooks.
Parameters:
message
(string, optional): Plain text messageservice
(string, optional): "discord", "slack", or "both" (auto-detected if not specified)embed_json
(object/array/string, optional): Rich content (Discord embeds, Slack blocks)username
(string, optional): Override display usernameavatar_url
(string, optional): Override avatar/icon URLtts
(boolean, optional): Enable text-to-speech (Discord only)
Examples:
validate_webhook
Test webhook connectivity by sending a test message.
Parameters:
service
(string, optional): "discord", "slack", or "both"message
(string, optional): Custom test message
list_services
List configured webhook services and auto-detected default.
No parameters required.
🏗️ Service Auto-Detection
The server automatically detects which services to use:
- Only Discord configured →
discord
- Only Slack configured →
slack
- Both configured →
discord
(default for backward compatibility) - Use
service: "both"
→ Send to all configured services
🔒 Security Features
- Webhook Protection: URLs never appear in logs, errors, or process lists
- Secure Logging: Automatic redaction of sensitive information
- Input Validation: All inputs validated with Zod schemas
- Rate Limiting: Automatic retry on 429 responses with
Retry-After
support - Temporary Files: Created with restrictive permissions (077)
🎨 Rich Content Support
Discord Embeds
Supports Discord's native embed objects:
Slack Blocks & Attachments
Supports Slack's block kit and legacy attachments:
📊 Common Colors
Status | Discord (decimal) | Slack (hex/keyword) |
---|---|---|
Success | 65280 | #36a64f or good |
Error | 16711680 | #ff0000 or danger |
Warning | 16753920 | #ffa500 or warning |
Info | 3447003 | #3498db |
🧪 Development
Run in Development Mode
Build
Start Production Server
Testing
📁 Project Structure
🔧 Environment Variables
Variable | Description | Example |
---|---|---|
DISCORD_WEBHOOK_URL | Discord webhook URL | https://discord.com/api/webhooks/... |
SLACK_WEBHOOK_URL | Slack webhook URL | https://hooks.slack.com/services/... |
NOTIFY_ME_ENV_FILE | Custom .env file path | /path/to/.env |
NOTIFY_ME_ENV_DIR | Custom .env directory | /path/to/config |
🐛 Troubleshooting
Common Issues
"No webhook URLs configured"
- Ensure
.env
file exists with valid webhook URLs - Check environment variable names match exactly
"Discord message exceeds 2000 character limit"
- Discord has a 2000 character limit for message content
- Use embeds for longer content or split messages
"Invalid JSON in embed_json"
- Validate JSON syntax before sending
- Use proper escaping for quotes in JSON strings
Connection timeouts
- Check network connectivity to Discord/Slack APIs
- Verify webhook URLs are correct and active
Debug Mode
For troubleshooting, you can run with verbose logging:
🤝 Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature
- Make your changes
- Build and test:
npm run build && npm test
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin feature/my-feature
- Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Related Projects
- notify_me.sh - The original bash script that inspired this MCP server
- Model Context Protocol - Official MCP documentation
- Discord Webhooks - Discord webhook documentation
- Slack Webhooks - Slack incoming webhook documentation
🙋♂️ Support
- Issues: Report bugs and request features on GitHub Issues
- Documentation: Check this README and inline code comments
- MCP Protocol: Refer to MCP documentation for client setup
Built with ❤️ using TypeScript and the Model Context Protocol
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables sending rich notifications to Discord and/or Slack webhooks with automatic service detection, retry logic, and support for embeds, blocks, and attachments. Provides secure webhook management with comprehensive input validation and rate limiting.
Related MCP Servers
- AsecurityAlicenseAqualityEnables interaction with Slack workspaces as a user, supporting channel listing, message posting, threading, reactions, and user management via the Slack API.Last updated -88JavaScriptMIT License
- AsecurityAlicenseAqualityEnables sending messages to webhook endpoints through the MCP protocol, supporting custom content, display names, and avatar URLs.Last updated -162123JavaScriptMIT License
- -securityAlicense-qualityMCP server for posting messages to Slack channels via webhooks or bot API. Supports configurable usernames, emojis, and both webhook and bot token authentication modes.Last updated -6JavaScriptMIT License
- -securityFlicense-qualityA Message Control Protocol server that integrates with Slack to provide channel management, messaging capabilities, and log monitoring across multiple servers, enabling teams to share logs and receive automated alerts in Slack channels.Last updated -Python