kai-notify
v1.0.0
Published
A multi-channel notification hub for AI task completion alerts
Downloads
9
Maintainers
Readme
kai-notify
A stdio-based MCP (Managed Compute Platform) server that serves as a centralized notification system. It receives notifications from AI services via stdio communication and distributes them across multiple channels, currently supporting Slack and LINE Official Account (OA). The server operates without requiring network ports, making it suitable for local execution with multiple instances running simultaneously.
Features
- Stdio Protocol: Communicates via stdin/stdout using JSON-RPC 2.0 protocol for MCP compliance
- Multiple Modes: Operates in both MCP Server Mode and CLI Mode
- Multi-Channel Support: Send notifications to Slack and LINE
- Flexible Configuration: Supports multiple configuration file locations
- npx Support: Can be run directly with npx without installation
Installation
You don't need to install kai-notify. It can be run directly with npx:
npx kai-notifyConfiguration Priority
The system looks for configuration in this order:
.kai-notify.jsonin the current working directory~/.kai/notify.jsonin the user's home directoryconfig/config.jsonin the project directory (fallback)
Configuration File Format
Create a .kai-notify.json file in your working directory:
{
"channels": {
"slack": {
"enabled": true,
"botToken": "xoxb-your-token",
"webhookUrl": "https://hooks.slack.com/services/your/webhook",
"defaultChannel": "#general"
},
"line": {
"enabled": true,
"channelAccessToken": "your-channel-access-token",
"channelSecret": "your-channel-secret",
"defaultUserId": "user-id-to-send-to"
}
}
}Usage
MCP Server Mode (when stdin is piped)
echo '{"jsonrpc":"2.0","method":"notify","params":{"message":"Test"},"id":1}' | npx kai-notifyCLI Mode
# Send a notification
npx kai-notify --cli notify --message "Hello World" --channel line
# Check health
npx kai-notify --cli health
# View configuration
npx kai-notify --cli configCLI Options
--cli: Run in CLI mode--message: Notification message (for notify command)--title: Notification title (for notify command)--channel: Notification channel (for notify command)
Examples
# Send a notification to LINE
npx kai-notify --cli notify --message "Task completed successfully" --title "Notification" --channel line
# Send a notification to Slack
npx kai-notify --cli notify --message "Build finished" --channel slack
# Send notification without specifying channel (sends to all enabled channels)
npx kai-notify --cli notify --message "System alert"Benefits of Stdio Protocol
- No Network Ports Required: The server operates without occupying network ports, allowing multiple instances to run simultaneously
- Enhanced Security: Communication happens via stdio, eliminating network-based vulnerabilities
- MCP Compliance: Fully compatible with MCP standards using JSON-RPC protocol
- Resource Efficient: Lower overhead compared to HTTP-based servers
- Local Execution: Optimized for local execution environments
