mcd-solver skill

A skill that solves McDonald's ordering as an optimization: maximum satisfaction within set budget, calories, sodium and protein.

  • 72 ★ on the repository
  • Last commit
  • MIT
Skill

Extended access

Why this level

  • With a token the skill reaches the ordering service and reads coupons and prices.
  • The placement mode creates a real order, with payment left to the human.
All reasons and checks

ftxcgwf/mcd-solver

Install

Works in

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/mcd-solver

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • With a token the skill reaches the ordering service and reads coupons and prices.
  • The placement mode creates a real order, with payment left to the human.

This is third-party code. Review the repository files before installing.

What it does

mcd-solver turns the question of what to order into a constrained optimization. Budget, calories, sodium and protein act as constraints, and the objective is food satisfaction that accounts for temperature and texture contrast. The skill returns three options: a saver, a gourmand and a balanced one. Nutrition data comes from the public calculator on the chain website and needs no token. Prices and coupons are pulled through the McDonald's MCP server and need a token in the `MCD_MCP_TOKEN` variable. The `python cli.py --max-kcal 800 --max-sodium 2000 --persona all` command runs a calculation at once, and the `scripts/quickstart.py` script builds a data snapshot and runs three examples.

Who it is for. People watching calories or salt who want an order with reasoning for the choice.

Good fit when

  • A person has an 800 kcal lunch limit and needs a dish selection.
  • Someone watches sodium because of blood pressure and compares burgers.
  • The budget is tight and must be spent for maximum enjoyment.
  • Coupons must be checked to get the price after discounts.

Not a fit when

  • You need coupons, points or order history, which the skill does not serve.
  • You have no token but need real prices, since price data is approximate without it.
  • A diet is prescribed by a doctor, and the calculation is only a reference.

Example request

I need a lunch up to 800 kcal and 2000 mg sodium with a budget of one hundred yuan. Give three options and explain the choice.

Limitations

Without a token the skill works on nutrition data from the chain website, and prices are then approximate: the MCP server supplies exact ones with a token from `open.mcd.cn/mcp`. The `--place` flag creates a real order with payment left in the app; by default only calculation runs, and an order requires typing the amount by hand. Data and text are in Chinese, and the satisfaction model is the author invention and does not replace dietitian advice. The calculation needs only Python 3.9 with no third-party dependencies.

How to disable. Delete the project folder and the skill from the skills directory. Remove the `MCD_MCP_TOKEN` token from the environment and revoke it on the platform.

FAQ

Is a token required?

Not for nutrition-based calculation: data comes from a public calculator. Real prices, coupons and the final bill check need a token.

Which three options does the skill return?

A saver, a gourmand and a balanced one. On the same budget and the same restaurant they differ noticeably in sodium.

How do I check it works without a token?

Run `python scripts/selftest.py`: an offline self-check of 26 items needs no token.

What do the `--quote` and `--place` flags do?

`--quote` checks the price against the official post-coupon calculation and `--place` then creates a real order. Both need a token and the second needs manual confirmation.

Is a chicken burger always lighter on salt?

No. In the chain data one chicken burger has 1041 mg of sodium against 961 mg for the Big Mac, .

Discussion

No questions or reviews yet.

Skills

McButler works out calories and the full cost of an order, including travel and queue time, from the McDonald's China MCP

SkillExtended access208Repository stars

A skill that plans a China McDonald's order under a budget and sodium limit, checks store coupons and never orders.

SkillMinimal access582Repository stars

Picks a McDonald's China order for budget, calories, party size and restrictions, claiming coupons first and verifying prices.

SkillExtended access111Repository stars

A skill calculates daily calorie targets and builds three ready McDonald's China meal sets from the menu, with sodium warnings.

SkillBroad access104Repository stars

An unofficial skill for McDonald's China: a training plan, combo comparison by price and macros, order tracking and recaps

SkillBroad access118Repository stars

A skill and CLI for the McDonald's China menu: three meal options for a budget, with nutrition and a source for every figure

SkillMinimal access121Repository stars

README in short

The project was built for a contest and made entirely in WorkBuddy, with the `workbuddy.md` file describing it. The repository includes the solver, data parsers, a self-check and a page that demos the calculation. The author stresses that the skill is neither a menu lookup nor a coupon finder.

README badge

Original SKILL.md

---
name: mcd-solver
description: 麦当劳点单决策求解器。当用户提到想吃麦当劳、问麦当劳怎么点划算、控卡/控钠怎么吃麦当劳、给我配一个 XX 大卡以内的麦当劳套餐、预算 XX 元吃麦当劳、麦当劳营养搭配时使用。在预算、热量、钠、蛋白质的约束下,求解满足感最高的组合,并给出省钱派/嘴馋派/均衡派三套方案。
---

# 今天麦什么 · 麦当劳点单求解器

一句话说明白:**给我预算、热量上限和一个心情,我给你麦当劳的最优解。**

不是菜单查询,不是领券脚本。它把「怎么点」建模成一个带约束的优化问题——
预算、热量、钠、蛋白质是约束,目标函数是**满足感**,而不是「最便宜」。

## 何时使用

- 用户说「想吃麦当劳,但今天只能吃 800 大卡」
- 用户关心咸不咸、钠高不高(例如血压敏感、健身控钠)
- 用户有预算上限,想知道这点钱怎么点最爽
- 用户在几个套餐之间犹豫,想要一个带理由的建议

**不适用**:领券、查积分、查历史订单,那是麦当劳 MCP 其他工具的事。
下单可以在给出方案后通过 `cli.py --quote --place` 完成。

## 快速开始

无需 MCP Token 也能跑(营养数据来自麦当劳官网公开营养计算器):

```bash
python cli.py --max-kcal 800 --max-sodium 2000 --persona all
```

新人第一次用,或环境看起来不对(比如提示数据缺失)时,先跑一键体验,
它会自动建营养快照并连跑三个示例:

```bash
python scripts/quickstart.py
```

怀疑改动破坏了什么时跑离线自检(26 项,无需 Token):

```bash
python scripts/selftest.py
```

有 Token 时先校准真实价格,预算约束才会生效:

```bash
export MCD_MCP_TOKEN=你的Token
python scripts/fetch_menu.py          # 抓取在售菜单与价格 -> data/menu.json
python scripts/verify_prices.py       # 校准官方结算价 -> data/prices_verified.json
python scripts/coupons.py --calibrate # 折算券后价 -> data/prices_coupon.json(有券时)

Report a problem