YoyoLin008/mcreplay

Developer Tools

Turns a McDonald's China MCP query into de-valued structural snapshots you can diff and replay offline in tests.

190
10
Python
NOASSERTION
new today

If you maintain a parser or adapter against McDonald's China MCP, McReplay gives you a way to freeze one real response as structure, diff it later, and serve it back over stdio MCP so regression tests run without the network. The scope is narrow and that is the point; check the tool list and import format before adopting.

The problem

You have a working parser for responses from the McDonald's China MCP tools. Then a field's type changes, a campaign field disappears, or text comes back empty, and your adapter silently returns nothing. Debugging means re-querying the live service and guessing what changed between yesterday and today. McReplay changes that step: capture a real CallToolResult, strip the values while keeping the structure and MCP protocol markers, then compare two such packages to get a classified change report. The result is a locatable, repeatable test artifact instead of a manual before/after memory.

What's different

The mechanism is selective anonymization plus structural diffing. Incoming responses are validated, and strings, numbers and booleans become placeholders while field structure and protocol markers stay intact. compare then reports removed tools, new required parameters, vanished fields, and type or wrapping changes, tagged as breaking, review or info. A separate replay path serves a stored sample through a local stdio MCP server using the official Python MCP SDK, so an adapter can be exercised against recorded shapes.

The practical benefit is CI-shaped feedback: offline commands, documented exit codes (0 clean, 2 breaking, 3 manual review, 1 input or execution failure) and a standalone HTML report demo report. The trade-off is fidelity versus safety: because values are replaced, replay tests schema and parsing, not content or business logic tied to real values. The README also frames it around three read-only tools — now-time-info, campaign-calendar, list-nutrition-foods — so this is not a general MCP mocking tool. The author states all three were verified against official queries and local replay on 2026-10-24 live verification; that is the project's own record, not independent testing.

Who should try it

Good fit: an individual developer with a McDonald's MCP skill, parser or demo app who has been broken by a schema or field change and wants a stored sample plus a diff before touching adapter code. It also suits someone building a small CI check around recorded structures. Poor fit: anyone who needs to test value-dependent behavior, mock arbitrary third-party MCP servers, or work on Windows — the stated runtime is Python 3.11+ on Linux or macOS. If you only want a quick look, the offline mcreplay demo path with synthetic samples is the entry point and does not need official credentials.

Requirements and limitations

Python 3.11+ on Linux or macOS is a hard floor. Local replay needs the client config pointed at an absolute path inside the virtualenv, and the capture service expects an existing parent directory and a not-yet-existing output file; one capture process writes one new file, so a fresh observation means a new path and a restart. Capturing from the official service additionally needs https://mcp.mcd.cn access, Streamable HTTP, a Bearer Token, and a client that supports importing a SKILL.md directory; environment-variable expansion differs by client and must follow that client's documentation example config.

Ongoing upkeep matters more than installation: keep the private/ inputs and outputs local, give each import a new output name, and manage credentials in the client's secure config rather than in project files local data guidance. The comparison rules have a documented support boundary comparison scope, and the import format and field semantics are specified separately integration docs. Multi-client behavior is not promised; the README describes configuration per client.

HotRepo's take

HotRepo first tracked this repository on 2026-10-24 and recorded one snapshot: 190 total stars and #15 on the python NEW-REPOSITORY board on 2026-10-25. That is a single dated observation, not a daily growth series, so persistence cannot yet be judged. The narrow scope is coherent for one developer's workflow, but before investing, read the documented comparison rules and confirm the three recorded tools cover the responses your adapter actually parses.

Written by AI from the project's README, updated October 25, 2026. The project's own docs are the source of truth.