Claude Code Notification Hooks
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Claude Code Notification Hookssend a test success notification to check the sound"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🔔 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
Related MCP server: Suzu (鈴) - Claude Code Notification Server
🚀 Quick Start
Method 1: One-Command Setup (Recommended)
Run this in Claude Code:
cd /path/to/ccnotify && npm run setup-hooksMethod 2: Manual Setup
Clone and build:
git clone <this-repository>
cd ccnotify
npm install && npm run buildRun setup:
npm run setup-hooksRestart 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 |
| Task completion, success | Glass |
| Errors, failures | Basso |
| Warnings, attention needed | Sosumi |
| Information, status updates | Blow |
| Progress updates, ongoing work | Tink |
| Reminders, prompts | Ping |
| System default notification sound | - |
| 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
osascriptand system soundsWindows/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 scriptPlatform Support
macOS: Full native support with
osascriptand system soundsWindows/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
Available Tools
4 toolsauto_notify_if_appropriateA
SMART AUTO-NOTIFICATION: Intelligently analyze context and automatically send appropriate notifications. Claude should use this proactively for: task completion detection, error analysis, user action evaluation, progress updates. This is the primary notification tool - use it frequently to keep users informed.
| Name | Required | Description | Default |
|---|---|---|---|
| context | Yes | Current context or situation that might require notification | |
| todos_completed | No | Whether all planned todos are completed | |
| error_occurred | No | Whether an error has occurred | |
| permission_required | No | Whether user permission is required for an action | |
| error_details | No | Details about the error if error_occurred is true | |
| permission_details | No | Details about the permission required if permission_required is true |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It describes the tool's proactive, intelligent behavior and general use cases, but lacks details on how notifications are sent (e.g., format, channels), what 'appropriate' means, or any constraints like rate limits or authentication needs. The description adds some behavioral context but leaves key operational aspects unspecified.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, starting with the core purpose. Both sentences earn their place: the first defines the tool, and the second provides usage guidance. However, the all-caps 'SMART AUTO-NOTIFICATION' is slightly verbose, and the structure could be tighter by integrating the usage examples more seamlessly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (6 parameters, no annotations, no output schema), the description is moderately complete. It covers purpose and usage well but lacks details on behavioral traits, output format, or how parameters interact. For a tool with multiple siblings and no structured safety hints, more context on when to choose this over specific tools would enhance completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all 6 parameters. The description doesn't add any parameter-specific semantics beyond what's in the schema (e.g., it doesn't explain how 'context' relates to 'todos_completed' or 'error_occurred'). With high schema coverage, the baseline is 3, and the description doesn't compensate with additional insights.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Intelligently analyze context and automatically send appropriate notifications.' It specifies the verb ('analyze' and 'send') and resource ('notifications'), and distinguishes it from siblings by calling it the 'primary notification tool.' However, it doesn't fully differentiate the 'smart auto-notification' mechanism from the more specific sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidelines: 'Claude should use this proactively for: task completion detection, error analysis, user action evaluation, progress updates.' It also states 'This is the primary notification tool - use it frequently to keep users informed,' which clearly positions it against the more specific sibling tools (send_error_notification, send_task_complete_notification, send_user_action_needed_notification).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_error_notificationA
AUTOMATICALLY send error notifications with error sound when anything fails. Claude must proactively use this when: compilation fails, tests fail, file operations fail, network requests fail, validation errors occur, bash commands fail. Critical for error awareness - always notify on failures.
| Name | Required | Description | Default |
|---|---|---|---|
| error | Yes | Description of the error | |
| details | No | Optional additional error details |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: the tool triggers automatically ('AUTOMATICALLY'), includes an auditory component ('error sound'), and is proactive ('Claude must proactively use this'). However, it doesn't mention potential side effects like rate limits, permissions needed, or whether notifications are logged or displayed in a specific interface.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, with the core purpose stated first. However, the list of failure scenarios could be slightly more concise, and the final sentence ('Critical for error awareness - always notify on failures.') reiterates rather than adds new information, slightly reducing efficiency.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is largely complete. It covers purpose, usage guidelines, and behavioral context well. The main gap is the lack of output information (since no output schema exists), but for a notification tool, the description's focus on triggering behavior is sufficient for most agent needs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters ('error' and 'details') with their types and constraints. The description doesn't add any parameter-specific information beyond what's in the schema, such as formatting examples or semantic nuances. The baseline of 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'AUTOMATICALLY send error notifications with error sound when anything fails.' It specifies the verb ('send'), resource ('error notifications'), and includes the distinctive feature of an 'error sound.' It distinguishes from siblings by focusing specifically on error scenarios rather than task completion or user action notifications.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit, comprehensive guidance on when to use this tool: 'Claude must proactively use this when: compilation fails, tests fail, file operations fail, network requests fail, validation errors occur, bash commands fail.' It includes a clear directive ('always notify on failures') and distinguishes from siblings by specifying error contexts rather than success or user-interaction scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_task_complete_notificationA
AUTOMATICALLY send success notifications when any significant task completes successfully. Claude should proactively use this for: builds finishing, tests passing, file operations completing, refactoring done, analysis complete, long operations finishing. Always notify users of completion for better UX.
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | Description of the completed task | |
| details | No | Optional additional details about the completion |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses the tool's proactive/automatic nature ('AUTOMATICALLY send', 'Claude should proactively use') which is valuable behavioral context. However, it doesn't mention delivery method, permissions needed, rate limits, or what happens if the notification fails - significant gaps for a notification tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded with the core purpose. Every sentence adds value: first states purpose, second provides usage examples, third gives UX rationale. However, the second sentence is somewhat long with multiple examples, slightly reducing readability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a notification tool with no annotations and no output schema, the description provides good purpose and usage context but lacks important behavioral details. It doesn't explain what 'success notifications' look like, where they're sent, or what the tool returns. The examples help but don't fully compensate for missing structural information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema. It implies the 'task' parameter should describe significant completions, but this is already covered by the schema's description field.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('send success notifications') and resources ('when any significant task completes successfully'). It distinguishes from siblings by focusing on success notifications rather than errors or user actions, and provides concrete examples (builds, tests, file operations) that clarify scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidelines: 'Claude should proactively use this for' lists specific scenarios (builds finishing, tests passing, etc.), and 'Always notify users of completion for better UX' gives a clear when-to-use principle. It implicitly distinguishes from siblings by focusing on success scenarios rather than errors or user actions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_user_action_needed_notificationA
AUTOMATICALLY send urgent notifications when user input, decision, or immediate attention is required. Claude should proactively use this for: file conflicts, permission requests, critical errors requiring user choice, or when waiting for user response before proceeding. Essential for good UX - notify users immediately when blocked.
| Name | Required | Description | Default |
|---|---|---|---|
| action_needed | Yes | What action the user needs to take | |
| context | No | Context or reason why user action is needed | |
| urgency | No | Urgency level of the required action | medium |
| timeout | No | How long to display the notification (seconds) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's proactive, urgent nature and UX importance, but lacks details on delivery mechanism (e.g., how notifications appear), user response handling, or potential side effects. The description doesn't contradict annotations (none exist), but could provide more operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, starting with the core purpose and immediately following with usage guidelines. Every sentence adds value, though the final sentence about UX could be integrated more seamlessly. It avoids redundancy and maintains a clear, directive tone throughout.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a notification tool with no annotations and no output schema, the description provides strong context about when and why to use it, supported by concrete examples. It covers the tool's proactive nature and urgency well, though could benefit from more detail about notification behavior or response handling to be fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, providing good documentation for all parameters. The description doesn't add specific parameter semantics beyond what's in the schema, but contextually reinforces the purpose of 'action_needed' and 'urgency' through examples. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't significantly enhance parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('send urgent notifications') and resources ('when user input, decision, or immediate attention is required'), distinguishing it from siblings by emphasizing urgency and proactive use for user-blocking scenarios. It explicitly mentions use cases like file conflicts and permission requests, making the purpose highly specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool ('proactively use this for: file conflicts, permission requests, critical errors requiring user choice, or when waiting for user response before proceeding') and why ('Essential for good UX - notify users immediately when blocked'). It implicitly distinguishes from siblings by focusing on urgent, action-required scenarios rather than general notifications or errors.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.0- First observed
auto_notify_if_appropriate - First observed
send_error_notification - First observed
send_task_complete_notification - First observed
send_user_action_needed_notification
TDQS
The tools have overlapping purposes despite different names, as all are notification tools with specific triggers. The descriptions help differentiate contexts (errors, task completion, user actions, general auto-notification), but the boundaries are somewhat fuzzy, especially between auto_notify_if_appropriate and the more specific tools. An agent might struggle to choose between them in ambiguous situations.
The naming follows a consistent verb_noun pattern (e.g., send_error_notification, send_task_complete_notification), with all tools using snake_case. The only deviation is auto_notify_if_appropriate, which uses a slightly different verb style ('auto_notify' vs. 'send'), but overall, the naming is predictable and readable.
With 4 tools, the count is well-scoped for a notification server. Each tool serves a distinct notification type (errors, task completion, user actions, general auto-notification), and there are no unnecessary redundancies. This number allows for focused coverage without being overwhelming or too sparse.
The tool set comprehensively covers the notification domain for code-related contexts. It includes notifications for errors, task completions, user actions, and general auto-notification, ensuring no gaps in common scenarios like failures, successes, or required interactions. This provides a complete lifecycle of notification needs without dead ends.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Share context and questions between Claude instances — VS Code, claude.ai web, and mobile.
Monitoring + status pages set up by talking to Claude. Auto-detects 30+ SDKs and your URLs.
- BleepOAuthcom.usebleep
Create Tasks and run Workflows in Bleep from Claude, ChatGPT, and other AI assistants.
Related MCP Servers
- FlicenseCqualityDmaintenanceSends system notifications when AI completes responses in MCP-compatible code editors, with cross-platform support for macOS, Windows, and Linux including customizable titles, messages, icons, and sound effects.2-
- AlicenseBqualityDmaintenancePlays Spotify tracks or system sounds as notifications when Claude Code completes tasks, with desktop notifications and cross-platform support for macOS, Linux, and Windows.8151MIT
- AlicenseBqualityDmaintenancePlays sound effects (completion, newtype, and error sounds) in response to various situations like task completion, insights, or errors. Integrates with Claude Desktop to provide audio feedback for improved workflow efficiency and entertainment.2196MIT
- AlicenseBqualityDmaintenanceEnables AI development tools on Windows to send native system notifications for task completion, errors, and reminders, with customizable icons and sounds.7177MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/nkyy/claude-code-notify-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server