Skip to main content
Glama

notify_me_mcp

notify_me_mcp

TypeScript MCP server for sending notifications to Discord and/or Slack webhooks

License: MIT Node.js Version TypeScript

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

  1. Clone the repository

    git clone https://github.com/thesammykins/notifyme_mcp.git cd notifyme_mcp
  2. Install dependencies

    npm install
  3. Configure webhooks

    cp .env.example .env # Edit .env and replace webhook placeholders
  4. Build the project

    npm run build

Configuration

Create a .env file with your webhook URLs:

# Discord webhook URL (optional) DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKEN" # Slack webhook URL (optional) SLACK_WEBHOOK_URL="https://hooks.slack.com/services/T00/B00/XXXX" # Optional: Custom .env file location # NOTIFY_ME_ENV_FILE="/path/to/custom/.env" # NOTIFY_ME_ENV_DIR="/path/to/directory"

Getting Webhook URLs:

Discord:

  1. Go to Server Settings โ†’ Integrations โ†’ Webhooks

  2. Click "Create Webhook" โ†’ Copy webhook URL

Slack:

  1. Create a Slack app at https://api.slack.com/apps

  2. Enable "Incoming Webhooks" โ†’ Add to workspace

  3. Copy the webhook URL

๐Ÿ”ง Usage with MCP Clients

Claude Desktop Configuration

Add to your Claude Desktop claude_desktop_config.json:

{ "mcpServers": { "notify_me_mcp": { "command": "node", "args": ["path/to/notifyme_mcp/dist/index.js"], "env": { "DISCORD_WEBHOOK_URL": "your_discord_webhook_url", "SLACK_WEBHOOK_URL": "your_slack_webhook_url" } } } }

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 message

  • service (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 username

  • avatar_url (string, optional): Override avatar/icon URL

  • tts (boolean, optional): Enable text-to-speech (Discord only)

Examples:

// Simple notification {"message": "Task completed successfully โœ…"} // Target specific service {"message": "Deploy finished", "service": "slack", "username": "CI Bot"} // Discord embed { "service": "discord", "embed_json": { "title": "Build Status", "description": "All tests passed", "color": 65280 } } // Slack blocks { "service": "slack", "embed_json": [ { "type": "section", "text": { "type": "mrkdwn", "text": "*Deploy Complete* ๐Ÿš€\nAll systems operational" } } ] }

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 โ†’ 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:

{ "title": "Deployment Status", "description": "Production deployment completed", "color": 65280, "fields": [ {"name": "Version", "value": "v1.2.3", "inline": true}, {"name": "Duration", "value": "3m 42s", "inline": true} ], "timestamp": "2024-01-15T10:30:00.000Z" }

Slack Blocks & Attachments

Supports Slack's block kit and legacy attachments:

// Blocks (recommended) [ { "type": "section", "text": { "type": "mrkdwn", "text": "*Deployment Complete* ๐Ÿš€\nVersion v1.2.3 deployed successfully" } } ] // Attachments (legacy) { "attachments": [ { "color": "good", "title": "โœ… Success", "text": "All tests passed", "fields": [ {"title": "Environment", "value": "Production", "short": true} ] } ] }

๐Ÿ“Š 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

npm run dev # Uses tsx with watch mode

Build

npm run build # Compiles TypeScript to dist/

Start Production Server

npm start # Runs compiled JavaScript

Testing

npm test # Run tests once npm run test:watch # Run tests in watch mode

๐Ÿ“ Project Structure

notify_me_mcp/ โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ index.ts # MCP server entry point โ”‚ โ”œโ”€โ”€ config.ts # Environment loading & service detection โ”‚ โ”œโ”€โ”€ payload.ts # Discord/Slack payload builders โ”‚ โ”œโ”€โ”€ senders.ts # HTTP senders with retry logic โ”‚ โ”œโ”€โ”€ logger.ts # Secure logging with redaction โ”‚ โ”œโ”€โ”€ types.ts # TypeScript interfaces & Zod schemas โ”‚ โ””โ”€โ”€ utils.ts # Helper functions โ”œโ”€โ”€ dist/ # Compiled JavaScript โ”œโ”€โ”€ .env.example # Environment template โ”œโ”€โ”€ package.json # Node.js configuration โ”œโ”€โ”€ tsconfig.json # TypeScript configuration โ””โ”€โ”€ README.md # This file

๐Ÿ”ง 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:

DEBUG=* npm start

๐Ÿค Contributing

  1. Fork the repository

  2. Create a feature branch: git checkout -b feature/my-feature

  3. Make your changes

  4. Build and test: npm run build && npm test

  5. Commit your changes: git commit -am 'Add some feature'

  6. Push to the branch: git push origin feature/my-feature

  7. Submit a pull request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ”— Related Projects

๐Ÿ™‹โ€โ™‚๏ธ 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

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    Enables interaction with Slack workspaces as a user, supporting channel listing, message posting, threading, reactions, and user management via the Slack API.
    Last updated -
    8
    MIT License
  • A
    security
    A
    license
    A
    quality
    Enables sending messages to webhook endpoints through the MCP protocol, supporting custom content, display names, and avatar URLs.
    Last updated -
    42
    23
    MIT License
  • -
    security
    F
    license
    -
    quality
    A 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 -
  • -
    security
    F
    license
    -
    quality
    Enables comprehensive Slack workspace automation and management through the Slack API. Supports messaging, channel management, analytics, file uploads, polls, user management, and advanced features like scheduled messages and bulk operations.
    Last updated -
    5,441

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thesammykins/notifyme_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server