Claude Notification Server

Claude Notification Server

site icon
2025.03.20 1
Python通知服务macOS 工具交流协作
Claude Notification Server 是一个轻量级的 MCP 服务器,专为 macOS 上的 Claude Desktop 提供听觉和视觉通知。该服务器会在 Claude 开始处理请求和完成任务时通知用户。
View on GitHub

Overview

基本能力

产品定位

Claude Notification Server 是一个专为 macOS 设计的通知服务,旨在增强 Claude Desktop 的用户体验,通过声音和视觉提示让用户了解 Claude 的工作状态。

核心功能

  • 🔔 提供 Claude 响应开始和结束时的不同声音通知
  • 💻 兼容 macOS 原生系统声音(.aiff 文件)
  • 🎵 通过环境变量轻松自定义通知声音
  • 🔔 通过 macOS 通知中心提供视觉桌面通知
  • 🖼️ 支持自定义视觉通知图标
  • 🚀 简单设置,依赖少
  • 📱 多种通知方法,具有回退机制(PyObjC、pync、AppleScript、terminal-notifier)

适用场景

  • 当用户需要及时了解 Claude 处理请求的开始和结束时
  • 在后台运行 Claude 时,通过通知保持对任务状态的了解
  • 需要自定义通知声音和视觉效果的场景

工具列表

  • task_status 通知工具:在任务开始和结束时触发通知

常见问题解答

  • 视觉通知不工作:检查通知权限,尝试安装 terminal-notifier
  • 声音通知不工作:验证 macOS 声音设置,检查自定义声音路径
  • 服务器无法连接:验证 Claude Desktop 配置,重启所有相关服务

使用教程

使用依赖

  • macOS(依赖 macOS 特定功能)
  • Python 3.8 或更高版本
  • Claude Desktop 应用程序

安装教程

  1. 克隆仓库: bash git clone https://github.com/charles-adedotun/notifications-mcp-server.git cd notifications-mcp-server

  2. 安装 uv(如果尚未安装): ```bash # 使用 curl curl -LsSf https://astral.sh/uv/install.sh | sh

# 使用 Homebrew brew install uv ```

  1. 安装包和依赖: ```bash # 以开发模式安装包 uv pip install -e .

# 或直接从仓库安装 uv pip install git+https://github.com/charles-adedotun/notifications-mcp-server.git

# 安装视觉通知依赖(推荐) uv pip install pyobjc-core pyobjc-framework-Cocoa ```

  1. 测试安装: ```bash # 运行测试脚本验证通知是否工作 python test_notification.py

# 直接运行通知服务器 claude-notifications ```

  1. 配置 Claude Desktop: 编辑 Claude 的配置以包含通知服务器。

  2. 重启 Claude Desktop

  3. 测试通知: bash python test_notification.py

调试方式

  • 运行测试脚本:python3 test_notification.py
  • 检查通知权限
  • 查看服务器日志
  • 验证声音设置和路径

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。