Skip to content
SiteEmail

The Gameface MCP server connects a coding agent to a running Gameface Player through the Chrome DevTools Protocol .

Once connected, the agent reads Gameface’s own warnings, inspects the DOM it produced, captures screenshots, and checks that text fits inside its box, rather than describing what it expects to have built.

Without a connection, every iteration routes through a person. The agent writes markup, someone runs the Player or Game, someone describes what looks wrong, and the agent revises. What the agent never observes is what Gameface did with its code—the information that settles the question.

The console is the clearest signal. Gameface warns about CSS it cannot resolve, diagnosing Gameface-specific bugs faster than any other available feedback. That warning means nothing while it sits unread.

  • Node.js 18+, since the server uses the global fetch API.
  • A local Gameface SDK with a Player executable. The repository does not ship one, so a Gameface licence and SDK are required. On Windows the executable normally sits at .../Player/Player.exe. Note that Player.exe lives in a Player subfolder under the SDK root rather than at the root itself.
  • Gameface 3.1.2 or newer, for the reasons covered in Version Awareness.
  1. add-mcp detects the installed agents and writes the server into each one’s config.

    Available in every project on the machine:

    Terminal window
    npx add-mcp "npx -y gameface-mcp@latest" --name gameface -g
  2. Start the agent and ask it to launch the Gameface Player. On first launch it asks for the Player path (Player.exe, its folder, or the SDK folder) or offers to search the machine. The path is saved to ~/.gameface-mcp/config.json and reused by every project.

  3. The Gameface UI Conductor skill clarifies requirements, gets sign-off on a spec, then implements and validates with the MCP tools:

    Terminal window
    npx skills add CoherentLabs/Gameface-MCP --agent claude-code -g

    Drop -g to install into the current project only. Start a new session afterwards.

add-mcp writes the following entry for each detected client. No manual editing is needed.

Global: ~/.claude.json. Project: .mcp.json.

.mcp.json
{
"mcpServers": {
"gameface": {
"command": "npx",
"args": ["-y", "gameface-mcp@latest"]
}
}
}

Commands are shortcuts for launching and managing Players mid development. They appear as slash commands, in Claude Code as /mcp__gameface__<command>. Arguments are positional, and true, yes, y and 1 all count as yes.

/mcp__gameface__launch-player
/mcp__gameface__launch-player http://localhost:3000

Launches the default Player, optionally opening a URL.

/mcp__gameface__scan-players

Runs a search script inside the server and adds every Player found. The agent only sees the resulting list, not your files. The default Player is unchanged.

/mcp__gameface__change-player-path asks for a new default Player path. Pass true to search the machine instead.

These tools are rarely invoked by hand. Knowing what exists establishes what can reasonably be requested, and what to demand evidence of.

ToolFunction
get_console_logsBuffered console output plus Log-domain entries, including unsupported-feature warnings
get_computed_stylesComputed CSS for a node, meaning what Gameface kept rather than what was written
get_dom_tree / search_domSnapshot of the DOM, or nodes matching a text or XPath query
take_screenshotFull page, viewport, or a custom clip rect
eval_jsRuns JavaScript in the connected page
interact_elementClick, type, hover, focus, scroll into view, or touch
AssertionCheck performed
assert_text_fitsWhether an element’s content overflows its own box
assert_no_overlapWhether two elements’ rendered boxes intersect
assert_within_parentWhether an element stays inside its parent, an ancestor, or the viewport

perf_lint is a static check for expensive layout patterns like align-items: stretch, unsized flex items, and misuse of display: simple. No timing involved, so it does not flake.

perf_measure runs a fixed frame-timing scenario and reports p50, p95, and p99 against a recorded baseline.

Alongside the tools, the server exposes the documentation corpus and the engine constraints as MCP resources, gameface://code-instructions and gameface://rag/<file>.md. The next article covers both.

Gameface 3.1.2 or newer is required. This version introduced CDP protocol support, including engine logs through the Chrome DevTools Protocol.

The minimum version is verified at connection time via cohtmlVersion. Some older versions have CDP quirks that the server works around, but a tool returning unexpected output may indicate an engine-side gap.

Ask the agent to launch the Player and screenshot the current view. An image and a cohtmlVersion returning together confirm a live connection. A description of what the agent expects the screen to look like means the server is not connected.