{"slug": "mccarbon-a-carbon-ledger-for-your-mcdonald-s-orders-built-on-the-official-mcp", "title": "mccarbon: A Carbon Ledger for Your McDonald's Orders, Built on the Official MCP", "summary": "A GitHub repository called mccarbon, created by developer yeqv111, estimates the carbon footprint of McDonald's China orders by reading order history through McDonald's China's official MCP server and applying a three-layer emissions model covering dish, packaging and delivery, then outputs a single-file HTML \"carbon ledger\" graded A to E. The MIT-licensed Python 3.9+ project had about 1,600 stars and 37 forks as of October 24, 2026, with only four commits, and its README states it is a contest entry in McDonald's Programmer's Day creative development contest, not official McDonald's data. The README concedes most figures are estimates drawn from category medians — beef 2.40, chicken 1.00, fish 0.80, plant-based 0.30 and snacks 0.35 kg CO2e per serving — with dish emissions about 90% of the total, and that live use requires handing the tool a personal token.", "body_md": "A small repository is spreading among developers who like both agents and fast food: **[yeqv111/mccarbon](https://github.com/yeqv111/mccarbon?ref=explainx) estimates the carbon footprint of your McDonald's orders from your own order history.** It reads the data through McDonald's China's official [MCP server](https://open.mcd.cn/mcp?ref=explainx), applies a three-layer emissions model (dish, packaging, delivery), and writes a single-file HTML \"carbon ledger\" with a grade from A to E. The repository is MIT licensed, had about 1,600 stars and 37 forks when we looked on October 24, 2026, and has only four commits.\n\nIt is a neat, honest example of what a personal-data MCP integration can look like, and a useful case to study for its caveats: the numbers are estimates built mostly from category medians, and live use requires handing the tool a personal token.\n\n## TL;DR: the questions people are asking\n\n| Question | Answer | \n|---|---|\n| What does it do? | Turns McDonald's China order history into a CO2e report and reduction simulator | \n| Official? | No. Contest entry in McDonald's Programmer's Day creative development contest, per the README | \n| License and language | MIT, Python 3.9+, no third-party dependencies | \n| Data source | Official McDonald's MCP (token required for live data) | \n| Try without a token? | Yes, `PYTHONPATH=src python3 -m mccarbon demo` uses built-in 2026 sample data | \n| How accurate? | Estimates; many items use category medians, not measurements | \n| Output | Self-contained HTML, no external CDN | \n| Privacy | Membership card numbers masked by default | \n\n## How the three-layer model works\n\nThe README breaks the footprint of a meal into three layers, each calculated separately and itemized in the report.\n\n**1. The dish layer (about 90% of the total, per the README).** Some items use published measured values from the Vegan Society's \"Plate Up For The Planet\" report, in kg CO2e per serving for the UK: Double Big Mac 4.46, Quarter Pounder 2.99, Big Mac 2.35, 20 McNuggets 2.13, Filet-O-Fish 0.82, McPlant 0.29, McFlurry 0.17 and large fries 0.15. For categories, it cites ADEME's Agribalyse database (fast-food burgers at 18.6 kg CO2e per kg, about 92.5% from agriculture) and a European beef life-cycle figure of 23.5 kg CO2e per kg.\n\n**2. The packaging layer.** Using a Chinese product life-cycle greenhouse-gas factor database, it assigns about 186.18 g CO2e to a 650 mL polypropylene takeaway box, about 54 g to a cutlery set and about 19 g to a 6 g plastic bag. Packaging is allocated by channel, so delivery orders carry much more than dine-in or pickup.\n\n**3. The delivery layer.** From domestic food-delivery research, the README uses about 111.80 g CO2e per order on average, of which 86% is packaging and the ride itself about 15.6 g, mostly electric two-wheelers. The README concludes that choosing pickup nearly removes this layer.\n\nThe README does not spell out the exact formula, though it says combo meals are expanded into single items first and that the longest matching keyword wins when matching dish names. Factor tables (`DISH_FACTORS`, `CATEGORY_SERVING_KG`) live in `factors.py`, so anyone can audit them.\n\n## The honest part: what is measured and what is guessed\n\nThe README is upfront: figures are estimates \"for horizontal comparison and identifying reduction opportunities,\" not McDonald's official data, and it makes no environmental claims. The biggest caveat is the one it states itself: most items on the Chinese menu have no public carbon figures, so they use category medians per serving (beef 2.40, chicken 1.00, fish 0.80, plant-based 0.30, snacks 0.35 kg CO2e).\n\nThat means a UK measurement for a Big Mac may be applied conceptually to a Chinese supply chain it was not measured on, and a rare menu item gets a number from its category. The sensible reading is relative: beef-heavy orders beat chicken orders, delivery beats pickup, and the order of magnitude is plausible. Do not quote the ledger's total as a verified number. For a related look at how AI-assisted claims fare against evidence, see our [claimed vs verified post on McDonald's AI pricing](https://explainx.ai/blog/mcdonalds-ai-pricing-engine-big-mac-class-action-claimed-vs-verified-2026).\n\n## What the report and simulator show\n\nThe HTML report includes a total footprint, an A to E grade, the layer breakdown, a monthly chart, your most carbon-heavy category and order, and equivalents such as trees and driving distance. The README uses a mature tree absorbing about 21 kg CO2 per year and a gasoline car emitting about 170 g per km for those conversions. It publishes no concrete sample totals in text, only an image of the report.\n\nA green leaf bead moving along a track, illustrating a CO2e reduction simulator that swaps delivery for pickup\n\nThe reduction simulator models five changes and reports kg saved and percent of total:\n\n1. Swap red meat for white meat.\n2. Switch delivery to pickup.\n3. Reduce snacks.\n4. Halve desserts.\n5. Remove combo bundles.\n\nThe README says it only computes and does not moralize. Given the dish layer dominates, expect the beef swap to be the largest lever for most people, consistent with the README's own reasoning about beef's footprint.\n\n## How to try it\n\nPython 3.9 or newer is all you need.\n\n```\n# Zero-install demo with built-in 2026 sample data (no token needed)\nPYTHONPATH=src python3 -m mccarbon demo\n\n# Shareable single-file HTML from mock data\nPYTHONPATH=src python3 -m mccarbon --mock --html carbon-book.html\n```\n\nFor live data you need a token from McDonald's China's MCP platform. Verify it first with the `account` command, then generate the report with `--live`. Other subcommands are `report` (the default), `export` (normalized order JSON) and `account`, with options such as `--start`, `--end`, `--name`, `--city`, `--json` and `--detail`.\n\nOne packaging oddity: the clone instructions point to `w16638771062/mccarbon`, while the page we read is under `yeqv111/mccarbon`. Check which repository you are actually cloning before you run anything.\n\n## How does it compare with other ways to measure food emissions?\n\nMost consumer carbon calculators ask you to enter meals by hand and use generic national averages. mccarbon differs in three ways. It starts from real order history, so there is nothing to type. It separates packaging and delivery from the food itself, which many calculators ignore, and its README argues that this separation is why pickup looks so different from delivery. And it exposes its factor tables, so you can replace a median with a better number as soon as one is published.\n\nThe trade-off is precision. A life-cycle assessment of a single product measures a specific supply chain; a category median is a blunt average. If you need figures for reporting, use the tool to find which orders matter, then look for primary data on those items. For personal habit change, the relative ranking is usually enough: it tells you that a beef burger delivered in a plastic box costs far more carbon than a chicken wrap picked up in person, even if the exact kilograms are fuzzy.\n\n## Token safety: the part to take seriously\n\nGiving any tool a personal token is a trust decision, and food-order history reveals where you live, when you are home and what you eat.\n\n- **Prefer the environment variable.** The README offers`MCD_MCP_TOKEN` or`--token` . A flag on the command line can remain in shell history, so use the variable.\n- **Read the code first.** The repository has no third-party dependencies, which makes a quick audit practical.\n- **Verify before use.** The`account` command prints membership number and points; a`401` means the token is invalid or expired.\n- **Keep the report private.** The HTML is self-contained and masks card numbers by default, but order times and locations may still be inferable from it.\n- **Rotate if in doubt.** If you pasted the token anywhere public, replace it.\n\nIf you let AI agents use MCP tokens like this, one more layer helps: [AgentBeam](https://agentbeam.com/?ref=explainx), from the explainx.ai team, is an agent security platform that stops AI agents before they take dangerous actions, such as sending a credential somewhere it should not go.\n\n## Why it is trending, and why it is a useful template\n\nOur earlier post on [mcd-saver-strategist](https://explainx.ai/blog/mcd-saver-strategist-mcdonalds-china-mcp-coupon-optimizer-agent-skill-2026) covered the same contest ecosystem: McDonald's China exposing menus, coupons and order history through MCP has given hobbyists a real, consented data source. The two projects take opposite angles. One minimizes your bill; this one reports your emissions.\n\nLessons for builders:\n\n1. **Make factors data, not code.** Putting emission factors in tables you can audit is what turns a toy into something you can argue with.\n2. **Ship an offline demo.** Sample data lets people evaluate without credentials, which also cuts the security risk of trying a new tool.\n3. **Label estimate quality.** Saying which values are measured and which are medians is rarer than it should be.\n4. **Keep dependencies at zero.** For anything that touches personal tokens, a tiny auditable surface is a feature. Our[guide to MCP](https://explainx.ai/blog/what-is-mcp-model-context-protocol-guide) explains why connectors like this are spreading.\n\n## Limitations to remember\n\n- Order history only reflects what you bought, not what you wasted.\n- The packaging and delivery numbers are averages and do not know your actual bag, box or rider.\n- Regional and supply-chain variation is not modeled beyond category medians.\n- The project is four commits old; expect factor changes and bugs.\n- It is China-specific: the MCP server and menu are McDonald's China's.\n\n## Bottom line\n\nmccarbon is a well-scoped weekend project that shows how MCP can turn a company's consumer data into a personal analytics tool. Run the demo, read `factors.py`, and treat the numbers as directional. If you go live, guard the token the way you would a password.\n\n## Related reading\n\n*Repository details (stars, forks, commits) are as of October 24, 2026 and change quickly.*", "url": "https://wpnews.pro/news/mccarbon-a-carbon-ledger-for-your-mcdonald-s-orders-built-on-the-official-mcp", "canonical_source": "https://explainx.ai/blog/mccarbon-mcdonalds-mcp-carbon-ledger-order-history-co2e-estimator-2026?utm_source=rss&utm_medium=feed&utm_campaign=blog", "published_at": "2026-10-24 00:00:00+00:00", "updated_at": "2026-10-24 21:43:24.485303+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "developer-tools"], "entities": ["mccarbon", "yeqv111", "McDonald's China", "McDonald's", "Vegan Society", "ADEME", "Agribalyse", "GitHub"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/mccarbon-a-carbon-ledger-for-your-mcdonald-s-orders-built-on-the-official-mcp", "markdown": "https://wpnews.pro/news/mccarbon-a-carbon-ledger-for-your-mcdonald-s-orders-built-on-the-official-mcp.md", "text": "https://wpnews.pro/news/mccarbon-a-carbon-ledger-for-your-mcdonald-s-orders-built-on-the-official-mcp.txt", "jsonld": "https://wpnews.pro/news/mccarbon-a-carbon-ledger-for-your-mcdonald-s-orders-built-on-the-official-mcp.jsonld"}}