Ntfy MCP 服务器是一款基于 Model Context Protocol (MCP) 的实用工具,它能将长语言模型 (LLM) 与 Ntfy.sh 通知服务相连接。借助该服务器,LLM 可通过自然语言处理来发送通知、设置提醒以及触发警报。
Ntfy MCP 服务器可让长语言模型轻松与 Ntfy.sh 通知服务交互。你可以按照以下步骤使用该服务器:
# 安装依赖
npm install
# 编译代码
npm run build
# 启动开发服务器
npm start
# 测试命令
npm test
ntfy://default:用于查询默认 Ntfy 主题的信息。ntfy://{topic}:可获取特定 Ntfy 主题的详细信息。# 安装依赖
npm install
# 编译代码
npm run build
<TN>
<action>tnfy Notifyaction>
<parameters>
<topic>defaulttopic>
<title>Long-running Task Completetitle>
<message>The background data processing task has finished successfully.message>
<tags>infotags>
parameters>
TN>
<TN>
<action>tnfy Schedule Reminderaction>
<parameters>
<topic>reminderstopic>
<title>Team Meetingtitle>
<message>Don't forget the team meeting at 3 PM today.message>
<tags>calendar, remindertags>
<priority>4priority>
parameters>
TN>
该工具支持以下参数:
| 参数名称 | 详情 | 示例值 |
|---|---|---|
| topic | 通知的主题,必须是有效的 Ntfy 主题。 | "alerts", "updates" |
| title | 通知的标题(可选)。 | "Task Completed" |
| message | 通知的主要内容,支持 Markdown 格式(如果启用 markdown 参数)。 | "Your requested data analysis has finished" |
| tags | 关联到通知的主题标签。 | ["check"], ["warning", "critical"] |
| priority | 通知的优先级,范围从 1 到 5,5 表示最高优先级。 | 5 |
| actions | 与通知相关联的操作列表,允许用户点击执行特定操作。 | 见下方示例 |
| markdown | 是否启用 Markdown 格式解析(true 或 false)。 | true |
ntfy://default{
"topic": "default",
"messages": number,
"created_at": timestamp,
"updated_at": timestamp
}
ntfy://{topic}ntfy://alerts{
"topic": string,
"messages": array of messages,
"created_at": timestamp,
"updated_at": timestamp
}
项目以 MIT License 分发,具体条款见 LICENSE 文件。
感谢以下项目的贡献者:
如需了解更多信息,请访问我们的 GitHub 页面 或联系 项目维护人员。