@csmodding/gameface-devtools-mcp 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -19
- package/dist/server.mjs +1184 -601
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ claude mcp add --env GAMEFACE_PORT=9444 --transport stdio gameface -- npx -y @cs
|
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
Claude Code and Codex CLI users can also install the
|
|
70
|
-
[coherent-gameface plugin](https://github.com/CitiesSkylinesModding/
|
|
70
|
+
[coherent-gameface plugin](https://github.com/CitiesSkylinesModding/agents-plugins)
|
|
71
71
|
instead, which bundles this server (no npm involved) plus skills that teach the agent the Gameface
|
|
72
72
|
workflows.
|
|
73
73
|
|
|
@@ -91,7 +91,7 @@ args = ["-y", "@csmodding/gameface-devtools-mcp@latest"]
|
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
Codex CLI users can also install the
|
|
94
|
-
[coherent-gameface plugin](https://github.com/CitiesSkylinesModding/
|
|
94
|
+
[coherent-gameface plugin](https://github.com/CitiesSkylinesModding/agents-plugins)
|
|
95
95
|
instead (see the note under Claude Code above).
|
|
96
96
|
|
|
97
97
|
### Gemini CLI
|
|
@@ -125,22 +125,27 @@ Or in `.vscode/mcp.json` (note the `servers` key, not `mcpServers`):
|
|
|
125
125
|
|
|
126
126
|
## Tools
|
|
127
127
|
|
|
128
|
-
| Tool | What it does
|
|
129
|
-
| ----------------- |
|
|
130
|
-
| `game_status` | Reachability + page target + engine info. Run first when things fail.
|
|
131
|
-
| `game_eval` | Evaluate a JS expression in the Gameface UI, returns the value as JSON.
|
|
132
|
-
| `game_screenshot` | Screenshot the viewport (or a selector's box) as an inline image.
|
|
133
|
-
| `game_dom` | DOM details (tag, classes, attributes, rect, outerHTML) for a CSS selector.
|
|
134
|
-
| `
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
137
|
-
| `
|
|
138
|
-
| `
|
|
139
|
-
| `
|
|
140
|
-
|
|
128
|
+
| Tool | What it does | Under the hood |
|
|
129
|
+
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
|
|
130
|
+
| `game_status` | Reachability + page target + engine info + view-reload tracking (count, last reload, context id). Run first when things fail. | `/json/list` + `/json/version` + `Runtime.executionContextCreated` |
|
|
131
|
+
| `game_eval` | Evaluate a JS expression in the Gameface UI, returns the value as JSON. | `Runtime.evaluate` (returnByValue) |
|
|
132
|
+
| `game_screenshot` | Screenshot the viewport (or a selector's box) as an inline image. | `Page.captureScreenshot` (+ `clip`) |
|
|
133
|
+
| `game_dom` | DOM details (tag, classes, attributes, rect, outerHTML) for a CSS selector. | `Runtime.evaluate` |
|
|
134
|
+
| `game_find` | Find elements by text (equals/contains/regex); returns rect + optional handles. | `Runtime.evaluate` |
|
|
135
|
+
| `game_wait` | Wait for a view reload and/or until a selector matches (optionally visible) or a JS predicate is truthy. | polled `Runtime.evaluate` + `Runtime.executionContextCreated` |
|
|
136
|
+
| `game_click` | Click an element by dispatching real bubbling DOM events. | `Runtime.evaluate` (see note) |
|
|
137
|
+
| `game_fill` | Set an input/textarea/contenteditable value. | `Runtime.evaluate` (see note) |
|
|
138
|
+
| `game_type` | Type text key by key (real KeyboardEvents + value sync). | `Runtime.evaluate` (see note) |
|
|
139
|
+
| `game_key` | Press a named key (Escape/Enter/arrows/…) as bubbling keydown+keyup, with modifiers/repeats. | `Runtime.evaluate` (see note) |
|
|
140
|
+
| `game_hover` | Hover an element (over/enter/move sequence) to trigger tooltips/hover state. | `Runtime.evaluate` (see note) |
|
|
141
|
+
| `game_console` | Recent `console.*`, log entries, and uncaught exceptions from the Gameface UI. | `Log` + `Runtime.consoleAPICalled` |
|
|
142
|
+
|
|
143
|
+
> [!IMPORTANT]
|
|
141
144
|
> **Input is done via DOM events, not CDP `Input`.** Gameface accepts `Input.dispatchMouseEvent` /
|
|
142
145
|
> `dispatchKeyEvent` but never delivers them to the UI. So `game_click`, `game_fill`, `game_type`,
|
|
143
|
-
> and `game_hover` dispatch real DOM events in the page.
|
|
146
|
+
> `game_key`, and `game_hover` dispatch real DOM events in the page. These reach the UI's own JS
|
|
147
|
+
> handlers, but not any input the game routes at the native/engine level (e.g. Escape-to-close is
|
|
148
|
+
> often handled natively and will not respond to a dispatched key).
|
|
144
149
|
|
|
145
150
|
### JS debugger tools
|
|
146
151
|
|
|
@@ -185,6 +190,7 @@ All are optional, read by the server from the environment:
|
|
|
185
190
|
## Development
|
|
186
191
|
|
|
187
192
|
The server is developed in the
|
|
188
|
-
[
|
|
189
|
-
repository, where this package lives as the `mcp/` workspace. See the
|
|
190
|
-
development setup, and
|
|
193
|
+
[agents-plugins](https://github.com/CitiesSkylinesModding/agents-plugins)
|
|
194
|
+
repository, where this package lives as the `plugins/coherent-gameface/mcp/` workspace. See the
|
|
195
|
+
repository README for the development setup, and the plugin's `AGENTS.md`
|
|
196
|
+
(`plugins/coherent-gameface/AGENTS.md`) for the verified Gameface CDP behavior matrix.
|