This project is a spiritual successor to the original
mcp-server-notifier
by tuberrabbit@gmail.com, and has been significantly rewritten and is now maintained by zudsniper.
A lightweight notification service that integrates with MCP (Model Context Protocol) to send webhooks when AI agents complete tasks.
- Webhook Notifications: Receive alerts when your AI agents complete tasks
- Multiple Webhook Providers: Support for Discord, Slack, Microsoft Teams, Feishu, Ntfy, and custom webhooks
- Image Support: Include images in notifications via Imgur
- Multi-Project Support: Efficiently manage notifications across different projects
- Easy Integration: Simple setup with AI tools like Cursor
- Customizable Messages: Send personalized notifications with title, body, and links
- Discord Embed Support: Send rich, customizable Discord embed notifications
- NTFY Template Support: Use pre-defined templates for status, questions, progress, and problems.
- Discord Webhook Example: Now includes a sample Discord webhook config (
discord_webhook.json
) and test script (src/test-discord.js
) - ntfy Webhook Example: Includes a sample ntfy config (
ntfy-webhook.json
) and test script (src/test-ntfy.js
) - Improved Discord/NTFY Logic: Enhanced webhook handling and configuration types
npm install -g mcp-notifications
The Docker image name is not yet updated, but you can pull the latest version of the old image for now.
docker pull zudsniper/mcp-server-notifier:latest
# Run with environment variables
docker run -e WEBHOOK_URL=https://your-webhook-url -e WEBHOOK_TYPE=discord zudsniper/mcp-server-notifier
git clone https://github.com/zudsniper/mcp-server-notifier.git
cd mcp-server-notifier
npm install
npm run build
- Go to your 'Cursor Settings'
- Click
MCP
in the sidebar, then click+ Add new global MCP server
- Add
mcp-notifications
.
{
"mcpServers": {
"notifier": {
"command": "npx",
"args": [
"-y",
"mcp-notifications"
],
"env": {
"WEBHOOK_URL": "https://ntfy.sh/webhook-url-example",
"WEBHOOK_TYPE": "ntfy"
}
}
}
}
By default, the notifier supports several webhook types:
- Discord
- Slack
- Microsoft Teams
- Feishu
- Ntfy
- Generic JSON
You can specify the webhook type and URL through environment variables:
env WEBHOOK_URL="https://your-webhook-url" WEBHOOK_TYPE="discord" npx -y mcp-notifications
WEBHOOK_TOKEN
is an optional environment variable. When set, it will be included as a Bearer token in the Authorization
header only for ntfy webhook requests. If WEBHOOK_TOKEN
is not set, no Authorization header is sent.
- Basic Authentication is not supported.
- This token is ignored by all other webhook providers (Discord, Slack, Teams, Feishu, Generic JSON).
Example:
env WEBHOOK_URL="https://ntfy.sh/your-topic" WEBHOOK_TYPE="ntfy" WEBHOOK_TOKEN="your-secret-token" npx -y mcp-notifications
For more advanced configuration, you can create a webhook-config.json
file in your current directory or in ~/.config/mcp-notifier/webhook-config.json
:
{
"webhook": {
"type": "discord",
"url": "https://discord.com/api/webhooks/your-webhook-url",
"name": "My Notifier"
},
"imgur": {
"clientId": "your-imgur-client-id"
}
}
See the Configuration Guide for full details and examples.
For detailed usage instructions, see the Usage Guide.
This package provides two tools for sending notifications:
notify
- for simple notifications.full_notify
- for more advanced notifications with all features.
Send a simple notification with body, optional title, and optional template.
Input:
body
: The main content of the notification message.title
(optional): The title for the notification.template
(optional): A predefined template to use (e.g., 'status', 'question', 'progress', 'problem').
Example:
// AI agent call
await run("notify", {
title: "Task Completed",
body: "I have finished the task."
});
Send a detailed notification with advanced options like a link, image, priority, attachments, actions, and template data.
Input:
body
: The main content of the notification message.title
(optional): The title for the notification.link
(optional): A URL to include in the notification.imageUrl
(optional): The URL of an image to include.image
(optional): The local file path for an image to upload to Imgur.priority
(optional, ntfy only): Notification priority level from 1-5 (5 is the highest).attachments
(optional, ntfy only): A list of URLs to attach to the notification.template
(optional): A predefined template to use.templateData
(optional): Data to be used with the selected template.actions
(optional, ntfy only): Interactive action buttons for the notification.
Example:
// AI agent call
await run("full_notify", {
title: "Server Alert",
body: "Disk usage is high!",
priority: 5,
actions: [
{
action: "view",
label: "Open Grafana",
url: "https://grafana.example.com/d/abcdefg"
}
]
});
When using ntfy.sh as your webhook provider, you can use the following predefined templates with the template
and templateData
parameters:
status
: For sending status updates.question
: For asking questions.progress
: For tracking the progress of long-running tasks.problem
: For reporting errors or issues.
See docs/NOTIFICATIONS.md for more details on templates.
- Clone the repository:
git clone https://github.com/zudsniper/mcp-server-notifier.git
cd mcp-server-notifier
- Install dependencies:
npm install
- Build the project:
npm run build
- Run the MCP server in development mode:
# Install the MCP Inspector if you haven't already
npm install -g @modelcontextprotocol/inspector
# Start the server with the Inspector
npx @modelcontextprotocol/inspector node build/index.js
MIT License - see LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.