ezmcd-mcp
Summary: This MCP server lets an authorized local agent inspect a McDonald's China account, browse stores/menus, build a cart, get a quote, and — only within local spending authorization — submit/pay real pickup orders and reconcile them.
Inspect implemented capabilities, connection guidance, connected account aliases, local spending limits, session validity, and wallet balance without exposing credentials.
Refresh/maintain an existing session without SMS or purchases; it may rotate credentials but does not renew checkout runtime.
Read favorite stores, store details, available pickup dates/times/meal periods, live menus with card offers, product/combo details, and current official cart contents.
Add simple or explicitly configured items/combos to an empty cart once using idempotency keys; cart additions do not place orders or pay.
Validate cart, components, discounts, pickup/locker time, wallet, and price cap; create a 120-second checkout quote.
Submit and McWallet-pay one fresh quoted order within locally authorized policy; repeated calls reconcile rather than duplicate; real purchase.
Pay an existing locally CREATED order only if payment has never been attempted; otherwise only query it.
Reconcile the exact order, cashier, and wallet status without resubmitting or consuming; cancellation overrides historical PAID.
Credentials, SMS codes, tokens, credential import, and spending-limit increases are not handled through MCP; purchase authorization and spending policy stay local.
Integrates with McDonald's China accounts to select stores and menu items, review offers and final pricing, place pickup orders, and complete payment using the McDonald's wallet.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ezmcd-mcp check my account balance and show today's menu at my favorite store"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
EzMcDonald's
让个人 Agent 使用用户自己授权的麦当劳中国账号,选择门店、餐品和优惠,核对报价,在消费授权与预算内完成到店自取和麦钱包付款。
当前版本 0.1.0a44:本地 Python CLI + 38 个 stdio MCP 工具,面向已注册会员的开发者 alpha。 已通过 MCP 完成一笔真实早餐卡自取订单和 ¥12.60 麦钱包付款,重启重复调用未再次消费。更多商品、规格和普通券已有真实加购报价证据;不代表所有门店、商品和优惠都已支持。能力矩阵 · 验证记录 · 更新日志
开始前先了解三个条件:
真实适配依赖指定的官方 Mac 客户端构建。核心需要 Python 3.11+;项目内钱包采样另需 Python 3.12+。Linux 可运行演示和测试,真实付款未验收。
首次接入仍需本人官方 App 登录及本机授权。项目内短信登录已实测,但需要本人已有的官方设备上下文,不能只输入手机号就取得账号权限。
登录成功不等于可以下单。 下单还需要本人有效的运行字段和独立消费授权;运行字段尚不能自动续期,无法承诺一次接入后长期无人值守点餐。凭据获取方式见凭据指南。
本项目独立开发,非麦当劳官方项目。没有启用定时购买。
快速开始
git clone https://github.com/Chiiz0/EzMcDonalds.git
cd EzMcDonalds
python3 -m venv .venv
.venv/bin/python -m pip install -e .
# 完全离线:模拟报价、下单、付款及重复调用
.venv/bin/ezmcd --data-dir .private/demo demo --run尚未发布到 PyPI。演示返回 simulation=true,不会连接麦当劳或真实扣费。若要让 Agent 体验演示,可运行 .venv/bin/ezmcd --data-dir .private/demo mcp-config;这份配置只连接演示目录。
Related MCP server: @striderlabs/mcp-chipotle
连接自己的账号
先检查本机环境,再按自己的情况选择入口:
.venv/bin/ezmcd doctor
.venv/bin/ezmcd account guide你已有的条件 | 接下来做什么 |
官方 Mac App 已登录,项目还没有账号 | 按首次接入引导准备采样依赖、证书和网络扩展,再运行 |
已有同会员的项目账号,需要更新会话 | 在原数据目录运行 |
已有本人官方设备上下文,想通过短信登录 | 在本机运行 |
已有本人单条余额请求或 HAR | 使用 |
表中子命令均通过 .venv/bin/ezmcd 运行。personal 是本地别名,不是手机号或认证凭据。首次保存账号时消费默认关闭;MCP 不接收手机号、验证码或会话令牌。
项目内采样仅匹配麦当劳进程,不修改系统代理;环境不支持就停止。旧版 sampling-capture 已停用,不要提交测试订单取得样本。 首次证书/扩展授权以及最终接入成功的判断,按本机终端和首次接入引导操作。需要重复采样可使用本人显式授权的受限持久证书。
检查能否下单
.venv/bin/ezmcd doctor --account personal --verify-session
.venv/bin/ezmcd account check personal这两个命令只核验账号和余额,不下单或付款。按返回的阻碍继续处理:
检查结果 | 可继续的操作 | 需要补齐的条件 |
会话有效,缺少下单运行字段 | 找店、看菜单、选券、准备购物车和报价 | 导入本人已有的有效运行样本,见凭据指南 |
原运行样本超过默认24小时 | 保留账号和订单,继续可用的查询 | 更新本人证据,或由本机用户选择显式限期复用;不改原采样日期,历史字段真实下单仍待验收 |
会话失效或刷新结果未知 | 离线找回本地购买记录 | 按会话维护恢复,不重复发送未知刷新请求 |
消费关闭、授权到期或余额不足 | 核对选餐方案、最终报价和付款缺口 | 由本人决定是否授权或在官方入口充值;Agent不能提高额度 |
已注册会员的首次钱包接入和已有账号维护均有实机证据;空白机器安装及长期凭据续期仍有缺口。设备字段的来源和支持范围见设备上下文。
给个人 Agent 使用
真实账号接入后,重新生成使用真实账号数据目录的配置:
.venv/bin/ezmcd mcp-config把输出交给支持 stdio MCP 的个人 Agent。配置包含本机可执行文件及数据目录的绝对路径,不含凭据。默认目录是 ~/.local/share/ezmcdonalds;如果接入时指定了 --data-dir 或 EZMCD_DATA_DIR,这里也必须使用同一目录。不要把演示配置误当成真实账号配置,也不要换目录绕过购买日志。MCP 配置与完整工具列表
可以这样向 Agent 表达需求:
使用 personal 账号,先确认能否下单,再按我保存的早餐偏好准备下一餐。核对门店、具体北京时间、取餐方式、优惠和总额;在我已授权的消费范围内付款,并返回订单状态和取餐码。已有同餐记录时查询原单;缺货、优惠不可用、超预算或需要官方验证时停止并说明。
还没有偏好时,先让 Agent 用 stores_search、pickup_slots、menu_list 和 product_detail 核对门店、时段、套餐组件及配料,再调用 preferences_save 保存。偏好与选餐方案说明了早餐卡、指定券名称、组件份数和饮品选择的写法。保存偏好不会授权消费或创建定时任务。
核对报价并授权购买
Agent 的主要调用顺序:
capabilities→accounts_list→account_diagnose,核对当前能力与账号。meal_plan使用已保存偏好,或从实时门店、菜单和卡券查询开始选餐。商品展示价和预估不是付款金额;指定券使用coupons_list→coupon_products。cart_get查看现有餐品;空车使用cart_add_configured加入明确选择的商品。已有内容需要用户决定是否移除,不能直接覆盖。加购结果必须为MATCHED;断线后用cart_add_status找回原操作。pickup_methods核对取餐方式。所需方式已选中时用checkout_quote;可用但未选中时用新鲜cart_ref和稳定键调用checkout_quote_pickup。检查商品、组件、优惠、最终金额及checkout_blockers,报价有效120秒。用户授权范围和本地策略均允许时,
checkout_submit创建并支付一单;同一购买始终使用同一个idempotency_key。order_status查询原订单和取餐说明。UNKNOWN时只查询,不换键重下;pickup_code_pending=true表示付款已核验但取餐码未生成。官方“已完成”不单独证明用户已取餐。订单查询
消费默认关闭。需要交给 Agent 自动购买时,由用户在本机设置限额;下面的命令会开启消费,请按自己的授权范围设置门店和期限:
.venv/bin/ezmcd account policy personal \
--enable-checkout --max-order 20.00 --daily-budget 20.00 --max-orders-day 1
# 可添加 --store 七位门店代码,以及 --expires-at 带时区的有效期
# 随时关闭消费,保留查询和记录
.venv/bin/ezmcd account policy personal --disable-checkout额度按北京时间的取餐日统计本项目保留的尝试,未知结果也占用额度;其他入口的消费不计入本项目预算。新订单发送前报价到期,或金融写请求前消费授权到期,会停止相应请求,不会删除原记录或自动重试。麦钱包充值、支付密码或风险验证由本人在官方入口完成。
日常维护与恢复
换聊天或丢失回执:
orders_list找本地尝试,再order_status核对原单。官方入口的订单可用official_orders_list/official_order_detail查询;本地列表不是完整官方历史。找回订单加购或取餐准备中断: 恢复原操作,不换键重发。取餐时间已过且用户放弃该餐时,可结束本地过时意图;这不会清空官方购物车、取消订单或释放未知购买记录。
停用:
account revoke personal移除本地账号凭据并关闭消费,保留身份和日志;它不注销官方服务器会话,也不删除原始 HAR。采样证书由本人显式撤销,见证书管理。
实现特点
同一会员共享购买日志,不能通过更换别名重置预算。
门店、日期、商品和数量来自参数及实时查询,核心不固定某家店或某套早餐。
报价核对购物车与确认页的取餐方式、组件、卡券和金额;付款后核对订单、收银台和余额。
账号锁、幂等键、购买内容指纹、服务端已有订单检查及发送前持久化日志共同限制重复执行。
凭据与消费策略在本机管理;MCP 不提供导入凭据或提高额度的工具。
开发
.venv/bin/python -m pip install build
.venv/bin/python -m unittest discover -s tests
.venv/bin/python -m build源码在 src/ezmcd/,公开测试在 tests/,配置示例在 examples/。测试默认离线,不执行真实购买;需要本机私有证据的两项对照测试在干净 checkout 中跳过,Linux 另跳过 macOS 的加密对照。
公开仓库和发行包不含账号、订单记录、HAR、官方安装包、二进制或提取出的签名密钥。验证记录保留成功、失败及尚未验收的边界;开发历史见更新日志,剩余工作见路线。贡献说明
License
MIT © 2026 Chiiz0
Available Tools
17 toolsaccount_checkBRead-only
Verify the account session now and return wallet balance; never pays.
Inputs: account (required).
account_connection_instructionsARead-only
Explain local enrollment; do not paste session files, SMS codes, or tokens into chat.
Inputs: no named parameters.
account_refreshA
Maintain an existing session without SMS or purchases. May rotate credentials. Repeated calls within 24h only verify; an unknown refresh outcome requires local login. Does not renew checkout runtime.
Inputs: account (required).
accounts_listARead-only
List connected aliases and local spending limits without exposing credentials.
Inputs: no named parameters.
capabilitiesARead-only
Report implemented features and explicitly unverified or unsupported flows.
Inputs: no named parameters.
cart_add_configuredAIdempotent
Add selected items/combos to an EMPTY cart once. Use live offer_id and explicit round/items choices from product_detail. Standard modifiers only. Does not order or pay; call checkout_quote next.
Inputs: items (required), request (required), idempotency_key (required).
cart_add_simpleBIdempotent
Add simple uncustomized menu items to an empty cart once. No order/payment; complex combos require official App configuration.
Inputs: items (required), request (required), idempotency_key (required).
cart_getBRead-only
Inspect exact products, quantities and combo choices currently selected in the official cart.
Inputs: request (required).
checkout_quoteARead-only
Validate the current cart, components, discounts, locker/time, wallet and price cap; create a 120-second quote.
Inputs: request (required).
checkout_submitBDestructiveIdempotent
REAL PURCHASE: create and McWallet-pay one fresh quoted order within the locally authorized policy. Repeated calls only reconcile.
Inputs: account (required), quote_id (required), idempotency_key (required).
order_payADestructiveIdempotent
Pay an existing locally CREATED order only if payment has never been attempted. All other states only query.
Inputs: account (required), attempt_id (required).
order_statusCRead-only
Reconcile the exact order, cashier and wallet. Never resubmits or consumes; cancellation overrides historical PAID.
Inputs: account (required), attempt_id (required).
pickup_slotsBRead-only
Get currently available pickup dates, times, and meal periods for a store.
Inputs: account (required), store_code (required).
product_detailCRead-only
Read live combo rounds, component choices, extra prices and supported standard configurations. No cart/order mutation.
Inputs: request (required), product_code (required), offer_id.
store_getCRead-only
Read a seven-digit restaurant code; availability is checked again for pickup time.
Inputs: account (required), store_code (required).
stores_favoritesBRead-only
Read this account's saved pickup restaurants.
Inputs: account (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Most tools target clearly distinct resources or actions, and the descriptions explicitly clarify boundaries around account, cart, and checkout. The closest overlap is between order_pay and checkout_submit because both involve real payment, but the existing-order versus fresh-quote distinction is stated.
All names use snake_case and are mostly resource_action, but the pattern is mixed: accounts_list and stores_favorites use plural resources while account_check and store_get use singular, and several names are noun_noun (order_status, product_detail). The conventions are readable but not fully consistent.
17 tools is slightly above the typical 3–15 range, but the domain has several separate stages—account, store/menu, cart, checkout, payment/status—so each tool is largely justified. It is on the heavy side but not excessive for a safety-critical ordering workflow.
The core purchase flow is covered from account check through menu, cart, quote, payment, and status. However, cart editing is limited to add-only operations with no remove/update/clear, and there are no tools for order cancellation, order history, or store search/favorites management.
Maintenance
Related MCP Connectors
Build custom POS apps with your AI agent. Final's MCP server gives developers what they need to ship a custom point of sale: scaffold a checkout flow, adapt vetted screen blueprints for counter POS, self-checkout kiosks, restaurant ordering and payment terminals, ground every call in Final's version-locked POS APIs, validate, boot a live preview and deploy to real hardware with integrated card payments. The same server also manages the store behind it: products, stock, orders, customers and sales reports. Remote Streamable HTTP with OAuth 2.1.
Hosted Shopify MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
MCP server for OnceAsk, the AI-native current-address layer for people and agents.
MCP server for Modern Treasury — payment orders, transactions, counterparties and ledgers.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA PRD-first multi-agent MCP server that wraps agent definitions, collaboration rules, and staged delivery into a local stdio service for standardized software delivery workflows.MIT
- AlicenseAqualityDmaintenanceMCP server for Chipotle — let AI agents find locations, browse menus, build custom orders, and checkout for pickup or delivery.1850 npmMIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that lets restaurants operate their point-of-sale through an LLM agent — edit menus, 86 items, check sales, restock inventory, monitor voids, and more via twenty tools over both stdio and Streamable HTTP transports with per-request tenancy from API keys.Apache 2.0
- AlicenseBqualityCmaintenanceA local-first MCP server that lets agents search and summarize a user's own WeChat history, with stable pagination, bulk chat workflows, unread/event queries, and gated enrichment tools.193MIT