home / mcp / cocos mcp server

Cocos MCP Server

一款全面的、便捷的cocos creator AI MCP服务插件,适用于3.8.0以上cocos版本,一键安装,一键启动。A comprehensive and convenient cocos creator AI MCP service plug-in, suitable for cocos versions above 3.8.0, one-click installation and one-click start.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "daxianlee-cocos-mcp-server": {
      "url": "http://127.0.0.1:3000/mcp"
    }
  }
}

You install and run a dedicated MCP server for Cocos Creator 3.8+ that lets an AI assistant interact with the editor through a standardized protocol. With a single setup, you unlock automated scene, node, prefab, asset, and project operations, plus debugging, preferences, server messaging, and more, all accessible from your preferred MCP client.

How to use

To use the MCP server with an MCP client, start the server panel from your editor’s Extensions menu and ensure the HTTP endpoint is reachable at the configured port. Your MCP client connects to the endpoint to issue actions such as opening scenes, querying nodes, creating prefabs, managing assets, running the project, and broadcasting messages. The server exposes a comprehensive set of capabilities that map to editor operations, enabling you to automate repetitive tasks, integrate AI-driven workflows, and coordinate complex editor interactions through standard requests.

How to install

Prerequisites you need before installation:

1. Install Cocos Creator 3.8.6 or higher on your system.

2. Ensure Node.js is available in your environment (Cocos Creator provides Node.js as part of the editor bundle, but you may need it for building the plugin).

3. Prepare your project for extensions by creating an extensions folder if it does not exist.

Available tools

scene_management

Scene management tools for getting the current scene, opening, saving, creating, and closing scenes, plus scene list queries.

scene_hierarchy

Retrieve full scene structure, including component information, and inspect scene hierarchy.

scene_execution_control

Execute methods on components, run scene scripts, and synchronize prefabs.

node_query

Query nodes by name or pattern, retrieve node information, and detect 2D/3D types.

node_lifecycle

Create or delete nodes, support component preloading and prefab instantiation.

node_transform

Modify node name, position, rotation, scale, visibility, and other transform properties.

node_hierarchy

Move, copy, and paste nodes within the hierarchy.

node_clipboard

Copy, paste, and cut nodes via a clipboard-like mechanism.

node_property_management

Reset node properties, component properties, and transform attributes.

component_manage

Add or remove engine components like cc.Sprite, cc.Button, etc.

component_script

Attach or remove custom script components from nodes.

component_query

List components, view detailed information, and discover available component types.

set_component_property

Set values for properties on one or multiple components.

prefab_browse

List prefabs, view prefab information, and validate prefab files.

prefab_lifecycle

Create and delete prefabs from node structures.

prefab_instance

Instantiate prefabs into the scene, detach links, apply changes, and revert.

prefab_edit

Enter/exit prefab edit mode, save prefabs, and test changes.

asset_manage

Import, delete, and manage asset metadata and URLs.

asset_analyze

Analyze asset dependencies and export asset manifests.

asset_system

Refresh assets and query asset database status.

asset_query

Query assets by type or folder and retrieve detailed information.

asset_operations

Create, copy, move, delete, save, or re-import assets.

project_manage

Run projects, build projects, and retrieve project information and settings.

project_build_system

Control the build panel, monitor build status, and manage local servers.

debug_console

Retrieve and clear console logs with filtering and limits.

debug_logs

Read, search, and analyze project logs with pattern matching.

debug_system

Fetch editor information, performance statistics, and environment details.

preferences_manage

Get and set editor preferences.

preferences_global

Manage global configurations and system settings.

server_info

Query server status, project details, and environment information.

broadcast_message

Listen for and broadcast custom messages within the editor context.

reference_image_manage

Add or remove reference images used in scene views.

reference_image_view

Control the display and editing of reference images.

scene_view_control

Control Gizmo tools, coordinate systems, and view modes.

scene_view_tools

Manage scene view tools and options.

validation_scene

Validate scene integrity and check for missing assets.

validation_asset

Validate resource references and asset integrity.