PlayCanvas Editor MCP server

Enables real-time interaction with the PlayCanvas game engine through a Chrome extension that injects WebSocket capabilities into the Editor, allowing creation and modification of game objects, assets, and scene settings.
Back to servers
Provider
PlayCanvas
Release date
Mar 23, 2025
Language
TypeScript
Stats
41 stars

PlayCanvas MCP Server provides automation for the PlayCanvas Editor using an LLM (Large Language Model), allowing you to control the editor through commands processed by Claude. This integration connects the PlayCanvas web-based editor with AI-powered automation to streamline your workflow.

Installation

Prerequisites

  • Node.js and npm installed
  • Chrome browser
  • Anthropic's Claude (Pro subscription recommended as the free tier may not provide sufficient context)

Setup Process

First, install the required dependencies:

npm install

Chrome Extension Installation

To connect the MCP Server with PlayCanvas Editor:

  1. Open Chrome and navigate to chrome://extensions/
  2. Enable "Developer mode" using the toggle in the top-right corner
  3. Click "Load unpacked" and select the extensions folder from the project
  4. The extension should now be installed and visible in your extensions list

MCP Server Configuration

The MCP Server can be driven by either Claude Desktop (recommended) or Cursor.

Option 1: Claude Desktop Setup

  1. Download and install Claude Desktop
  2. Open Claude and navigate to Claude > Settings
  3. Select Developer then Edit Config
  4. This will open your claude_desktop_config.json file for editing

Option 2: Cursor Setup

  1. Download and install Cursor
  2. Go to File > Preferences > Cursor Settings
  3. Click + Add new global MCP server
  4. This will open your mcp.json configuration file

For Cursor users, it's recommended to:

  • Activate Enable auto-run mode in the Chat section under Features (this allows the LLM to run MCP tools without requiring constant authorization)
  • Ensure you have Agent mode selected (not Ask or Edit modes)

MCP Configuration File

Configure your MCP server with the following JSON (adjust path according to your installation):

For Windows:

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

For macOS:

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

Connecting to PlayCanvas Editor

After setting up the MCP Server, you need to connect it to the PlayCanvas Editor:

  1. Open PlayCanvas Editor in Chrome
  2. Click the Extensions icon in your Chrome toolbar
  3. Select the "PlayCanvas Editor MCP Extension" from the dropdown
  4. Click the "CONNECT" button in the extension popup (ensure the port matches what you specified in your config file, default is 52000)

Note that you can only connect one instance of the PlayCanvas Editor to the MCP Server at a time.

Available Tools

The MCP Server provides various tools for automating PlayCanvas Editor tasks:

Entity Tools

  • List entities using list_entities
  • Create entities with create_entities
  • Delete entities using delete_entities
  • Duplicate entities with duplicate_entities
  • Modify entities using modify_entities
  • Reparent entities with reparent_entity
  • Add components using add_components
  • Remove components with remove_components
  • Add script component scripts via add_script_component_script

Asset Tools

  • List assets using list_assets
  • Create assets with create_assets
  • Delete assets using delete_assets
  • Instantiate template assets via instantiate_template_assets
  • Set script content with set_script_text
  • Parse scripts using script_parse
  • Set material diffuse properties via set_material_diffuse

Scene Tools

  • Query scene settings with query_scene_settings
  • Modify scene settings using modify_scene_settings

Asset Store Tools

  • Search the store with store_search
  • Get store items using store_get
  • Download assets via store_download

Once connected, you can issue these commands through Claude Desktop or Cursor to automate your PlayCanvas Editor workflow.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later