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:
parent
935c08839f
commit
37def9dd6b
9 changed files with 733 additions and 1 deletions
|
|
@ -28,6 +28,7 @@ npm run build # builds _site/ for GitHub Pages (assembles src/, s
|
|||
npm run serve # build and serve the production site locally
|
||||
npm run perf -- --base-ref origin/main # big-network benchmark vs main (see `performance`)
|
||||
npm run perf -- --base-ref origin/main --browser # the same, also in real Chromium (desktop and phone)
|
||||
npm run mcp # the game as a local MCP server for AI clients (docs/MCP.md)
|
||||
```
|
||||
|
||||
## Hard rules
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue