Claude Code Notification
Sends notifications from Claude Code with customizable sounds and cross-platform support.
š Claude Code Notification Hooks
ā ļø DEPRECATED: This project has been superseded by cat-ccnotify-hook. Please use the new standalone package for better performance and easier installation.
Enhanced Claude Code experience with automatic desktop notifications and contextual sounds for all events. No manual notification calls needed - works automatically with all Claude Code operations!
⨠Features
- š Automatic Notifications: Intercepts ALL Claude Code notifications and enhances them
- šµ Contextual Sounds: Different sounds for success, error, warning, and other event types
- š Zero Configuration: Automatic detection and enhancement of notification types
- š Smart Sound Mapping: Intelligent analysis of notification content for appropriate sounds
- š±ļø Native System Integration: Uses macOS/Windows/Linux native notification systems
š Quick Start
Method 1: One-Command Setup (Recommended)
Run this in Claude Code:
cd /path/to/ccnotify && npm run setup-hooks
Method 2: Manual Setup
- Clone and build:
git clone <this-repository>
cd ccnotify
npm install && npm run build
- Run setup:
npm run setup-hooks
- Restart Claude Code if it's currently running
3. That's It!
All Claude Code notifications will now automatically have enhanced sounds and styling. No additional configuration needed!
š± How It Works
The notification hook automatically detects and enhances all Claude Code notifications:
Automatic Sound Assignment
- ā Success/Completion ā Glass sound (macOS)
- šØ Errors/Failures ā Basso sound (macOS)
- ā ļø Warnings/Attention ā Sosumi sound (macOS)
- š” Info/Updates ā Blow sound (macOS)
- ā³ Progress/Ongoing ā Tink sound (macOS)
Examples in Action
# Building a project
npm run build
# ā Automatic success notification with Glass sound when complete
# ā Automatic error notification with Basso sound if failed
# Running tests
npm test
# ā Automatic progress notification with Tink sound while running
# ā Automatic completion notification when finished
# Git operations
git push origin main
# ā Automatic notifications for each step with appropriate sounds
šµ Available Sounds
| Sound | Use Case | macOS Sound |
|---|---|---|
success | Task completion, success | Glass |
error | Errors, failures | Basso |
warning | Warnings, attention needed | Sosumi |
info | Information, status updates | Blow |
progress | Progress updates, ongoing work | Tink |
reminder | Reminders, prompts | Ping |
default | System default notification sound | - |
silent | No sound | - |
š ļø Advanced Configuration
Customizing Sound Mappings
Edit the hook script at hooks/notification-hook.js to customize sound mappings:
// Example: Add custom sound rules
const customSoundRules = [
{ pattern: /deployment/i, sound: 'Ping' },
{ pattern: /security/i, sound: 'Funk' },
{ pattern: /backup/i, sound: 'Purr' }
];
Troubleshooting
Hook not working?
# Check if hook is properly installed
cat ~/.config/claude-code/settings.json | grep -A 10 "hooks"
# Verify hook script is executable
ls -la hooks/notification-hook.js
# Re-run setup if needed
npm run setup-hooks
Sounds not playing?
# Test system sound (macOS)
afplay /System/Library/Sounds/Glass.aiff
# Check notification permissions in System Preferences
š Real-World Examples
Automatic Enhancement Examples
Claude Code Operations ā Enhanced Notifications
# File operations
"Create a new React component"
ā ā
"Component created successfully" + Glass sound
# Build processes
"Run the build process"
ā ā³ "Build in progress..." + Tink sound
ā ā
"Build completed successfully" + Glass sound
# Error scenarios
"Fix the TypeScript errors"
ā šØ "3 type errors found" + Basso sound
# Git operations
"Commit these changes"
ā ā
"Changes committed successfully" + Glass sound
š§ Development
Development Commands
npm run dev # Development mode with auto-reload
npm run build # Production build
npm start # Start production server
Platform Support
- macOS: Full native support with
osascriptand system sounds - Windows/Linux: Cross-platform support via
node-notifierpackage
Architecture
- Type-safe TypeScript implementation
- MCP (Model Context Protocol) compliant
- Automatic platform-specific implementation switching
- Extensible notification type system
š Technical Details
Hook Architecture
The notification hook intercepts Claude Code's notification system and enhances it:
- Interception: Hook receives all notification calls from Claude Code
- Analysis: Analyzes notification content using pattern matching
- Enhancement: Adds appropriate sounds and styling based on content
- Native Integration: Uses platform-specific notification APIs
Installation Structure
~/.config/claude-code/settings.json # Claude Code configuration
hooks/notification-hook.js # Main hook script
dist/index.js # Built MCP server (optional)
scripts/setup-hooks.js # Automated setup script
Platform Support
- macOS: Full native support with
osascriptand system sounds - Windows/Linux: Cross-platform support via
node-notifierpackage
Legacy MCP Server (Optional)
For advanced users who want manual notification control, the MCP server is still available:
{
"mcpServers": {
"ccnotify": {
"command": "node",
"args": ["/absolute/path/to/ccnotify/dist/index.js"]
}
}
}
š¤ Contributing
Bug reports and feature requests are welcome! Please open an issue.
š License
MIT License
Server Terkait
The Colony
Remote MCP server for The Colony ā a social network for AI agents (400+ agents, 3,800+ posts). 15 tools including search / post / comment / vote / react / DM / notifications, 5 resources (incl. a one-call polling diff), 2 resource templates, 3 prompts. Streamable HTTP, JWT Bearer auth.
Twilio Manager MCP
Manage Twilio resources such as subaccounts, phone numbers, and regulatory bundles using the Twilio API.
Wizzypedia MCP Server
Interact with Wizzypedia through the MediaWiki API, supporting both read-only and authenticated operations.
ssyubix-agentlink
ssyubix is an open source MCP project for cross-device communication between AI agents over the public internet.
MCP-Typebot
Integrates Typebot's REST API as callable tools, allowing interaction with Typebot forms and chats.
Telegram Notifier (Botfather)
Use botfather bot to notify yourself on Telegram.
Discord MCP Server
Interact with Discord channels to send and read messages using the Discord API.
interactive-mcp
Enables interactive LLM workflows by adding local user prompts and chat capabilities directly into the MCP loop.
thanks.io MCP Server
Send real handwritten mail (postcards, letters, notecards) from any AI agent via thanks.io's API.
Slack
An MCP server for interacting with the Slack API, allowing for sending messages, managing channels, and other workspace actions.