MCP HubMCP Hub
playcanvas

editor-mcp-server

by: playcanvas

MCP Server for AI automation of the PlayCanvas Editor

38created 18/03/2025
Visit
PlayCanvas
Automation

📌Overview

Purpose: The MCP Server aims to automate the PlayCanvas Editor by utilizing a large language model (LLM) for enhanced efficiency and functionality.

Overview: The MCP Server serves as an intermediary tool that leverages an advanced LLM, specifically Claude, to facilitate various operations within the PlayCanvas Editor. Its architecture supports an extensive set of commands designed for seamless integration and automation of game development tasks.

Key Features:

  • Automation of Game Development Tasks: The server allows users to create, modify, and delete entities and components in the PlayCanvas Editor, streamlining the development process and reducing manual effort.

  • Support for Advanced Configuration: Users can configure the server via JSON files, allowing for personalized setup depending on the operating system (Windows or macOS).


MCP Server for Automating the PlayCanvas Editor

An MCP Server for automating the PlayCanvas Editor using an LLM.

Important
Currently, the MCP Server requires Anthropic's Claude. The free tier for Claude does not provide enough chat context for reliable MCP Server operation. A Pro Claude account subscription is strongly recommended.

Available Tools

  • Entity

    • list_entities
    • create_entities
    • delete_entities
    • duplicate_entities
    • modify_entities
    • reparent_entity
    • add_components
    • remove_components
    • add_script_component_script
  • Asset

    • list_assets
    • create_assets
    • delete_assets
    • instantiate_template_assets
    • set_script_text
    • script_parse
    • set_material_diffuse
  • Scene

    • query_scene_settings
    • modify_scene_settings
  • Store

    • store_search
    • store_get
    • store_download

Installation

Run npm install to install all dependencies.

Install Chrome Extension

  1. Visit chrome://extensions/ and enable Developer mode.
  2. Click Load unpacked and select the extensions folder.
  3. Load the PlayCanvas Editor. The extension should be loaded.

Run MCP Server

The MCP Server can be driven by Cursor or Claude Desktop.

Tip
Claude Desktop tends to be more reliable.

Claude Desktop

  1. Install Claude Desktop.
  2. Go to Claude > Settings.
  3. Select Developer and then Edit Config.
  4. This opens claude_desktop_config.json, your MCP Config JSON file.

Cursor

  1. Install Cursor.
  2. Select File > Preferences > Cursor Settings.
  3. Click + Add new global MCP server.
  4. This opens mcp.json, your MCP Config JSON file.

Tip
In Cursor Settings, under Features > Chat, activate Enable auto-run mode. This allows the LLM to run MCP tools without constant authorization. Use at your own risk.

Important
In Cursor, ensure Agent mode is selected. Ask and Edit modes will not recognize the MCP Server.

MCP Config JSON File Examples

Windows

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

macOS

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

Connecting the Editor to the MCP Server

The PlayCanvas Editor does not connect automatically to the MCP Server. To connect:

  1. Activate a Chrome tab running the PlayCanvas Editor.
  2. Select the Extensions icon to the right of the address bar.
  3. Select PlayCanvas Editor MCP Extension to open the popup.
  4. Select CONNECT (port number must match your MCP Config JSON file).

Note
Only one PlayCanvas Editor instance can connect to the MCP Server at a time.

You can now issue commands in Claude Desktop or Cursor.