The game as a local MCP server: play, inspect and debug it from an AI client

scripts/mcp.js speaks MCP over stdio and loads the game from src/ in jsdom,
seeded, like the tests. Tools: new_game, load_save, export_save, status,
advance (with per-day timings), network, city, find, traceroute,
peering_check, hot_spots, actions, act, screen, panel, click, open_link.
Actions go through ACT as buttons do; files, slots, settings and the clock
stay out of reach, and nothing evaluates code in the page. Nothing is
hosted and the page is unchanged. See docs/MCP.md.
This commit is contained in:
Frederic Jung 2026-11-01 18:04:22 +00:00
parent 935c08839f
commit 37def9dd6b
No known key found for this signature in database
9 changed files with 733 additions and 1 deletions

View file

@ -56,6 +56,7 @@ npm run dev # development server: assembles src/ on every request, reloads on
npm test # headless tests: boot, geography, a year of play, every incident, every panel
npm run build # writes the site for GitHub Pages to _site/, with version and date stamped in
npm run i18n:check # lists text missing from (or stale in) the translations
npm run mcp # the game as an MCP server, so an AI client can play and debug it (docs/MCP.md)
```
## Community