claude-code-notify-mcp
MCP server for sending notifications from Claude Code with customizable sounds
Documentation
🔔 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-hooksMethod 2: Manual Setup
1. Clone and build:
git clone
cd ccnotify
npm install && npm run build2. Run setup:
npm run setup-hooks3. 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-hooksSounds 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 serverPlatform Support
- macOS: Full native support with `osascript` and system sounds
- Windows/Linux: Cross-platform support via `node-notifier` package
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:
1. Interception: Hook receives all notification calls from Claude Code
2. Analysis: Analyzes notification content using pattern matching
3. Enhancement: Adds appropriate sounds and styling based on content
4. 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 scriptPlatform Support
- macOS: Full native support with `osascript` and system sounds
- Windows/Linux: Cross-platform support via `node-notifier` package
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
Frequently asked questions
What is claude-code-notify-mcp?
claude-code-notify-mcp is MCP server for sending notifications from Claude Code with customizable sounds
How do I install claude-code-notify-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is claude-code-notify-mcp open source?
Yes — it is hosted on GitHub at https://github.com/nkyy/claude-code-notify-mcp and has 3 stars.
Related MCP tools
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server.
Enhanced MCP server for interactive user feedback and command execution in AI-assisted development, featuring dual interface support (Web UI and Desktop Application) with intelligent environment detection and cross-platform compatibility.
A powerful Zotero AI and MCP plugin with ChatGPT, Gemini 3.7, Claude Fable 5, Claude Opus 5, DeepSeek V4, Grok, OpenRouter, Kimi k3, GLM 5.3, SiliconFlow, GPT-oss, Gemma 4, Qwen 3.8
Connect your browser to AI models. Just use Dia on Chrome, Arc or Firefox.
文颜 MCP Server 可以让 AI 自动将 Markdown 文章排版后发布至微信公众号。
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP