一款全面的、便捷的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.
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.
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.
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.
Scene management tools for getting the current scene, opening, saving, creating, and closing scenes, plus scene list queries.
Retrieve full scene structure, including component information, and inspect scene hierarchy.
Execute methods on components, run scene scripts, and synchronize prefabs.
Query nodes by name or pattern, retrieve node information, and detect 2D/3D types.
Create or delete nodes, support component preloading and prefab instantiation.
Modify node name, position, rotation, scale, visibility, and other transform properties.
Move, copy, and paste nodes within the hierarchy.
Copy, paste, and cut nodes via a clipboard-like mechanism.
Reset node properties, component properties, and transform attributes.
Add or remove engine components like cc.Sprite, cc.Button, etc.
Attach or remove custom script components from nodes.
List components, view detailed information, and discover available component types.
Set values for properties on one or multiple components.
List prefabs, view prefab information, and validate prefab files.
Create and delete prefabs from node structures.
Instantiate prefabs into the scene, detach links, apply changes, and revert.
Enter/exit prefab edit mode, save prefabs, and test changes.
Import, delete, and manage asset metadata and URLs.
Analyze asset dependencies and export asset manifests.
Refresh assets and query asset database status.
Query assets by type or folder and retrieve detailed information.
Create, copy, move, delete, save, or re-import assets.
Run projects, build projects, and retrieve project information and settings.
Control the build panel, monitor build status, and manage local servers.
Retrieve and clear console logs with filtering and limits.
Read, search, and analyze project logs with pattern matching.
Fetch editor information, performance statistics, and environment details.
Get and set editor preferences.
Manage global configurations and system settings.
Query server status, project details, and environment information.
Listen for and broadcast custom messages within the editor context.
Add or remove reference images used in scene views.
Control the display and editing of reference images.
Control Gizmo tools, coordinate systems, and view modes.
Manage scene view tools and options.
Validate scene integrity and check for missing assets.
Validate resource references and asset integrity.