推送通知服务

MCP服务器用于ntfy推送通知,可从任何MCP兼容客户端发送和轮询通知。

  • by mambucodev
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 mambucodev/mcp-ntfy

使用说明

mcp ntfy

MCP服务器 通知 推送通知。从任何兼容MCP的客户端发送和轮询通知。

安装

npx mcp-ntfy

配置

克劳德桌面版

添加到您的 claude_desktop_config.json:

{
  "mcpServers": {
    "ntfy": {
      "command": "npx",
      "args": ["-y", "mcp-ntfy"],
      "env": {
        "NTFY_URL": "https://ntfy.sh",
        "NTFY_TOKEN": "tk_...",
        "NTFY_TOPIC": "my-notifications"
      }
    }
  }
}

克劳德代码

添加到您的Claude Code MCP设置中:

{
  "mcpServers": {
    "ntfy": {
      "command": "npx",
      "args": ["-y", "mcp-ntfy"],
      "env": {
        "NTFY_URL": "https://ntfy.sh",
        "NTFY_TOKEN": "tk_...",
        "NTFY_TOPIC": "my-notifications"
      }
    }
  }
}

环境变量

变量 必填 默认 描述
NTFY_URL 没有 https://ntfy.sh ntfy服务器基本URL
NTFY_TOKEN 无 -- 身份验证的承载令牌
NTFY_TOPIC 否 -- 默认主题(当工具调用省略主题时使用)

工具

publish

向ntfy主题发送推送通知。

参数 类型 必填 说明
topic string 否* 主题名称(如果需要* NTFY_TOPIC 未设置)
message string 是 通知正文
title string 否 通知标题
priority number No 1=分钟,2=低,3=默认,4=高,5=紧急
tags string[] 否 表情符号快捷方式,例如。 ["warning", "skull"]
click string 否 点击时打开的URL
attach string 否 要附加的文件URL
filename string 否 附件文件名
icon string 否 通知图标URL
delay string 否 延迟: "30m", "2h", "tomorrow 9am"
markdown boolean 否 启用Markdown格式
actions 操作[] 否 最多3个操作按钮

poll

轮询来自ntfy主题的缓存邮件。

参数 类型 必填 说明
topic string 否* 要投票的主题(如果需要,则需要* NTFY_TOPIC 未设置)
since string 否 持续时间("10m")时间戳、ID, "all",或 "latest"
scheduled boolean 否 包括计划消息
id string 否 按邮件ID筛选
message string 否 按邮件文本筛选
title string 否 按标题筛选
priority string 否 按优先级筛选(逗号分隔)
tags string 否 按标签筛选(逗号分隔,AND逻辑)

server_health

检查ntfy服务器运行状况和消息统计信息。没有参数。

许可证

麻省理工学院