AI Assistants
mavonengine mcp is a Model Context Protocol server over stdio. It lets an AI coding assistant look at your running game — the game server and the game tabs open in a browser — and read this documentation. It works with any MCP client and model: Claude Code, Cursor, VS Code, Codex, Gemini CLI, Zed, or a local model.
Every tool is read-only.
Setup
Projects made with mavonengine create include a .mcp.json, so clients that read it (such as Claude Code) pick the server up automatically. For other clients, register it as a stdio server:
{
"mcpServers": {
"mavonengine": { "command": "npx", "args": ["-y", "@mavonengine/cli", "mcp"] }
}
}
It takes --host, --port, --url (the server's base URL, e.g. http://localhost:8050) and --token (the metrics or the admin token) like the dashboard. When Vite serves the client on its own port, pass --client-url, e.g. http://localhost:5173.
Game server tools
| Tool | |
|---|---|
server_status | Uptime, tick time against its budget, CPU, bandwidth, memory, player / entity / physics counts |
server_metrics | The full metrics snapshot, optionally with its per-second history |
list_players | Connected players with position and connection details |
get_scene | The active scene: file, hot reload, unsaved changes, settings and objects (dev only) |
list_entities | Entities in the world, filtered by type and distance to a point (dev only) |
get_entity | One entity with the state it sends to clients (dev only) |
recent_logs | Server log lines, filtered by level and text |
recent_requests | HTTP requests the server answered, filtered by path and status |
network_packets / network_packet | Packets the server sent and received and its network events, per client: size, tick, input sequence id; and one packet with its payload (dev only) |
network_sync | Who is sent what: each player's tracked entities and last state update, and by how many players each entity is tracked (dev only) |
The scene, entity and network tools read GET /api/game/dev/*, which only exists when NODE_ENV is not production.
Client tools
For the game tabs open while Vite serves the client in dev:
| Tool | |
|---|---|
list_clients | Open tabs: page, editor or player, the player's id on the server, visibility, FPS |
client_status | Draw calls and triangles, GPU geometries / textures / programs, JS heap, canvas, camera |
client_entities / client_entity | The tab's world, in the same shape as the server's, with its local player marked |
client_scene | The scene loaded in the tab, and which objects the client built |
client_network | Connection, ping, inputs not yet acknowledged by the server, and the last state update: its server tick, ack and age |
client_packets / client_packet | Packets the tab sent and received and its network events, and one packet with its payload |
network_timeline | The server's records for one tab and the tab's own, merged by time |
client_logs | Console output, uncaught errors and unhandled rejections |
client_screenshot | What the tab renders, as an image (the WebGL canvas, without HTML UI) |
client_trace | Records a few seconds and analyses frame times, CPU vs GPU, composer passes, ticks, WebGL work, the bottleneck and the worst hitches. Saves a trace file for Perfetto, chrome://tracing or speedscope |
compare_entity | One entity on the server next to a tab's copy: position / rotation / scale deltas and differing fields |
Client tools take a clientId from list_clients; without one they ask the only open tab, or the only one not running the editor.
They go through the dev bridge of the Vite plugin in @mavonengine/core/vite.config. It is only added in dev, never in builds; turn it off with mavonEnginePlugins({ devBridge: false }).
To let compare_entity match your own player with the server's, set game.localPlayer to the entity the tab controls: the server keys players by socket id, which the client often doesn't.
The network tools read what both sides record while developing, see network debugging. network_timeline orders the two sides by their own clocks, which line up on one machine.
Plugin tools
| Tool | |
|---|---|
list_plugins | The plugins in the project's mavonengine.json: version, whether each is enabled and runs on the server, its prefabs and the HTTP endpoints it registered |
available_plugins | The official plugins: what each does, where it runs, the command that installs it, and whether the project already has it |
plugin_readme | The README of one of them as Markdown: its options, how a game hooks into it and its limits |
With these an assistant can suggest a plugin instead of building what one already does, and set it up from its readme. It can't install one: every tool is read-only, so it hands you the command. available_plugins and plugin_readme read GitHub when they are used; --plugins-url or MAVONENGINE_PLUGINS_URL points them at another list, --no-plugin-list leaves them out.
Database tools
For the project's database plugin, such as @mavonengine/sqlite:
| Tool | |
|---|---|
database_overview | Which plugin gives the database, every table with the plugin it belongs to, its columns and row count, and the migrations each plugin ran |
database_rows | A page of one table's rows, with the total |
They read through the server's GET /api/game/database endpoints, so they work with any database plugin and only read. Like the dashboard's Database tab they need the server's admin token as --token, unless the server runs on the same machine without one.
What a tool returns goes to the assistant's model, so database_rows replaces the values of columns that look secret, such as password and session token hashes, with [redacted] and lists them in redacted.
Documentation tools
| Tool | |
|---|---|
docs_list_pages | Every docs page with its path, title, description and category |
docs_get_page | One docs page as Markdown, by path (e.g. /networking/state-sync) |
They are passed through to the MCP server of mavonengine.com (https://mavonengine.com/mcp), so answers come from the current docs. --docs-url points them at another docs server, --no-docs leaves them out.