返回市场
消息-mcp

消息-mcp

作者:gimjin7 星标更新:2025-08-07

项目介绍

<div align="center"> <h1>💬 消息 MCP</h1> <p> 🌐 支持的语言: <a href="README.zh.md">中文</a> | <a href="README.ko.md">한국어</a> | <a href="README.ja.md">日本語</a> </p> <h3>桌面通知、自定义声音、ntfy 移动通知、电子邮件通知以及 API 推送减少等待 AI 任务时的焦虑,让您在等待期间可以舒适地享受一杯咖啡。</h3> <a href="https://modelcontextprotocol.io"> <img src="https://img.shields.io/badge/MCP-Server-gold?labelColor=wheat&color=limegreen" title="MCP 服务器"/> </a> <a href="https://deepwiki.com/gimjin/message-mcp"> <img src="https://deepwiki.com/badge.svg" alt="咨询 DeepWiki"> </a> <a href="https://dash.cloudflare.com"> <img src="https://message-mcp-werker.kimseongrim.workers.dev/visit-count.svg?v=5" title="访问次数"/> </a> <a href="https://github.com/gimjin/message-mcp/blob/main/.github/workflows/ci.yml"> <img src="https://img.shields.io/github/actions/workflow/status/gimjin/message-mcp/ci.yml" alt="MIT 许可证"> </a> <a href="https://www.npmjs.com/package/message-mcp"> <img src="https://img.shields.io/npm/v/message-mcp" alt="NPM 版本"> </a> <a href="https://github.com/gimjin/message-mcp/blob/main/LICENSE"> <img src="https://img.shields.io/github/license/gimjin/message-mcp" alt="MIT 许可证"> </a> <img src="https://gips2.baidu.com/it/u=3599997249,1807146176&fm=3081&app=3081&f=WEBP?w=560&h=316" alt="消息 MCP 示例"> </div>

🚀 提升 AI 效率,释放更多时间

在等待 AI 完成任务时,是否希望同时处理其他工作?现在您可以放心地处理其他事务,而 AI 执行长时间运行的任务。

消息 MCP 让您的 AI 协作更高效!

🧑: 制作一个网页版的俄罗斯方块游戏,完成后通知我。
🤖: 我会开始制作俄罗斯方块游戏
   ...
💬: 消息 MCP 已执行,消息已发送。

[!TIP]

  • 在客户端设置中允许 MCP 自动执行
  • 用户规则规则文件中添加“完成时通知”提示,以避免重复手动提示。

⚡️ 快速安装

点击安装-Cursor 点击安装-VS Code 点击安装-VS Code Insiders smithery.ai

支持通过 smithery.ai 进行云安装(例如 Dify 等 SaaS 服务),并提供一键本地部署。由于消息 MCP 实际运行在 smithery.ai 的云上,因此桌面通知尚未支持。全程应用端到端加密,确保数据安全。了解更多

⚙️ 标准安装

MacOS, Linux, WSL2

{
  "mcpServers": {
    "message-mcp": {
      "command": "npx",
      "args": ["-y", "message-mcp@latest"]
    }
  }
}

Windows

{
  "mcpServers": {
    "message-mcp": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "message-mcp@latest"]
    }
  }
}

🎛️ 可选配置

修改桌面通知

{
  "mcpServers": {
    "message-mcp": {
      "command": "npx",
      "args": ["-y", "message-mcp@latest"],
      "env": {
        "DISABLE_DESKTOP": "true",
        "SOUND_PATH": "/path/to/your/sound.mp3"
      }
    }
  }
}
  • 默认启用桌面通知
  • 默认声音由 zapsplat 提供。如果您不喜欢默认声音,可以从 zapsplat.com 下载并配置。

ntfy 移动通知

安装应用:App StoreGoogle PlayF-Droid

{
  "mcpServers": {
    "message-mcp": {
      "command": "npx",
      "args": ["-y", "message-mcp@latest"],
      "env": {
        "NTFY_TOPIC": "your-unique-topic"
      }
    }
  }
}

邮件通知

{
  "mcpServers": {
    "message-mcp": {
      "command": "npx",
      "args": ["-y", "message-mcp@latest"],
      "env": {
        "SMTP_HOST": "smtp.gmail.com",
        "SMTP_PORT": "587",
        "SMTP_SECURE": "false",
        "SMTP_USER": "user@gmail.com",
        "SMTP_PASS": "your_password"
      }
    }
  }
}

API 通知

{
  "mcpServers": {
    "message-mcp": {
      "command": "npx",
      "args": ["-y", "message-mcp@latest"],
      "env": {
        "API_URL": "https://httpbin.org/post",
        "API_METHOD": "POST", // POST, PUT, PATCH
        "API_HEADERS": "{\"Authorization\": \"Bearer token\"}"
      }
    }
  }
}
fetch(API_URL, {
  method: API_METHOD,
  headers: {
    'Content-Type': 'application/json'
    ...JSON.parse(API_HEADERS)
  },
  body: JSON.stringify({
    title: notifyTitle,
    message: notifyMessage,
  }),
})

📌 系统需求

  • Node.js: 18 或更高版本
  • macOS: 原生通知需要 >= 10.8
  • Linux: 安装 notify-osd 或 libnotify-bin(Ubuntu 默认包含)
  • Windows: >= 8,或对于 Windows < 8 使用任务栏气泡通知

❗️ 故障排除

Windows 系统通知未启用

设置 > 通知与操作 > 从应用和其他发送者接收通知 → 启用

WSL2 (Ubuntu) 没有通知声音

sudo apt install -y pulseaudio mpg123

WSL2 环境缺少操作系统通知

sudo find / -type f -name "snoretoast-*.exe" 2>/dev/null
/path/to/.../node_modules/snoretoast-x64.exe
/path/to/.../node_modules/snoretoast-x86.exe

chmod +x /path/to/.../node_modules/snoretoast-*.exe

如果这个项目对您有帮助,请给它一个 ⭐️ 来支持它,并让更多人看到它!