by BEN020406
麦当劳 MCP 技能:待评价清单、好评兑礼进度、发票报销门槛凑单、单次抽奖确认。99 项测试,非官方产品。
# Add to your Claude Code skills
git clone https://github.com/BEN020406/maimen-order-managerGuides for using ai agents skills like maimen-order-manager.
See how maimen-order-manager compares with popular alternatives.
maimen-order-manager is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by BEN020406. 麦当劳 MCP 技能:待评价清单、好评兑礼进度、发票报销门槛凑单、单次抽奖确认。99 项测试,非官方产品。. It has 57 GitHub stars.
maimen-order-manager's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/BEN020406/maimen-order-manager" and add it to your Claude Code skills directory (see the Installation section above). maimen-order-manager ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
maimen-order-manager is primarily written in Python. It is open-source under BEN020406 on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh maimen-order-manager against similar tools.
No comments yet. Be the first to share your thoughts!
Available after the catalog security scan passes.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
个人效率工具 · 非麦当劳官方产品。本技能只做三件事:把「还没评价的订单」「能开票的订单」「抽奖活动」整理清楚,最后一步交给用户自己在官方 App 完成。
一句话分工:MCP 取数 →
scripts/做确定性计算 → 你负责讲清楚 + 拿到确认 → 官方 App 收尾。
不适用:点餐、凑满减、算最省钱的组合、代下单一律不做。用户提出这类需求时,直接说明本技能不覆盖,不要拐回旧主线。
capabilities 解析 tools/list;不假设 issue-invoice、submit-review 存在,也不虚构工具名。order-list / query-order 都没有任何评价字段,
orderStatusCode 不存在。因此只把「已完成」订单列为候选并标「待确认」,
由用户点「已评过」在本机浏览器记住;绝不声称平台确认「未评价」,也不代写评价。
若未来接口返回 orderStatusCode=8,按已评价处理(代码已兼容)。order-list 最多返回最近 10 笔,输出必须写「统计范围:最近 N 笔订单」,不说「全部历史」。draw-lottery;没有「再抽一次」的循环、没有批量、没有无人值守。query-lottery-info / query-my-prizes 确认,禁止再次 draw-lottery。拿到 tools/list 的原始返回(存成临时 JSON),执行:
python scripts/cli.py capabilities --tools /tmp/tools.json
完整 → 正常走。发票助手 显示交接模式 → 正常,最后交给官方 App(这是设计预期,不是故障)。不可用 → 按第 5 节降级,不要硬跑。按用户诉求只取需要的:
| 诉求 | 调用 | 说明 |
|---|---|---|
| 待评价 | order-list |
无需入参,取最近订单 |
| 开票 | order-list →(必要时)query-order |
明细不全时按 orderId 补详情 |
| 抽奖 | query-lottery-info;历史用 query-my-prizes(pageNum/pageSize≤20) |
记录 retrieved_at |
把返回原样写到临时文件(/tmp/orders.json 之类),不要手工改写字段、不要编造订单。
# 待评价(默认按 1 小可乐 / 2 中可乐 / 3 小薯条 计算兑礼进度)
python scripts/cli.py orders --input /tmp/orders.json
python scripts/cli.py orders --input /tmp/orders.json --tiers "1:小可乐,2:中可乐,3:小薯条"
# 发票(--target 给报销门槛,会算最少凑单组合;可加 --city 上海 --store 陆家嘴 --from 2026-10-01 --to 2026-10-31)
python scripts/cli.py invoice --input /tmp/orders.json --profile /tmp/profile.json --city 上海 --target 100
# 抽奖活动
python scripts/cli.py lottery-info --input /tmp/lottery.json --history /tmp/prizes.json
# 单次抽奖确认卡(不执行)
python scripts/cli.py lottery-preview --input /tmp/lottery.json
加 --format json 拿结构化结果做二次加工。金额、数量、合计一律以脚本输出为准,不要自己加总。
--target 给出最少凑单组合与超出额,凑不够就报差额;展示脱敏后的抬头与税号,明确说「本工具不提交发票」。预览模板(不要省略消耗):
本次操作:抽奖 1 次
消耗:100 积分
抽奖活动:麦麦幸运抽
可能奖品:免费中薯条、麦金卡 7 天体验
可用资源:积分 320 / 次数 2
[确认抽 1 次] [取消]
draw-lottery(接口限频:1 秒内不可重复调用)。结果用 python scripts/cli.py lottery-result --input /tmp/draw.json 解读,再用 query-lottery-info 核验资源变化。python scripts/cli.py lottery-timeout --error "ReadTimeout" → 只允许查询状态,不重试。invoice 命令的交接卡片,给路径 官方 App / 小程序 → 我的 → 订单 → 选择订单 → 申请开票。用户想「一眼看还有几件事没处理」时:
python scripts/cli.py home --orders /tmp/orders.json --lottery /tmp/lottery.json \
--profile /tmp/profile.json --tools /tmp/tools.json --city 上海
待处理总数 = 待评价候选订单与可开票订单的去重并集。要让用户看界面,把快照写成 ui/data.js 后打开 ui/index.html:
python scripts/cli.py home ... --out ui/data.js --format json
下表状态已于 2026-10-21 用真实 Token 直连
mcp.mcd.cn核实:tools/list返回 35 个工具。
| 模块 | 依赖工具 | 实测 | 缺失/差异时怎么做 |
|---|---|---|---|
| 待评价 | order-list(可选 query-order) |
存在;无任何评价字段 | 只列已完成订单并标「待确认」,用户本地标记「已评过」 |
| 发票 | order-list |
存在;无城市字段 | 城市由门店名推断并标注 |
| 抽奖查询 | query-lottery-info、query-my-prizes |
存在;无 availableTimes |
用 availablePoint 判断资源,不显示次数 |
| 单次抽奖 | draw-lottery |
存在(1 秒限频) | 缺则告知无法抽奖,不给替代方案 |
| 发票提交 | issue-invoice |
确认不存在 | 只整理清单 + 官方 App 交接 |
| 评价提交 | submit-review |
确认不存在 | 只展示状态 + 官方 App 交接 |
真实返回的关键字段:
order-list: orderId, orderType, createTime, beType, beCode, storeCode,
storeName, orderStatus(字符串), orderProductList, realTotalAmount
→ 10 笔;无 orderStatusCode、无城市、无评价标记
query-order: orderStatus, status(内部码,如 40), storeAddress, totalAmount,
realTotalAmount, totalDiscountAmount, couponList, takeWay, payId …
→ 同样无 review/comment/score 字段
query-lottery-info: activityCode(dtx2), activityStatusText, drawPoint(24),
availablePoint(4782.6 浮点), drawDecision.resourceEligible, prizes[]
字段细节、容错规则与错误码见 references/mcp-capabilities.md。
| 场景 | 这样说 | 动作 |
|---|---|---|
| 未连接 MCP | 「还没有连接麦当劳 MCP。」 | 指路连接器,不要让用户把 Token 贴进对话 |
| 没有订单 | 「当前返回范围内没有可处理订单。」 | 重新查询 |
| 都评价过了 | 「这些订单都已标记为已评价。」 | 查看全部订单 |
| 有缺字段 | 「N 笔接口未返回评价状态,标为待确认。」 | 引导用户点「已评过」 |
| 无发票接口 | 「暂不支持自动开票,请在官方 App 对应订单中操作。」 | 查看开票清单 |
| 抽奖关闭 | 「当前没有进行中的抽奖活动。」 | 稍后再查 |
| 资源不足 | 「当前资源不足以抽奖。」 | 查看奖品记录 |
| 工具超时 | 「暂时无法确认结果,正在避免重复操作。」 | 查询状态 |
scripts/cli.py —— 统一入口:capabilities / orders / invoice / lottery-info / lottery-preview / lottery-result / lottery-timeout / home / demo(纯标准库)。scripts/common/contracts.py —— 统一数据契约与容错字段解析。scripts/common/state_machine.py —— 状态机与 TTL(订单 5 分钟、抽奖资源 30 秒),禁止 VERIFY → EXECUTE。scripts/common/redact.py —— 税号/邮箱/Token/订单号脱敏。scripts/common/mcp_client.py —— tools/list 能力发现与降级判定。scripts/operations/orders.py —— 待评价统计。scripts/operations/invoice.py —— 开票候选筛选、USCC 校验、交接卡片。scripts/operations/lottery.py —— 活动概览、单次确认门、超时核验。scripts/tests/ —— 99 项测试,改逻辑后必跑:
python -m unittest discover -s scripts/tests(在技能根目录执行)references/order-status.md —— 订单状态映射与「可能待评价」判定。references/invoice-handoff.md —— 开票筛选规则与交接话术。references/ui-spec.md —— 「权益收纳夹」视觉与交互规范。ui/index.html —— 三卡片界面(配合 ui/data.js)。ui/assets/ —— 票券 logo(512/192/64 + favicon)与一次性构建脚本 build_logo.py(需 Pillow,运行时不依赖)。python -m unittest discover -s scripts/tests -v # 99 项必须全绿
python scripts/cli.py demo # 四个模块的文本卡片应完整输出
测试不通过就不算改完。
把麦当劳订单里那些「还没评价、还能开票、还有积分抽奖」的权益尾巴,一次性理清楚。 只整理,不代办。
个人效率工具 · 非麦当劳官方产品,与麦当劳无隶属或授权关系。
🔗 在线演示:https://ben020406.github.io/maimen-order-manager/ (样例数据,可直接点开)


多数人一个月点十几次麦当劳,却从没算清三笔账:
| 场景 | 规则 | 真实困难 |
|---|---|---|
| 好评兑小食 | 1 个好评换小可乐,2 个换中可乐,3 个换小薯条(各门店略有差异) | 不知道还差几单,常常白跑一趟 |
| 发票报销 | 公司要求单次发票满 50 或 100 元 | 一单只有二三十,得几张凑,手动加总易错 |
| 积分抽奖 | 消耗积分抽券 | 不知道剩多少积分、值不值得抽 |
官方 App 擅长处理单笔订单,但不负责回答三个聚合问题:我还差几单能换薯条?哪几张发票能凑够 100?我还有多少积分可以抽?
本技能把分散的状态聚合成一句可执行的结论,把执行留给用户自己。
| 能力 | 输出示例 |
|---|---|
| 待评价清单 | 待评价候选:10 笔 + 逐单列表(时间 / 门店 / 金额 / 状态) |
| 兑礼进度 | 已达成最高档 3 好评(小薯条),或「再评 1 单可达」 |
| 本地已评标记 | 点「已评过」隐藏该行,标记只存本机浏览器 |
| 报销门槛凑单 | 报销门槛 ¥100:选 6 笔,合计 ¥102.80,超出 ¥2.80 |
| 单次抽奖 | 本次操作:抽奖 1 次,消耗 24 积分 + 确认后才执行 |
把本目录放到 WorkBuddy 技能目录:
~/.workbuddy/skills/maimen-order-manager/
(Windows 为 C:\Users\<你>\.workbuddy\skills\maimen-order-manager\)
WorkBuddy → 左侧「专家 · 技能 · 连接器」→「连接器」→ 右上角「自定义连接器」→「配置 MCP」:
{
"mcpServers": {
"mcd-mcp": {
"type": "streamableHttp",
"url": "https://mcp.mcd.cn",
"headers": { "Authorization": "Bearer YOUR_MCP_TOKEN" }
}
}
}
⚠️ 三个坑:
type 必须驼峰 streamableHttp。写成全小写 streamablehttp 客户端不识别,会退化成 OAuth 流程,界面一直显示「未认证」。Authorization 必须带 Bearer 前缀,只填 Token 会返回 403「校验鉴权authToken必填」。mcd-mcp,再新开一轮对话,工具才会注入。cd ~/.workbuddy/skills/maimen-order-manager
python scripts/cli.py demo # 离线跑一遍四个模块
python -m unittest discover -s scripts/tests # 99 项测试应全绿
在 WorkBuddy 对话里直接说:
| 你说 | 它做 |
|---|---|
| 我还有多少单没评价 | 拉取最近订单 → 标注待确认 → 给出兑礼进度 |
| 再评几单能换薯条 | 按兑礼档位算差额 |
| 哪几张发票能凑够 100 | 从真实订单里挑最少组合,报超出额 |
| 查一下现在有没有抽奖 | 活动、奖品、单次消耗、可用积分 |
| 抽一次 | 先出预览卡,你确认后才执行一次 |
命令行也能单独跑:
python scripts/cli.py orders --input orders.json
python scripts/cli.py invoice --input orders.json --target 100
python scripts/cli.py lottery-info --input lottery.json
python scripts/cli.py home --orders orders.json --lottery lottery.json --out ui/data.js
maimen-order-manager/
├── README.md # 本文件
├── CONTEST_DECLARATION.md # 参赛声明(官方原文,未改动)
├── MCP_INTEGRATION.md # MCP Server / Tool / 调用流程
├── workbuddy.md # WorkBuddy 开发对话上下文
├── SKILL.md # 技能入口:触发条件、铁律、工作流
├── references/ # 接口对照、状态规则、发票交接、界面规范
├── scripts/ # 主体代码(纯标准库)
│ ├── cli.py # 9 个子命令统一入口
│ ├── common/ # 契约、状态机、脱敏、能力发现
│ ├── operations/ # 订单、发票、抽奖
│ ├── fixtures/ # 样例数据
│ └── tests/ # 99 项自动化测试
└── ui/ # 三卡片界面(index.html + data.js + assets)
| 做 | 不做 |
|---|---|
| 列出订单、算差额、给组合 | 代下单、代评价、代提交发票 |
| 抽奖前展示消耗、等确认 | 批量抽、循环抽、无人值守抽 |
| 缺失字段标「未知」 | 猜测金额、城市、评价状态 |
| 税号邮箱脱敏 | 落盘、上传、写日志 |
order-list 与 query-order 都没有评价字段,所以只能标「待确认」,由你点「已评过」。order-list 返回上限,不能当全量账单。python -m unittest discover -s scripts/tests
# Ran 99 tests — OK
覆盖:状态映射、兑礼档位、筛选合计、凑单组合、USCC 校验、脱敏、抽奖确认门与超时、能力降级、CLI 集成。
参赛作品 · 麦当劳程序员节创意开发大赛。非麦当劳官方产品,输出仅供参考, 餐品与订单信息以麦当劳官方渠道为准。