mcd-saver-strategist: An Agent Skill That Finds the Cheapest McDonald's China Order via MCP GitHub user hujjun published mcd-saver-strategist, an MIT-licensed agent skill that finds the cheapest valid McDonald's China order by combining the live menu, coupons and stacking rules from McDonald's China's official MCP server at mcp.mcd.cn, then explains the plan and places the order after user confirmation. The repository appeared on October 9, 2026 and has since collected about 1,300 stars and 86 forks; its README example shows a Big Mac, medium fries and a cola at ¥47.00 ordered directly versus ¥21.90 using a "1+1" combination coupon, a saving of ¥25.10 or 53% on bundled sample data. The design routes data retrieval to MCP, arithmetic to a deterministic Python optimizer (scripts/optimizer.py, standard library only, about 260 ms for 160 menu items and 12 coupons per the author's bench.py) and explanation to the agent, with a final re-price via the server's calculate-price call before create-order returns a payment link. A small GitHub repository about cheaper burgers is a clean example of how to build an agent skill properly. hujjun/mcd-saver-strategist https://github.com/hujjun/mcd-saver-strategist?ref=explainx is an MIT-licensed skill that finds the cheapest valid McDonald's China order by combining the live menu, your coupons and the stacking rules, then lets the agent explain and after you confirm place it. It appeared as a new repository on October 9, 2026 and has since collected about 1,300 stars and 86 forks. The headline example: a Big Mac, medium fries and a cola at ¥47.00 if you pick them directly, ¥21.90 using a "1+1" combination coupon, a saving of ¥25.10 or 53%. That number needs context, covered below. The more interesting part is the architecture. The author's one-line design rule is that data retrieval goes to MCP, arithmetic goes to code, and explanation goes to the agent. If you are learning how to build skills on top of Model Context Protocol servers https://explainx.ai/blog/what-is-mcp-model-context-protocol-guide , this is a compact, well-tested reference. TL;DR: questions people will ask | Question | Answer | |---|---| | What is it? | A WorkBuddy agent skill plus a Python optimizer, MIT license | | Who made it? | GitHub user hujjun, as an entry to a McDonald's programmer creativity contest; not an official McDonald's product | | What data does it use? | McDonald's China's official MCP server menu, prices, coupons, nutrition, stores, ordering | | Where does the math happen? | In optimizer.py , deterministic, standard library only, not in the LLM | | Is 53% real? | Real output on the README's sample data; live prices and coupons will differ | | Can I try it without a token? | Yes, the scripts run offline on bundled sample data | | Can it place orders? | Yes, through MCP, after price quoting and user confirmation | | Works outside China? | Not live; the server and coupons are McDonald's China's | How the skill is built The README describes three roles. McDonald's MCP, hosted at mcp.mcd.cn , supplies real-time menus, prices, coupons, nutrition, store lookup and ordering. The script scripts/optimizer.py does a deterministic combinatorial search and outputs the top-N cheapest valid plans. The WorkBuddy agent interprets the request "I want a Big Mac set, what's cheapest?" , normalizes the MCP data into a request file, explains the plans and asks before ordering. Two plugs connecting along an arc, illustrating an MCP server feeding menu and coupon data to the mcd-saver-strategist agent skill The call flow in the README's diagram is worth copying for any transactional skill: read the time, find nearby or delivery stores, query meals and details, bind and fetch coupons, fetch nutrition, normalize everything, run the optimizer, re-price the chosen plan with the server's calculate-price call, ask the user, and only then call create-order , which returns a payment link. The re-price step matters: it means the final number comes from the merchant's system, not from the local model of its rules. Why a deterministic optimizer Coupons create a combinatorial explosion: dozens of menu items, a dozen or more coupons, each with its own stacking rules. The author notes that people do not want to calculate it, and that language models are also prone to miscalculating prices, discounts and stacking when doing it in their heads. So the optimizer enumerates combinations with three layers of search-space pruning and reports about 260 ms for 160 menu items and 12 coupons the author's own benchmark, bench.py . Its pricing is deliberately conservative: coupons flagged as non-stackable are mutually exclusive with any other coupon, and a group order's discount counts only once, so it prefers under-reporting savings to showing a false low price. This is the same lesson we covered in our guide to agent skills https://explainx.ai/blog/what-are-agent-skills-complete-guide : use the model for language and judgment, and put anything that must be exactly right into a script it calls. What can it do beyond "cheapest"? According to the README, the skill answers several follow-up questions with code rather than prose: - Four objectives: cheapest, balanced, lightest lowest calories and fewest items, each anchored to the lowest price and only choosing among options within a tolerance band, so "balanced" never means a wildly expensive plan. - Coupon audit: for each coupon, face value versus actual saving versus opportunity cost. The author's example is a "spend 35, get 7 off" coupon that nominally saves ¥7 but blocks the 1+1 combo, costing ¥18 more overall. - Gap suggestions: if you are a few yuan short of a discount tier, a subset-sum dynamic program finds the cheapest add-on and reports the net change, which can be negative. - Pareto frontier: the set of orders that cannot be improved on price without raising calories, or the reverse. - Group orders and delivery: per-person split with the discount counted once; delivery mode adds the fee and excludes coupons that only work in store. - Budget and calorie caps: hard constraints, such as 800 kcal or a 25 yuan budget. An interactive version of the optimizer runs in the browser at the author's GitHub Pages demo https://hujjun.github.io/mcd-saver-strategist/?ref=explainx , and CI runs 17 parity tests to make sure the page and the Python code give the same answers. What is verified and what is only claimed The README includes an unusually honest "reality table", which we have summarized. We have not run the repository ourselves, so the verification column reflects the author's statements. | Item | Author's label | Our note | |---|---|---| | Optimizer logic | Real, same code as the demo page, 17 parity tests | Plausible and checkable by running the self-tests | | "Save 53%" | Real result on sample data | Sample menu and coupons, not live prices | | Coupon stacking rules | Real, conservative | Conservative by design, but real stores may allow more | | MCP connection | Real; mcp probe.py can handshake, list 35 tools and call one | Requires your own token to confirm | | Menu prices and calories | Sample snapshot | Shape matches MCP, values illustrative | | Coupon contents | Sample snapshot | Depends on account and store | | Ordering | Real via calculate-price then create-order | Not exercised by the demo page | Two details from the author's live testing, which they say used a personal account in October 2026, are useful for anyone building on this MCP: coupons must be checked in four places coupons already in your wallet, claimable coupons that need an auto-bind step first, store coupons, and others , because a single source misses the best combination; and some store coupons work only for pickup, so a delivery plan must filter them. The order history call can also return an empty list for new accounts, so any feature that relies on it needs an empty-state fallback. How to try it Offline, no token: git clone https://github.com/hujjun/mcd-saver-strategist.git cd mcd-saver-strategist/skills/mcd-saver-strategist/scripts python optimizer.py python demo.py python optimizer.py --objective lightest python optimizer.py --audit python selftest.py Live, with WorkBuddy and a token per the README : 1. Get a token from McDonald's China's MCP open platform at open.mcd.cn/mcp https://open.mcd.cn/mcp?ref=explainx , logging in with a phone number. 2. In WorkBuddy, add a custom MCP connector using the repository's mcp-config.example.json , replacing the ${MCD MCP TOKEN} placeholder with your token or an environment variable. 3. Copy skills/mcd-saver-strategist/ into ~/.workbuddy/skills/ on Windows %USERPROFILE%\.workbuddy\skills\ . 4. Ask in chat: "I want a Big Mac set, what's cheapest?" Cables passing through a ring with one left outside, illustrating scoped access for an MCP token used by an agent skill Risks and limitations Credentials. The token ties the agent to a real member identity. Community skill listings for the same MCP server on ClawHub warn that it must not be shared. The repository claims a scan of its full git history found no secrets and keeps only a placeholder in its config. Read any skill you install before giving it a token, especially one that can create orders. The same concern is behind our write-up of agent skills security https://explainx.ai/blog/agent-skills-security-threat-explainx-verification . Confirmation and cost. The skill quotes and asks before ordering, which is the right pattern, but it is still an agent holding a purchasing token. Keep confirmation on. Terms of use. The README tells users to follow McDonald's MCP service terms and rules. If you adapt it, read those terms yourself; we have not reviewed them. Scope. It optimizes one chain in one country, and the author says output is reference only and not nutritional advice. The 53% figure should not be quoted as an expected saving. It is a contest entry. The README lists compliance checks against the contest rules, such as repo creation date, a declaration file and an MCP integration document. That explains the tidy documentation, and also means the project may not be maintained after the contest. Why this matters beyond burgers Most "agent ordering" demos let the model do everything. This repo does the opposite and gets a more trustworthy result: the merchant's own MCP provides ground truth, a tested function does the arithmetic, and the model is used to understand a request and communicate. That is also the shape of pricing-sensitive agents in general, where consumer pricing logic is already under legal scrutiny https://explainx.ai/blog/mcdonalds-ai-pricing-engine-big-mac-class-action-claimed-vs-verified-2026 . A tool that shows you the cheapest valid order from the merchant's own data sits on the other side of that debate. It also shows a company shipping an official MCP server for consumers and developers, a pattern we expect to spread. For comparison with how other agents get skills and tools, see our coverage of Tencent's TeamAI CLI for git-based team skills https://explainx.ai/blog/tencent-teamai-cli-git-based-team-skills-2026 and Google's Harness2 https://explainx.ai/blog/google-harness2-recursive-agent-harnessing-open-source-workbuddy-jobbench-lab-2026 , which evaluates agents on a WorkBuddy benchmark. Takeaways for builders 1. Put exact calculations in code and keep the model out of the arithmetic loop. 2. Re-price or validate through the merchant's API before any irreversible step. 3. Make conservative assumptions explicit here, non-stackable coupons are exclusive and say so in the README. 4. Ship an offline demo and self-tests so people can evaluate the skill without credentials. 5. Include a reality table. Labelling sample data as sample data is what makes the "53%" claim checkable. Star counts, features and file names are from the repository README as of October 24, 2026 and may change.