Home / MCP / PlayCanvas Editor MCP Server

PlayCanvas Editor MCP Server

Automates the PlayCanvas Editor using an LLM via MCP to manage entities, assets, scenes, and stores.

typescript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "playcanvas_http": {
            "url": "https://mcp-playcanvas.example.com/mcp"
        }
    }
}

You can run an MCP Server to automate the PlayCanvas Editor using an LLM, enabling scripted editing capabilities, asset and scene management, and more through a single configurable endpoint.

How to use

Connect your MCP client to the local MCP Server and issue commands to manage entities, assets, scenes, and store data. The server exposes a set of tools that let you list, create, modify, and delete entities and assets, query and adjust scene settings, and perform store operations. When you initiate the server, it listens on a configured port and accepts orchestration commands from your chosen MCP client (such as Claude Desktop or Cursor). You can drive the server from an LLM-enabled workflow to automate repetitive editor tasks, implement templates, and run custom editor scripts.

How to install

Prerequisites: You need Node.js and npm installed on your machine.

1. Install required dependencies.

npm install

2. Install the Chrome extension for the PlayCanvas Editor (optional for workflow integration). Enable Developer mode in Chrome and load the unpacked extension from the extensions folder.

3. Start the MCP Server using one of the supported local MCP runners (Cursor or Claude Desktop). Follow the dedicated setup for your chosen runner to create the MCP config and launch the server.

Configuration and connection notes

The MCP Server is designed to be driven by Claude Desktop or Cursor. Claude Desktop is generally more reliable for long-running sessions, and Cursor offers convenient in-editor management. You will configure the MCP endpoint in a local JSON file that describes how to start the server and on which port it listens.

To connect the editor client to the MCP Server, open the PlayCanvas Editor in a Chrome tab, access the extension popup via the Extensions icon, and choose CONNECT with the port matching your MCP Config settings. You can connect only one PlayCanvas Editor instance at a time.

MCP Config JSON (examples)

The following configurations show how to run the local MCP server from a standard setup.

{
  "mcpServers": {
    "playcanvas": {
      "command": "npx",
      "args": [
        "tsx",
        "/path/to/mcp-editor/src/server.ts"
      ],
      "env": {
        "PORT": "52000"
      }
    }
  }
}

Multiple startup methods (per platform)

Windows and macOS start commands differ slightly but lead to the same runtime target. Use the appropriate configuration block for your environment.

// Windows
{
  "mcpServers": {
    "playcanvas": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "tsx",
        "C:\\path\\to\\mcp-editor\\src\\server.ts"
      ],
      "env": {
        "PORT": "52000"
      }
    }
  }
}
```
```json
// macOS
{
  "mcpServers": {
    "playcanvas": {
      "command": "npx",
      "args": [
        "tsx",
        "/path/to/mcp-editor/src/server.ts"
      ],
      "env": {
        "PORT": "52000"
      }
    }
  }
}

Available tools

Entity.list_entities

List all entities in the current scene.

Entity.create_entities

Create new entities with specified components and properties.

Entity.delete_entities

Remove entities by ID or filter.

Entity_duplicate_entities

Duplicate existing entities with optional renaming.

Entity_modify_entities

Modify properties of existing entities.

Entity_reparent_entity

Change the parent-child hierarchy of entities.

Entity_add_components

Add components to an entity.

Entity_remove_components

Remove components from an entity.

Entity_add_script_component_script

Attach script component scripts to an entity.

Asset.list_assets

List assets in the project or a specific folder.

Asset_create_assets

Create new assets from templates or raw data.

Asset_delete_assets

Delete assets by ID or path.

Asset_instantiate_template_assets

Instantiate assets from templates into the project.

Asset_set_script_text

Set or update the text of a script asset.

Asset_script_parse

Parse and validate script assets.

Asset_set_material_diffuse

Update the diffuse color of a material.

Scene.query_scene_settings

Retrieve current scene settings.

Scene_modify_scene_settings

Modify scene-wide settings such as lighting, skybox, or physics.

Store.store_search

Search the store for assets or templates.

Store.store_get

Retrieve details for a store item.

Store.store_download

Download a store item into the project.