](https://mseep.ai/app/cactusinhand-mcp-server-notify)
](https://badge.fury.io/py/mcp-server-notify)

📢 MCP通知服务器
当代理任务完成时,发送带有声音效果的桌面通知的MCP服务器。
🥩 特性
- 代理任务完成后发送系统桌面通知
- 播放警报声音以吸引用户注意力,声音文件在里面。
- 跨平台支持(Windows、macOS、Linux)
- 基于标准MCP协议,与各种LLM客户端集成
⏬ 安装
使用安装 紫外线 包管理器
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
# or
pip install mcp-server-notify安装后,直接调用模块检查安装是否成功:
python -m mcp_server_notify此模块接受 --debug 或 --file 选项,我们可以像这样使用它:
python -m mcp_server_notify --debug
python -m mcp_server_notify --debug --log-file=path/to/logfile.log⚠️❕ 特殊要求
\*\*我们使用 通知 API用于我们的桌面通知交付,因此我们需要在桌面中安装一些特殊要求\*\*
视窗
# windows:// minimum requirements
pip install pywin32macOS
# Make sure terminal-notifier is installed into your system
brew install terminal-notifier📚 用法
使用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/mcp.json 或 your_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. 在任务结束时向AI输入以触发通知。
在Cursor中,您可以将此提示作为规则添加到 Cursor Settings -> Rules 所以你不必每次都手动输入。
⚡️ 与VSCode+副驾驶配合使用:
- 安装服务管理器 紫外线/紫外线:
pip install uv
- 将服务添加到VSCode设置:
视窗 %APPDATA%\Code\User\settings.json\ macOS $HOME/Library/Application\ Support/Code/User/settings.json\ Linux $HOME/.config/Code/User/settings.json
"mcp": {
"servers": {
"notifier": {
"command": "uvx",
"args": [
"mcp-server-notify"
],
"env": {}
}
}
}- 确保您使用的是最新版本的VSCode——它会自动运行MCP服务
- 打开VSCode→ 启用副驾驶→ 切换到代理模式。
- 类型#→ 您将看到#send_notiation选项。
- 询问代理:运行#send_notiation(它将自动处理通知)。
- 现在,处于代理模式的Copilot可以发送桌面通知。
🐳 使用Docker运行
由于环境兼容性问题,目前不可用。 如果Docker容器需要触发主机通知,无论主机操作系统是Windows、macOS还是Linux,解决方案都会变得更加复杂,直接使用本机通知通常是不可行的。
主要问题:
- 特定于操作系统的通知系统
每个操作系统(Windows、macOS、Linux)都有其独特的通知机制。
- Docker隔离
Docker容器的隔离限制了它们直接访问主机操作系统资源的能力。
- 依赖管理
需要为每个操作系统处理不同的通知库和依赖关系。
🧾 许可证
麻省理工学院
💻 贡献
欢迎问题和拉取请求!

