通知MCP服务器

允许Claude Desktop或其他MCP客户端通过以下方式触发macOS声音和视觉通知的MCP服务器 task_status 工具。
当前状态
这是一个以macOS为中心的实用程序。它本身并不是一个自动的克劳德完成检测器:MCP客户端或模型必须调用 task_status 当它需要通知时,可以使用该工具。
推荐的配置文件操作:保持专注的实用程序仓库。建议主题: mcp, claude, claude-desktop, macos, notifications, python.
今天什么有效
- 注册a
task_statusMCP工具。 - 播放macOS系统声音
afplay. - 使用终端通知器、AppleScript、PyObjC或pync回退发送视觉通知。
- 支持单独的开始和完成声音。
- 支持通过环境变量禁用视觉通知。
- 包括模块化通知和声音管理器的测试。
重要限制
- macOS是唯一实现的平台。
- Linux和Windows支持尚未实现。
- 通知仅在调用MCP工具时发生。
- 打包的控制台脚本是
claude-notifications. - Python包是
notifications;没有notifications_mcp_server模块入口点。 - 自定义声音配置使用环境变量,而不是旧README版本显示的JSON配置块。
安装
pip install notifications-mcp-server可选的视觉通知依赖关系:
pip install "notifications-mcp-server[visual]"
pip install "notifications-mcp-server[pync]"对于终端通知器回退支持:
brew install terminal-notifierClaude桌面配置
使用软件包安装的控制台脚本:
{
"mcpServers": {
"notifications": {
"command": "claude-notifications"
}
}
}更改配置后重新启动Claude Desktop。
配置
环境变量:
export CLAUDE_START_SOUND="/System/Library/Sounds/Glass.aiff"
export CLAUDE_COMPLETE_SOUND="/System/Library/Sounds/Hero.aiff"
export CLAUDE_VISUAL_NOTIFICATIONS="true"
export CLAUDE_NOTIFICATION_ICON="/path/to/icon.png"如果没有设置自定义声音,服务器将使用macOS系统声音。
MCP工具
task_status
输入:
{
"message": "Task completed"
}包含以下内容的邮件 start 或 processing 被视为开始通知。其他消息被视为完成通知。
发展
git clone https://github.com/charles-adedotun/notifications-mcp-server.git
cd notifications-mcp-server
pip install -e ".[dev]"
pytest许可证
麻省理工学院
