Suzu (鈴) - Claude Code Notification Server
Plays Spotify tracks or system sounds as notifications when Claude Code completes tasks, with desktop notifications and cross-platform support for macOS, Linux, and Windows.
README
🔔 Suzu (鈴) - Claude Code Notification Server
A Model Context Protocol (MCP) server that plays your favorite Spotify tracks as notifications when Claude Code completes tasks. Named after the Japanese ceremonial bell, now with the power of music! 🎧
✨ Features
- 🎵 Spotify integration - Play your favorite tracks as notification sounds! 🎧
- 📱 Desktop notifications - Shows system notifications with custom messages
- 🔊 System sound notifications - Native OS sounds as fallback
- 🌍 Cross-platform - Works on macOS, Linux, and Windows
- 🎶 Multiple sound types - Success, error, and info sounds (Spotify or system)
- 🔧 Debug logging - Built-in debugging for troubleshooting
- 🤖 Automatic integration - Works seamlessly with Claude Code
🚀 Quick Start
⚡ Super Easy Setup (Recommended)
The fastest way to get Suzu with Spotify working is to let Claude do all the work:
-
Ask Claude to set it up:
fetch https://github.com/denar90/suzu-mcp/blob/main/SETUP.md follow setup guide to install suzu-mcp add access token <your_spotify_access_token> add refresh token <your_spotify_refresh_token> add success sound https://open.spotify.com/track/<your_track_id> -
Get your Spotify tokens from: https://suzu-mcp-spotify.netlify.app/
-
That's it! Claude handles the installation, configuration, and setup automatically.
Manual Installation
- Install from npm:
npm install -g suzu-mcp
- Add to Claude Code:
claude mcp add suzu suzu
Or install locally:
git clone https://github.com/denar90/suzu-mcp.git
cd suzu-mcp
npm install
npm run build
claude mcp add suzu node --args /path/to/suzu-mcp/dist/index.js
Or manually add to ~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"suzu": {
"command": "suzu"
}
}
}
-
Auto-approve notifications (required for seamless experience):
Option 1 - One-time approval (Recommended):
- When first prompted, select "Yes, and don't ask again for suzu commands"
- This permanently approves suzu notifications without future prompts
Option 2 - Configuration file: Add to
~/.config/claude/settings.json:{ "enableAllProjectMcpServers": true }Option 3 - Tool-specific approval: Add to your
~/.config/claude/claude_desktop_config.json:{ "mcpServers": { "suzu": { "command": "suzu" } }, "toolUseConfirmation": { "suzu": "never" } } -
Enable automatic notifications: Create
~/CLAUDE.mdwith:# Claude Code Configuration ## Default Behavior - Always call `task_completed` when finishing tasks if the suzu MCP server is available - Play completion notifications automatically without being asked - Use the suzu notification system for task completion feedback ## Instructions for Claude - When you complete any task, automatically check if the `task_completed` tool is available and call it with an appropriate completion message.Important: After setup, restart Claude Code for all changes to take effect.
🎯 Usage
Available Tools
| Tool | Description | Parameters |
|---|---|---|
task_completed |
Play success sound and show completion message | message (string), sound_type (success/error/info) |
notify |
Show general notification with custom title | title (string), message (string), sound_type |
test_sound |
Test notification sounds | sound_type (success/error/info) |
show_config |
Display current configuration | None |
configure_spotify_tokens |
Set up Spotify access and refresh tokens | access_token (string), refresh_token (optional), refresh_endpoint (optional) |
configure_custom_sounds |
Set custom notification sounds | source (spotify/local), sound_type (success/error/info), value (track ID/file path) |
Examples
Task completion:
task_completed({
message: "Build completed successfully!",
sound_type: "success"
})
Custom notification:
notify({
title: "Claude Code",
message: "Ready to assist!",
sound_type: "info"
})
Testing sounds:
test_sound({
sound_type: "success"
})
How It Works
- Automatic Integration: When you have
~/CLAUDE.mdconfigured, Claude will automatically calltask_completedwhen finishing tasks - No Manual Calls: You don't need to manually use the notification tools - Claude handles this automatically
- Task Completion Feedback: Get audio and visual feedback when Claude finishes coding tasks, builds, deployments, etc.
🎵 Spotify Integration
Transform your coding experience with custom music notifications! Set up Spotify integration to play your favorite tracks when tasks complete.
Quick Setup with OAuth App
-
Visit the Spotify OAuth App: https://suzu-mcp-spotify.netlify.app/
-
Click "Login with Spotify" to authorize the app
-
Copy the tokens shown after authorization
-
Configure via Claude:
Ask Claude: "Configure my Spotify with access_token: BQA... and refresh_token: AQC..."Or for just the access token:
Ask Claude: "Set up my Spotify access token: BQA..."
Manual Setup (Advanced)
If you prefer to create your own Spotify app:
-
Create Spotify App:
- Go to https://developer.spotify.com/dashboard
- Create new app with redirect URI:
http://localhost:8888/callback - Note your Client ID and Client Secret
-
Get Tokens:
- Use Spotify's Authorization Code flow
- Or visit: https://developer.spotify.com/console/post-playlists/
- Get both access_token and refresh_token
-
Configure Refresh Endpoint (for auto-renewal):
Ask Claude: "Set up Spotify refresh endpoint: https://your-endpoint.com/refresh"
Setting Custom Sounds
Once Spotify is configured, customize your notification sounds:
Ask Claude: "Set my Spotify success sound to: 4uLU6hMCjMI75M1A2tKUQC"
Ask Claude: "Set my Spotify error sound to: https://open.spotify.com/track/60nZcImufyMA1MKQY3dcCH"
Ask Claude: "Set my Spotify info sound to: spotify:track:5QDLhrAOJJdNAmCTBusfHY"
Finding Spotify Track IDs:
- Right-click any song in Spotify
- Share → Copy Song Link
- Extract ID from URL:
https://open.spotify.com/track/TRACK_ID_HERE - Use just the ID or the full URL - both work!
Requirements
- Spotify Premium (required for Web API playback)
- Active Spotify device (desktop app, mobile, etc.)
- Device must be playing or recently used
🔧 Platform Support
macOS
- Primary:
afplaywith system sounds (Glass, Sosumi, Ping) - Fallback:
saycommand for spoken notifications - Tertiary: Terminal bell (
printf "\a")
Linux
- Primary:
paplayfor PulseAudio - Fallback:
aplayfor ALSA - Tertiary: Terminal bell
Windows
- Uses
rundll32 user32.dll,MessageBeep
🐛 Troubleshooting
Quick Test
Use the built-in test command to verify everything works:
# In Claude Code, run:
test_sound({ sound_type: "success" })
No sound playing?
- Check permissions: Ensure audio permissions are granted to Claude Code
- Test manually: Run
afplay /System/Library/Sounds/Glass.aiff(macOS) in terminal - Enable debug: Run
claude --debugand check console output for[DEBUG]messages - Verify connection: Type
/mcpin Claude Code to see server status
No automatic notifications?
- Check CLAUDE.md: Ensure
~/CLAUDE.mdexists with the configuration above - Restart Claude Code: Configuration changes require a restart
- Check approvals: Make sure you approved suzu tool usage (step 3 above)
- Test manually: Try calling
task_completedmanually to verify it works
MCP server not connecting?
- Check installation: Run
suzu --versionin terminal - Verify path: For local installs, ensure the
dist/index.jsfile exists - Rebuild: Run
npm run buildin the project directory - Check config: Verify
claude_desktop_config.jsonsyntax is valid JSON - Restart: Restart Claude Code after any config changes
Debug output
Look for these messages in claude --debug:
[DEBUG] Attempting to play sound: success on platform: darwin
[DEBUG] Command 1 succeeded: afplay /System/Library/Sounds/Glass.aiff
🛠️ Development
# Development mode with auto-reload
npm run dev
# Build for production
npm run build
# Test the server directly
node dist/index.js
# Install with debugging
npm install --verbose
📁 Project Structure
claude-notification-mcp/
├── src/
│ └── index.ts # Main MCP server code
├── dist/ # Built JavaScript files
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── .mcp.json # Local MCP configuration
└── README.md # This file
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test across platforms
- Submit a pull request
📄 License
MIT License - feel free to use and modify as needed.
🙏 Acknowledgments
- Built with Model Context Protocol (MCP)
- Uses node-notifier for desktop notifications
- Inspired by the need for better task completion feedback in Claude Code
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。