PlayCanvas Editor MCP Server
| User Manual | API Reference | Blog | Forum |
An MCP server for automating the PlayCanvas Editor with an LLM. The MCP client is built into the Editor — no browser extension needed. Install the server into your MCP client of choice (Claude Code, Codex, Claude Desktop, Cursor, …) and connect the Editor to it.
Installation
Requires Node.js 22.18+. The server is published to npm as @playcanvas/editor-mcp-server — a self-contained, zero-dependency bundle — so every client below runs it with npx. Nothing to clone or build.
Claude Code
claude mcp add playcanvas -- npx -y @playcanvas/editor-mcp-server
To share the server with everyone working on a repo, commit a .mcp.json to the project root instead:
{
"mcpServers": {
"playcanvas": {
"command": "npx",
"args": ["-y", "@playcanvas/editor-mcp-server"]
}
}
}
Codex
The Codex CLI and the Codex app share ~/.codex/config.toml, so one command covers both:
codex mcp add playcanvas -- npx -y @playcanvas/editor-mcp-server
On Windows, use
codex mcp add playcanvas -- cmd /c npx -y @playcanvas/editor-mcp-server. If the server times out on first run (whilenpxdownloads the package), raisestartup_timeout_secunder[mcp_servers.playcanvas]in~/.codex/config.toml. ChatGPT itself only supports remote MCP connectors, so Codex is the OpenAI surface to use.
Claude Desktop
Go to Claude > Settings > Developer > Edit Config and add to claude_desktop_config.json:
{
"mcpServers": {
"playcanvas": {
"command": "npx",
"args": ["-y", "@playcanvas/editor-mcp-server"]
}
}
}
On Windows, use
"command": "cmd"and"args": ["/c", "npx", "-y", "@playcanvas/editor-mcp-server"].
Cursor
Select File > Preferences > Cursor Settings > MCP > Add new global MCP server and add the same JSON as for Claude Desktop.
Custom Port
The server listens for the Editor on WebSocket port 52000 by default. To change it, append --port <number> to the npx args and set the same port in the Editor's MCP popover.
Connecting the Editor
- Open your project in the PlayCanvas Editor.
- Click the MCP button at the bottom of the toolbar (below the Publish button).
- Check that the port matches your MCP config (default
52000) and clickCONNECT.
You can now issue commands from your MCP client.
Only one Editor instance can be connected to the MCP server at a time.
Available Tools
| Category | Tools |
|---|---|
| Entity | list_entities, resolve_entities, create_entities, delete_entities, duplicate_entities, modify_entities, reparent_entity, add_components, remove_components, add_script_component_script, attach_script |
| Asset | list_assets, create_assets, delete_assets, instantiate_template_assets, set_script_text, script_parse, set_material_diffuse, set_material_properties |
| Scene | query_scene_settings, modify_scene_settings |
| Store | store_search, store_get, store_download |
| Viewport | capture_viewport, focus_viewport |
| Runtime | launch_start, launch_stop, capture_runtime, read_runtime_logs, query_runtime_state, inject_input |
The Runtime tools drive a real Launch instance (the Editor's Launch button) so an agent can verify that a scene actually runs: screenshot the running app, read its console output, query live entity state, and inject keyboard/mouse/touch input. Allow pop-ups for the editor origin so launch_start can open the launch window — it reuses your existing PlayCanvas login session.
Every tool returns a consistent { data, meta } envelope: meta.status is ok or error (with an actionable message), list tools paginate via limit/offset and meta.nextCursor, and mutating tools return the resulting entity/asset summaries so follow-up list calls are rarely needed.
Development
To hack on the server itself, ensure you have Node.js 22.18 or later installed. Follow these steps:
Clone the repository:
git clone https://github.com/playcanvas/editor-mcp-server.git cd editor-mcp-serverInstall dependencies:
npm installStart the server (Node runs the TypeScript source directly — no build step):
npm run watchPoint your MCP client at the checkout instead of the npm package with
"command": "node"and"args": ["/path/to/editor-mcp-server/src/server.ts"].
npm run debug starts the server under the MCP Inspector and npm run build produces the self-contained bundle that gets published.