Huawei Task Lifecycle MCP
Uses Cloudflare resources—KV for MCP identity, D1 for task and audit storage, and Queues for async delivery and retries—to operate the task lifecycle notification service.
Runs the MCP server on Cloudflare Workers as a self-hosted service, providing the serverless runtime for the notification gateway.
Compatible with Gemini Spark and other Google-related agent environments that support remote MCP and Skills for task lifecycle reporting.
Pushes AI agent task lifecycle notifications to Huawei's negative-one-screen (负一屏) notification surface, creating and updating persistent cards for tasks with statuses like started, progress, waiting, completed, failed, and canceled, using Huawei's scheduleTaskId card and msgId event model.
Compatible with Codex and other OpenAI-related clients that support MCP and host hooks for reporting task lifecycle events.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Huawei Task Lifecycle MCPstart a task for 'data analysis'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Huawei Task Lifecycle MCP
English · 中文
将多个 AI Agent 的任务生命周期汇聚到华为负一屏:一项任务对应一张持续更新的卡片;一次执行对应一个 run_id;开始、进度、等待、重命名和终态都复用同一个 task_id。
项目运行在 Cloudflare Workers,使用 OAuth/KV 管理 MCP 身份、D1 保存任务与审计记录、Queues 完成异步投递和失败重试,并提供管理后台统一配置 Agent 来源名称和通知策略。
非官方社区项目,与华为、OpenAI、Google 无隶属或背书关系。产品名称和商标归各自权利人所有。
本项目提供的是自建服务源码,不是公共托管推送服务。部署者自行管理 Cloudflare、华为授权、OAuth、Agent Token、数据留存和访问权限。
三种接入方式
方式 | 适用场景 | 特点 |
MCP + Hook | Codex 等支持 MCP 和宿主 Hook 的客户端 | MCP 上报语义状态;Hook 记录本轮结束并检测遗漏 |
MCP + Skill | 支持远程 MCP 与 Skill/固定指令的 Agent | OAuth 身份隔离,Skill 约束每个任务的调用顺序 |
纯 Skill / Webhook | 不能添加 MCP,但能运行脚本的 GPT Work 等环境 | 内置 Python 客户端,通过长期独立 Agent Token 调用 HTTPS |
详细选择说明见 三种接入方式。
Related MCP server: mcp-notifications
核心能力
生命周期:
started、progress、waiting、completed、failed、canceled,以及不改变状态的renamed和turn.completed事实。实测确认并已实现:华为
scheduleTaskId决定卡片,msgId标识事件。同一任务的scheduleTaskId稳定;每个事件使用独立msgId,重试同一事件时复用。每个事件拥有独立
event_id,支持幂等、状态查询和失败重试。v3 区分稳定任务与单次运行:新
run_id可以有意重新开启已结束任务,旧 run 的迟到事件不会让卡片回退。v3 将事件、单调 revision、卡片投影与 outbox 在同一 D1 批次提交;同一
event_id内容冲突返回 HTTP 409。v3 支持按 Agent 灰度:请求后立即尝试入队,Cron 每分钟补偿;每张卡使用 lease 串行发送,并以 desired/accepted revision 抵抗 Queue 的重复与乱序。
Agent 独立 OAuth 或 Token、来源名称、状态开关、最短时长、去重窗口、静音项目和正文上限。
Queue 异步投递、指数退避和 DLQ;永久授权或参数错误不会无限重试。
管理后台提供 Agent 创建、策略修改、投递历史、失败重试、链路测试和 v1/v3 影子差异对账。
推送内容支持摘要或最多 5000 字符的用户可见正文,不包含模型隐藏推理;Huawei gateway 接受与设备实际显示明确分开。
默认推送完成、失败和取消;开始与进度会记录但不通知,可在后台按 Agent 开启。
从哪里开始
阅读 入门部署与首条通知,在自己的 Cloudflare 账号部署 Worker。
按客户端能力从下表选择一种接入,不确定时使用 MCP + Hook。
运行
doctor或查看/health/ready,再执行一项不含敏感信息的短任务。在后台核对
accepted_revision == desired_revision,最后以手机实际显示为准。
你的客户端 | 选择 | 下一步 |
支持远程 MCP,也有完成 Hook | MCP + Hook | |
支持远程 MCP,但没有 Hook | MCP + Skill | |
不能接 MCP,但能运行 Python | 纯 Skill / Webhook |
更完整的差异和保证边界见 接入方式选择,多台电脑见 多 Agent 接入。
快速命令
MCP 客户端
codex mcp add huawei-push --url "$WORKER_URL/mcp"
codex mcp login huawei-push安装 skills/huawei-task-lifecycle 后,Agent 会在实质任务开始前提交 huawei_task_start,并在结束前提交唯一终态。
纯 Skill / Webhook
npm run package:skills将 dist/huawei-task-push-webhook-plugin.zip 安装到目标 Agent。发布包不含 .env;首次使用需运行包内 scripts/provision_agent.py 生成独立长期凭据。
文档
完整导航见 文档索引。首次使用者通常只需阅读前三项:
MCP 工具
huawei_task_start、huawei_task_progress、huawei_task_wait、huawei_task_renamehuawei_task_complete、huawei_task_fail、huawei_task_cancelhuawei_task_event:通用生命周期提交huawei_get_delivery_status、huawei_list_deliveries、huawei_retry_deliverypush_huawei_task:旧版完成推送兼容入口
MCP 使用 OAuth 2.1。每个 OAuth 客户端自动映射为独立 Agent,只能查询和重试自己的事件。每台电脑建议使用独立 Agent/凭据,以便来源命名、停用、轮换与故障定位互不影响;一个 Worker 可同时承载任意数量的 Agent。 普通 Agent 不能绕过后台通知策略;停用 Agent 后,新提交、失败重试和队列中尚未投递的消息都会被阻止。
服务端点
路径 | 用途 |
| Streamable HTTP MCP |
| 统一 Agent Token 事件入口 |
| 投递状态查询 |
| 失败事件重试 |
| 无推送的身份与配置诊断 |
| v1 独立 Agent Token 兼容 webhook |
| Codex |
| 管理后台、v1/v3 对账与灰度投递状态 |
| 进程存活探针 |
| D1、Queue 与 secret binding 就绪探针 |
| 公开服务元数据与接入方式 |
开发
npm ci
cp wrangler.example.jsonc wrangler.jsonc
npm run cf-typegen
npm run check
npm run release:verify
npm run dev真实 wrangler.jsonc、.dev.vars、Skill .env 和 dist/ 均被 Git 忽略。部署步骤见 docs/deployment.md。
能力边界
华为负一屏是单向通知;手机回复或点击不会自动回传 Agent。
MCP/Skill 指令能提高模型主动上报率,但只有宿主 Hook 能提供系统级结束兜底。
HTTP
202表示事件已经持久化,不等于华为接受或手机显示;请根据event_id或后台的 revision lag 查询。默认 Agent 仍走旧链路,只有同时开启全局V3_DELIVERY且在后台选择“v3 灰度”的 Agent 才走 v3 投递链路;两条链路互斥,不会双投。不需要常驻电脑或额外中转服务器;Worker、D1、Queue 和 KV 即为云端中转层。
服务会把配置允许的标题、状态和正文发送到部署者的 Cloudflare 资源及华为接口;请先阅读 隐私与数据流,不要把秘密或不适合出现在锁屏/负一屏的内容交给通知 Skill。
许可与贡献
版本变更见 CHANGELOG,贡献与安全边界见 CONTRIBUTING 和 SECURITY,依赖许可证摘要见 第三方声明。本项目采用 Apache License 2.0。
This server cannot be deployed
Maintenance
Related MCP Connectors
Task management for teams building with AI agents. Agents claim tasks and report progress.
Task management for people and AI agents, with scoped OAuth access to issues, projects, and docs.
Persistent work tracking for AI agents: tasks, status and history that follow you across machines
The shared task board for teams and their AI agents — connect over OAuth, every action signed.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA serverless AI-powered system built with Cloudflare Workers that handles multiple communication channels efficiently while integrating OpenAI Agents SDK for AI capabilities.1-
- AlicenseNot gradedqualityCmaintenanceEnables sending real-time and webhook notifications when AI agents complete tasks, with support for Discord, Slack, Teams, Feishu, Ntfy, and custom webhooks.6MIT
- AlicenseAqualityDmaintenanceA lightweight notification service that sends webhooks when AI agents complete tasks. Supports multiple providers like Discord, Slack, Teams, Feishu, and Ntfy.17 npm4MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI clients to access a shared, authenticated memory and project management system with durable storage, task tracking, roadmaps, and semantic search, deployed on Cloudflare.MIT