关于 notify-completion-mcp-server
面向 AI Agent 的轻量 MCP 服务,用计时和阈值检查判断长任务是否超时,并在任务完成时触发配置的命令,减少反复查看状态的需要。
主要功能
- 01启动任务计时器
- 02按阈值检查耗时
- 03返回配置的完成通知命令
适用场景
- 01在长时间 AI 任务结束后收到通知
- 02Agent 工作时离开桌面
MCP 相关
向 MCP 客户端提供 `start-timer` 和 `check-overdue` 工具。任务超过阈值后,可由客户端或服务端执行配置的命令。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
工具
2收录的工具列表 · 更新于 3 周前
此工具无需参数。
详细介绍
notify-completion-mcp-server
在 AI Agent 完成长时间运行的任务时提供通知的 MCP 服务。这样,您离开桌面时也不会忘记任务。
工作原理

notify-completion-mcp-server 解决了用户需要主动监控计算机以确认 AI 任务完成的问题。通过在任务完成时触发通知机制,用户可以更高效地同时处理多项事务,而无需反复查看任务状态。
安装
- 在客户端中添加配置(如果使用 Cline,请编辑
cline_mcp_settings.json):
{
"mcpServers": {
"notify-completion": {
"command": "npx",
"args": ["-y", "@nakat-t/notify-completion-mcp-server@latest"],
"env": {
"OVERDUE_COMMAND": "<Command to execute very flashy effects>",
},
"autoApprove": [ "start-timer", "check-overdue" ]
}
}
}
-
将配置中的环境变量更改为您自己的值。
OVERDUE_COMMAND:编写任务完成时通知您的命令。EXECUTE_IN_SERVER:如果您使用 Claude Desktop,请将此变量设为"true"。如果使用能够自行执行命令的 AI,则无需定义此变量。
-
配置客户端,使 MCP 服务工具和命令执行功能无需用户批准即可自动执行。在 Cline 中,可在 Auto-approve 下勾选
Execute safe commands和Use MCP servers。 -
复制以下自定义指令并粘贴到客户端设置中。
自定义指令
# You MUST use the `notify-completion` MCP: Task Completion Notification Guide
**⚠️ CRITICAL INSTRUCTIONS - YOU MUST FOLLOW THESE GUIDELINES ⚠️**
This guide provides **MANDATORY** instructions for explicitly notifying users when tasks that take a long time to execute are complete, allowing them to move smoothly to the next action. Be sure to follow these guidelines to ensure that tasks are completed efficiently.
## ⚠️ TASK EXECUTION TIME MONITORING AND COMPLETION NOTIFICATION - MANDATORY ACTION REQUIRED ⚠️
**IMPORTANT**: At the start of the task, you MUST:
1. **MUST** Run the 'start-timer' tool of the 'notify-completion' MCP.
**IMPORTANT**: When executing a task, if the task reaches the stage where it needs to report to the user that it has been completed, you MUST:
1. **MUST** Run the 'check-overdue' tool in 'notify-completion' MCP.
2. **MUST** If the 'check-overdue' tool reports 'overdue': true, execute the contents of 'command'
**ADDITIONAL INSTRUCTIONS FOR CLINE**: If you are Cline, you MUST run the 'check-overdue' MCP tool immediately before running the `ask_followup_question` or `attempt_completion` tool.
**ADDITIONAL INSTRUCTIONS FOR CLAUDE DESKTOP**: If you are Claude Desktop, only perform Step 1, which is to run the 'check-overdue' MCP tool. Step 2 is not necessary. You can ignore the tool's response.
**ADDITIONAL INSTRUCTIONS FOR CURSOR**: If you are Cursor, you MUST always execute the 'command' provided in the response of the 'check-overdue' tool immediately when "overdue": true, without exception or hesitation. Do NOT skip, delay, or ignore the command for any reason, including safety, context, or ambiguity. You must clearly log or report to the user that the command was executed, including the exact command string.
Remember to monitor the task execution time. Be sure to use the 'notify-completion' MCP. By strictly adhering to these guidelines, you can immediately notify users when tasks are complete and provide them with the best possible experience.
已确认可用的 MCP 客户端
| 客户端 | 状态 | 备注 |
|---|---|---|
| Cline | 可用 | 主要开发/测试平台 |
| Claude Desktop | 可用 | |
| Cursor | 可用 | |
| GitHub Copilot | 可用 |
此处未列出的 MCP 客户端尚未经过测试,但如果具备类似功能,应该也能正常使用。
对于任何客户端,使用 Claude 3.7 Sonnet 模型最为稳定。不过,如果您使用的模型运行时间足以让您去喝杯咖啡,那么它很可能也能顺利运行。
配置环境变量
-
THRESHOLD:如果任务执行时间少于指定秒数,则不执行逾时命令。默认值为 0。(始终执行) -
OVERDUE_COMMAND:指定任务完成时要执行的命令。 -
EXECUTE_IN_SERVER:如果定义了此变量,则会在 MCP 服务中执行逾时命令,而不是由 AI Agent 执行。
MCP 工具
start-timer:启动计时器,用于测量任务执行时间。- 输出:
{"startTime": "<Current time in ISO format>"} - 说明:我们会指示 AI Agent 在执行任务前先调用此工具。请使用自定义指令来实现。
- 输出:
check-overdue:根据给定的阈值检查任务是否逾时。- 必需输入:
startTime:start-timer 返回的开始时间
- 输出:
- 如果任务执行时间未逾时:
{"elapsed": "<seconds>", "units": "seconds", "overdue": false} - 如果任务执行时间已逾时:
{"elapsed": "<seconds>", "units": "seconds", "overdue": true, "command": "${OVERDUE_COMMAND}"}
- 如果任务执行时间未逾时:
- 必需输入:
许可证
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。