MCP Notify Server

MCP Notify Server

site icon
2025.03.18 11
Python通知服务任务提醒开发效率
MCP Notify Server 是一个基于MCP协议的服务,用于在代理任务完成时发送桌面通知并播放提示音效,以吸引用户注意。它支持跨平台运行(Windows、macOS、Linux),并可与多种LLM客户端集成。
View on GitHub

Overview

基本能力

产品定位

MCP Notify Server 是一个通知服务,旨在通过桌面通知和声音提示来增强用户对任务完成的感知。

核心功能

  • 在代理任务完成后发送系统桌面通知
  • 播放提示音效以吸引用户注意(内置音效文件)
  • 跨平台支持(Windows、macOS、Linux)
  • 基于标准MCP协议,可与多种LLM客户端集成

适用场景

  • 长时间运行的任务完成后通知用户
  • 需要用户及时知晓任务完成状态的场景
  • 与AI代理或自动化工具集成,提供任务完成反馈

工具列表

  • Apprise API:用于桌面通知传递的核心工具
  • pywin32(Windows):Windows平台通知依赖
  • terminal-notifier(macOS):macOS平台通知依赖

常见问题解答

  1. Docker支持:目前由于环境兼容性问题,不支持Docker容器直接触发主机通知
  2. 跨平台问题:不同操作系统有独特的通知机制,需要分别处理
  3. 依赖管理:需要为不同操作系统处理不同的通知库和依赖

使用教程

使用依赖

Windows

pip install pywin32

macOS

brew install terminal-notifier

安装教程

git clone https://github.com/Cactusinhand/mcp_server_notify.git
cd mcp_server_notify

uv venv
source .venv/Scripts/activate

uv pip install mcp-server-notify
# 或
pip install mcp-server-notify

调试方式

python -m mcp_server_notify

调试选项:

python -m mcp_server_notify --debug
python -m mcp_server_notify --debug --log-file=path/to/logfile.log

使用配置

与Claude Desktop集成 编辑配置文件claude_desktop_config.json

{
    "mcpServers": {
        "NotificationServer": {
            "command": "uv",
            "args": [
              "--directory",
              "path/to/your/mcp_server_notify project",
              "run",
              "mcp-server-notify",
            ]
        }
    }
}

或使用全局安装的Python命令:

{
    "mcpServers": {
        "NotificationServer": {
            "command": "python",
            "args": [
              "-m",
              "mcp_server_notify",
            ]
        }
    }
}

与Cursor集成 编辑配置文件~/.cursor/mcp.jsonyour_project/.cursor/mcp.json

{
    "mcpServers": {
        "NotificationServer": {
            "command": "uv",
            "args": [
              "--directory",
              "path/to/your/mcp_server_notify project",
              "run",
              "mcp-server-notify",
            ]
        }
    }
}

使用提示:在任务输入末尾添加finally, send me a notification when task finished.即可触发通知。

许可证

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