explainx.ai0k
TrendingAI News TodayPathwaysSkills
Pricing
explainx.ai

Upskill in AI — 16 free pathways, live workshops & bootcamps, and 50+ courses from practitioners. Plus the skills, tools, and MCP servers to practice on.

follow us

follow on google

Add explainx.ai as a preferred source

corporate training

support@explainx.ai

get started

Find your pathTake Free Evaluation

community

Join the community

learn

mind: share how you thinkpathways — start freeworkshopsbootcampscoursescompare Explainxcertificationsmock testsexplainx universitycorporate traininglearn skills & mcp

discover

skillsmcp serversexplainx mcptoolsmdx readeragentsllmsdesignsdictionarypeopleagi trackerfelony benchranks

company

aboutvisionmissionteaminstructorsteach on explainxpartnershipscommunityhackathonscareers

content

daily AI newsstate of AI — live resultsblogreleasespromptsgeneratorsresource libraryfor LLMsexplainx.ai kids

solutions

all solutionsdeveloper upskillingmarketing upskillingproduct manager upskillingleadership upskilling

newsletter · weekly

Get AI news, tools, and insights in your inbox.

supportcontactprivacytermsdata rightshow we create contentsubmission guidelines

© 2026 AISOLO Technologies Pvt Ltd

explainx.ai

On this page

  • TL;DR: questions people will ask
  • How the skill is built
  • What can it do beyond "cheapest"?
  • What is verified and what is only claimed
  • How to try it
  • Risks and limitations
  • Why this matters beyond burgers
  • Takeaways for builders
  • Related reading
← Back to blog

explainx / blog

mcd-saver-strategist: An Agent Skill That Finds the Cheapest McDonald's China Order via MCP

MCP, Agent Skills, Open Source, AI Agents, Developer Tools

Part of Model Context Protocol (MCP)

mcd-saver-strategist is an MIT agent skill that uses McDonald's China MCP and a deterministic optimizer to cut a Big Mac set from ¥47 to ¥21.90. How it works.

Oct 24, 2026·9 min read·Yash Thakker
add explainx.ai
go deep
mcd-saver-strategist: An Agent Skill That Finds the Cheapest McDonald's China Order via MCP

A small GitHub repository about cheaper burgers is a clean example of how to build an agent skill properly. hujjun/mcd-saver-strategist 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, this is a compact, well-tested reference.

TL;DR: questions people will ask

table · 2 cols
QuestionAnswer
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
Weekly digest3.6k readers

Catch up on AI

Curated AI updates on agents, skills, and MCP — delivered to your inbox. Unsubscribe anytime.

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 skillTwo 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: 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, 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.

table · 3 cols
ItemAuthor's labelOur note
Optimizer logicReal, same code as the demo page, 17 parity testsPlausible and checkable by running the self-tests
"Save 53%"Real result on sample dataSample menu and coupons, not live prices
Coupon stacking rulesReal, conservativeConservative by design, but real stores may allow more
MCP connectionReal; mcp_probe.py can handshake, list 35 tools and call oneRequires your own token to confirm
Menu prices and caloriesSample snapshotShape matches MCP, values illustrative
Coupon contentsSample snapshotDepends on account and store
OrderingReal via calculate-price then create-orderNot 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:

bash
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, 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 skillCables 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. 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. 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 and Google's Harness2, 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.

Related reading

  • What is MCP? Model Context Protocol guide
  • What are agent skills? Complete guide
  • Agent skills security threat and verification
  • McDonald's AI pricing engine: claimed vs verified
  • Tencent TeamAI CLI: git-based team skills
  • Google Harness2 and WorkBuddy-Bench
Spotted something out of date? Let us know.
Yash Thakker

Written by

Yash Thakker

Yash is an AI expert with over 300K learners. Join his workshops →

View Yash Thakker in People in AI →

Related posts

Oct 14, 2026

CLI-Anything: Turn Any Software Into an Agent-Ready CLI

CLI-Anything, from the HKUDS lab, uses a coding agent to analyze a program's source and generate a full command-line interface with JSON output, tests and a skill file. A community registry called CLI-Hub shares the results. Here is how it works, what to try, and what to be careful about.

Sep 17, 2026

Monid Open-Sources a Tool Router With 2,000 APIs for AI Agents

Monid open-sourced a tool router that gives AI agents standardized access to 2,000 different APIs through a single integration layer — targeting one of the more persistent practical problems in agentic AI development: every new tool an agent needs typically requires its own custom integration work.

Aug 29, 2026

Diffusion Studio's open-source video editor turns every edit into code

On August 28, 2026, Diffusion HQ (YC F24) open-sourced a video editor built on one idea: every edit is code, not an opaque render. The pitch is "code is the new database" — an agent can read, diff, and re-run a timeline the way it works a codebase. explainx.ai looks at the manual-edit-to-reusable-skill workflow, how it compares to ViMax and OpenCut, and whether editing-as-code actually fixes agent context loss.