An AI agent that out-coupons you at McDonald's China
A WorkBuddy skill that pulls live menu and coupon data via McDonald's China's MCP, then hands the combinatorial math to a deterministic optimizer — because LLMs are terrible at arithmetic.

What it does
You tell it what you want to eat (“Big Mac meal, cheapest way”), and it fetches the store menu and every available coupon through the McDonald’s China MCP, exhaustively searches for the lowest legal combination, and can place the order after you confirm. The flagship example: Big Mac + fries + drink goes from ¥47 direct to ¥21.90 via a “1+1” combo — a 53% saving computed by the algorithm, not staged by a human.
The interesting bit
The architecture is a clean division of labor: data fetching goes to the MCP, arithmetic goes to a plain Python optimizer, and the agent only handles understanding and explanation. The “coupon audit” feature is the standout — it computes each coupon’s opportunity cost, catching the trap where a nominally-saving coupon blocks a better combo and costs you ¥18 extra.
Key highlights
- Four optimization objectives: cheapest, balanced, lowest-calorie, fewest items — same constraints, different answers
- Pareto frontier of price vs. calories, so you can see exactly where cheap and healthy stop coexisting
- Gap-filling suggestions via subset-sum DP: “add a ¥7.5 pie to unlock ¥12 off, net save ¥4.5”
- Multi-person orders priced conservatively — discounts counted once, no fake per-person prices
- Zero dependencies, 46 self-tests, and a browser-based playground that runs the same optimizer logic with CI parity checks against the Python version
Caveats
- The bundled menu and coupon data are demo snapshots; real prices depend on live MCP responses from your account
- Requires a McDonald’s China MCP token and the WorkBuddy agent to do anything beyond the offline sample data
- It’s a contest entry, not a McDonald’s product — and the coupon-stacking rules are deliberately conservative, so it may miss aggressive stacking
Verdict
Worth a look for anyone building agent skills: it’s a tidy case study in not letting an LLM do math. If you don’t eat at McDonald’s China, the optimizer design and coupon-audit idea still transplant well to any discount-laden domain.
Frequently asked
- What is hujjun/mcd-saver-strategist?
- A WorkBuddy skill that pulls live menu and coupon data via McDonald's China's MCP, then hands the combinatorial math to a deterministic optimizer — because LLMs are terrible at arithmetic.
- Is mcd-saver-strategist open source?
- Yes — hujjun/mcd-saver-strategist is open source, released under the MIT license.
- What language is mcd-saver-strategist written in?
- hujjun/mcd-saver-strategist is primarily written in Python.
- How popular is mcd-saver-strategist?
- hujjun/mcd-saver-strategist has 887 stars on GitHub.
- Where can I find mcd-saver-strategist?
- hujjun/mcd-saver-strategist is on GitHub at https://github.com/hujjun/mcd-saver-strategist.