██████╗ ██╗ █████╗ ██╗ ██╗ ██████╗ █████╗ ███╗ ██╗██╗ ██╗ █████╗ ███████╗
██╔══██╗██║ ██╔══██╗╚██╗ ██╔╝██╔════╝██╔══██╗████╗ ██║██║ ██║██╔══██╗██╔════╝
██████╔╝██║ ███████║ ╚████╔╝ ██║ ███████║██╔██╗ ██║██║ ██║███████║███████╗
██╔═══╝ ██║ ██╔══██║ ╚██╔╝ ██║ ██╔══██║██║╚██╗██║╚██╗ ██╔╝██╔══██║╚════██║
██║ ███████╗██║ ██║ ██║ ╚██████╗██║ ██║██║ ╚████║ ╚████╔╝ ██║ ██║███████║
╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═══╝ ╚═╝ ╚═╝╚══════╝
███╗ ███╗ ██████╗██████╗ ███████╗███████╗██████╗ ██╗ ██╗███████╗██████╗
████╗ ████║██╔════╝██╔══██╗ ██╔════╝██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗
██╔████╔██║██║ ██████╔╝ ███████╗█████╗ ██████╔╝██║ ██║█████╗ ██████╔╝
██║╚██╔╝██║██║ ██╔═══╝ ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██╔══╝ ██╔══██╗
██║ ╚═╝ ██║╚██████╗██║ ███████║███████╗██║ ██║ ╚████╔╝ ███████╗██║ ██║
╚═╝ ╚═╝ ╚═════╝╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝
An MCP Server for automating the PlayCanvas Editor using an LLM.
Important
At the moment, the MCP Server needs to be driven by Anthropic's Claude. Our experience shows that the free tier for Claude does not deliver a big enough chat context to operate the MCP Server reliably. Therefore, we strongly recommend subscribing to a Pro Claude account.
- Entity
list_entitiesresolve_entitiescreate_entitiesdelete_entitiesduplicate_entitiesmodify_entitiesreparent_entityadd_componentsremove_componentsadd_script_component_scriptattach_script
- Asset
list_assetscreate_assetsdelete_assetsinstantiate_template_assetsset_script_textscript_parseset_material_diffuseset_material_properties
- Scene
query_scene_settingsmodify_scene_settings
- Store
store_searchstore_getstore_download
- Viewport
capture_viewportfocus_viewport
- Runtime (live Launch instance)
launch_startlaunch_stopcapture_runtimeread_runtime_logsinject_input
The runtime tools drive a real Launch instance (the editor's Launch button) so you can verify that a scene actually runs, not just how it looks at edit time:
launch_startopenshttps://launch.playcanvas.com/<sceneId>?debug=truein a new window. The extension injects a content script there that connects back to the MCP server as the "runtime" peer.launch_startreturns{ url, sceneId, ready }.capture_runtimescreenshots the running app (scripts/physics/animation active).read_runtime_logsreturns the app'sconsoleoutput + uncaught exceptions/rejections (newest first, paginated; defaults to warnings + errors).inject_inputdispatches keyboard / mouse / touch events to the running app (e.g. holdWfor 500ms, click at a canvas coordinate, tap the screen), so you can drive end-to-end interactions and then verify withcapture_runtime.launch_stopcloses the launch window.
Notes:
- Allow pop-ups for the editor origin, otherwise
launch_startcannot open the window. - The launch page uses your existing PlayCanvas login session (same browser), so no extra auth step is needed.
- Reload the unpacked extension in
chrome://extensions/after updating it so the new launch content script + permissions take effect.
Every tool returns a single, consistent envelope so agents can pattern-match on a stable shape:
Notes for tool authors / agents:
- Errors never use a top-level
errorfield; they setmeta.status = "error"and put an actionable message inmeta.message(the protocol-levelisErrorflag is also set). - Empty results (
list_*,resolve_entities) are a successful empty list, not an error. - Pagination:
list_entities/list_assetsacceptlimit(default 50) +offset. Page usingmeta.nextCursor(pass it back asoffset) and stop whenmeta.hasMoreisfalse. - State snapshots: mutating tools (
create_entities,modify_entities,add_components,reparent_entity,duplicate_entities,instantiate_template_assets, …) return the resulting entity/asset summaries — including a human-readable hierarchypath— so you rarely need a follow-uplist_entitiescall. - Annotations: read-only tools declare
readOnlyHint, destructive tools (delete_*) declaredestructiveHint, and store tools declareopenWorldHint(they reach the network). - Image tools (
capture_viewport) return a protocolimageblock plus a paralleltextblock carrying the samemeta.
Run npm install to install all dependencies.
- Visit
chrome://extensions/and enable Developer mode - Click
Load unpackedand select theextensionfolder - Load the PlayCanvas Editor. The extension should be loaded.
The MCP Server can be driven by Cursor or Claude Desktop.
Tip
We have found Claude Desktop to be generally more reliable.
- Install Claude Desktop.
- Go to
Claude>Settings. - Select
Developerand thenEdit Config. - This will open
claude_desktop_config.json, your MCP Config JSON file.
- Install Cursor.
- Select
File>Preferences>Cursor Settings. - Click
+ Add new global MCP server. - This will open
mcp.json, your MCP Config JSON file.
Tip
Also in Cursor Settings, select Features and scroll to the Chat section. Activate Enable auto-run mode to allow the LLM to run MCP tools without requiring constant authorization. You do this at your own risk (but we prefer it)!
Important
In Cursor, ensure you have Agent selected. Ask and Edit modes will not recognize the MCP Server.
This is how your config should look:
Windows
{
"mcpServers": {
"playcanvas": {
"command": "cmd",
"args": [
"/c",
"npx",
"tsx",
"C:\\path\\to\\editor-mcp-server\\src\\server.ts"
],
"env": {
"PORT": "52000"
}
}
}
}macOS
{
"mcpServers": {
"playcanvas": {
"command": "npx",
"args": [
"tsx",
"/path/to/editor-mcp-server/src/server.ts"
],
"env": {
"PORT": "52000"
}
}
}
}The PlayCanvas Editor does not connect to the MCP Server automatically. To connect:
- Activate a Chrome tab running the PlayCanvas Editor.
- Select the Extensions icon to the right of the address bar.
- Select PlayCanvas Editor MCP Extension to open the extension popup.
- Select
CONNECT(the port number should match what is set in your MCP Config JSON File).
Note
You can currently only connect one instance of the PlayCanvas Editor to the MCP Server at any one time.
You should now be able to issue commands in Claude Desktop or Cursor.
{ "data": <result> | null, // business payload; an empty set is [], never an error "meta": { "tool": "entities:list", "status": "ok" | "error", "message": "...", // present only on error; actionable, with a recovery hint // list tools also include pagination metadata: "total": 120, "count": 50, "hasMore": true, "nextCursor": "50" } }