Cocos Creator MCP Server

repository·main·Indexed 22 days ago

https://github.com/daxianlee/cocos-mcp-server

A plugin implementing the Model Context Protocol (MCP) that allows AI agents, such as Claude or Cursor, to control the Cocos Creator editor. It enables automated scene construction, node manipulation, and asset management. Available in Open Source and Pro versions, with the Pro version optimized for Cocos Creator 3.8.6+ featuring 16 intent-level tools covering 231 operations across 12 capability modules, including animation/Spine support and specialized token optimization.

Tokens
24.4K
Snippets
56
Records
131
Agent score
75%

What's inside cocos-mcp-server

  1. Overview of Cocos Creator MCP Capability Modules

    main

    The Cocos Creator MCP server provides a wide range of tools categorized into several functional modules. Key modules include:

    • scene_management: Manage scenes (get, open, save, create, close).
    • node_query / node_lifecycle / node_transform: Query, create, delete nodes, and modify properties.
    • component_manage / component_script / component_query: Add/remove components, attach scripts, and query component info.
    • prefab_browse / prefab_lifecycle / prefab_instance: Browse, create, instantiate, and sync prefabs.
    • asset_manage / asset_analyze: Import assets and analyze dependencies.
    • project_manage / project_build_system: Run/build projects and access configuration.
    • debug_console / debug_logs: Manage console and logs.
    • preferences_manage: Manage editor preferences.
    • server_info: Access server information.
    • broadcast_message: Broadcast messages.
  2. Overview of Cocos MCP Server functional categories

    main

    The Cocos MCP Server provides a wide range of tools categorized into functional modules to allow AI agents and developers to control Cocos Creator. Key categories include:

    • scene_management: Manage scenes (get, open, save, create, close).
    • node_query / node_lifecycle / node_transform: Query nodes, create/delete nodes, and modify transform properties.
    • component_manage / component_script / component_query: Add/remove components, attach scripts, and query component information.
    • prefab_browse / prefab_lifecycle / prefab_instance: Browse prefabs, create, instance, and synchronize prefabs.
    • asset_manage / asset_analyze: Import assets, delete assets, and analyze dependencies.
    • project_manage / project_build_system: Run projects, build, and access configuration info.
    • debug_console / debug_logs: Manage the console and logs.
    • preferences_manage: Manage settings.
    • server_info: Get server information.
    • broadcast_message: Send broadcast messages.
  3. Overview of available MCP tool categories

    main

    The plugin provides approximately 50 tools organized into functional modules. All tools follow a category_action naming convention (e.g., scene_management, node_query).

    Key capability modules include:

    • Scene Operations (scene_*): Management, hierarchy, and execution control.
    • Node Operations (node_*): Querying, lifecycle, transformation, hierarchy, clipboard, and property management.
    • Component Operations (component_*): Management, script mounting, querying, and property setting.
    • Prefab Operations (prefab_*): Browsing, lifecycle, instancing, and editing.
    • Project Control (project_*): Project management and build system control.
    • Debugging Tools (debug_*): Console management, log analysis, and system debugging.
    • Asset Management (asset_*): Import/export, analysis, system queries, and operations.
    • Preferences (preferences_*): Editor preferences and global settings.
    • Server & Broadcast (server_* / broadcast_*): Server info and custom message broadcasting.
    • Reference Images (referenceImage_*): Managing and viewing reference images in the scene.
    • Scene View (sceneView_*): Gizmo control, coordinate systems, and view modes.
    • Validation (validation_*): Scene and asset integrity checks.
  4. Overview of Cocos Creator MCP Tool Categories

    main

    The Cocos Creator MCP server provides a wide range of tools categorized by functional areas. Key categories include:

    • scene_*: Scene management (get, open, save, create, close) and hierarchy.
    • node_*: Node lifecycle (create, delete), query, transform (position, rotation, scale), and hierarchy operations.
    • component_*: Component management (add, remove), script mounting, and property setting.
    • prefab_*: Prefab browsing, lifecycle (create, delete), instantiation, and editing.
    • asset_*: Asset management (import, delete), analysis (dependencies), and querying.
    • project_*: Project management (run, build) and build system control.
    • debug_*: Console and log management, and system debugging.
    • validation_*: Scene and asset integrity validation.
    • referenceImage_*: Reference image management in the scene view.
    • sceneView_*: Scene view control (Gizmos, coordinate systems).
    • preferences_*: Editor and global preference management.
    • server_/broadcast_: Server info and message broadcasting.
  5. Overview of Cocos Creator MCP Server Plugin

    main

    The Cocos Creator MCP Server Plugin is a comprehensive Model Context Protocol (MCP) server designed for Cocos Creator 3.8+. It enables AI assistants (such as Claude, Cursor, and Claude CLI) to interact directly with the Cocos Creator editor through a standardized protocol.

    Key features include:

    • One-click installation: No complex environment setup required.
    • Editor Control: Provides tools to control approximately 99% of editor functions.
    • Broad Compatibility: Verified to work with Claude clients, Claude CLI, and Cursor.

    Note: This repository provides the Open Source version. A Pro version (v1.7.8+) is available via VberAI, which offers advanced features like Streamable HTTP, 16 intent-level tools, 231 operations, and built-in knowledge bases.

  6. License and Usage Terms

    main

    The plugin is provided for use in Cocos Creator projects and includes full source code for educational and exchange purposes. The source code is not obfuscated.

    Key Terms:

    • Development: You are free to develop and optimize the code based on this source.
    • Commercial Use: Any source code from this project or derivative works is strictly prohibited from being used for commercial purposes or being resold.
    • Commercial Licensing: If you require the plugin for commercial use, you must contact the author directly.
  7. License and usage restrictions

    main

    This plugin is intended for use in Cocos Creator projects. The source code is included for learning and exchange purposes and is not encrypted, allowing for secondary development and improvements.

    Restrictions:

    • Commercial use or resale of this project's code and its derivatives is strictly prohibited.
    • For commercial use inquiries, contact the author directly.
  8. License and Commercial Usage Terms

    main

    The cocos-mcp-server plugin is intended for use in Cocos Creator projects. The source code is provided in full and is not encrypted, allowing it to be used for learning and exchange purposes.

    Key Terms:

    • Development: You may use the code for your own secondary development and optimization.
    • Restrictions: Neither the original project code nor any derivative works may be used for commercial purposes or resold.
    • Commercial Use: If you require commercial usage rights, you must contact the maintainer directly.
  9. How the VberAI Production Pipeline Works

    main

    The VberAI ecosystem enables a closed-loop development cycle:

    1. Design Import: Import design assets and project files into AI Studio.
    2. AI Generation: Use AI for high-frequency asset generation and editing.
    3. Component Delivery: Export components into the game engine.
    4. Real-time Sync: Use the Engine MCP to synchronize data with the engine.
    5. Engine-side AI: Once assets are in the engine, the MCP allows AI to handle scripting, component configuration, asset management, and debugging directly within Cocos Creator.
  10. Understand the VberAI Engine MCP Ecosystem

    main

    VberAI provides MCP (Model Context Protocol) plugins that allow AI clients (like Claude Desktop, Cursor, Windsurf, or Cline) to directly read and modify game engine projects.

    Key components include:

    • Engine MCP Plugins: Run a service directly inside the engine editor to enable AI to manipulate scenes, components, assets, animations, and scripts.
    • AI Studio: A design platform that allows importing design files (PSD/Figma) and exporting scenes/prefabs to engines (Unity, Cocos, Godot).
    • AI Super Matting: A browser-based tool for high-precision background removal.

    Available Engine Plugins:

    • Unity MCP: Enterprise-grade, supports Unity 2022.3+ and Unity 6.
    • Cocos MCP 3.x Pro: Supports Cocos Creator 3.8.6+ with 16 intent-level tools and 231 operations.
    • Cocos MCP 2.x Pro: Specifically for legacy Cocos Creator 2.4.x+ projects.
    • Godot MCP: Open-source (MIT), supports Godot 4.x (GDScript and C#).
  11. Compare Cocos MCP Pro vs. Open Source versions

    main

    The project offers both an Open Source version and a Pro version (developed by VberAI). The Pro version is specifically optimized for Cocos Creator 3.8.6+ and provides significantly more advanced capabilities.

    FeatureOpen SourcePro Version
    Communication ProtocolHTTPStreamable HTTP
    Token OptimizationBasic designOptimized design (saves tokens, more stable)
    Code Operation Method
    One-click Configuration
    Tool Customization
    Intent-level ToolsBasic tools16 types covering 231 operations
    One-shot Scene Creation
    Integrated Knowledge Base
    Animation/Spine System✅ (39 animation operations)
  12. Smart features in Cocos MCP Pro

    main

    The Pro version includes several intelligent automation features to improve AI interaction with Cocos Creator:

    • Smart Path Resolution: Node parameters accept UUIDs, paths (e.g., Canvas/Panel/Button), or names, which are automatically resolved.
    • Automatic UI Detection: Automatically adds cc.UITransform when creating nodes under a UI parent.
    • Viewport Context: Returns design resolution and visible range when creating/editing nodes; warns when exceeding boundaries.
    • Built-in Knowledge Base: Allows AI to query component attribute tables, coordinate system rules, and layout patterns.
    • Scene Builder: Describes the entire UI hierarchy via JSON; builds it in a single call with automatic Canvas/Camera/Component configuration.
    • Reference Image System: Overlays design files onto the scene viewport, allowing the AI to 'see' the design while building the interface.
    • Node Tree Cache: Uses a 2-second TTL cache to avoid redundant queries; invalidates automatically upon changes.
    • Atomic Operations: Uses a snapshot mechanism for builder/composite actions to automatically rollback if an operation fails.