MCPcopy Index your code
hub / github.com/DaxianLee/cocos-mcp-server

github.com/DaxianLee/cocos-mcp-server @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
528 symbols 987 edges 30 files 42 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Cocos Creator MCP Server Plugin

🌐 简体中文 · English · 繁體中文 · 日本語 · 한국어 · Español · Português · Français · Deutsch · Русский · Tiếng Việt

A comprehensive MCP (Model Context Protocol) server plugin for Cocos Creator 3.8+ that lets AI assistants interact with the Cocos Creator editor through a standardized protocol. One-click installation and use — no tedious environment setup or configuration required. Tested with the Claude desktop client, Claude CLI, and Cursor; other editors should theoretically work perfectly as well.

🚀 Now offering 50 powerful, consolidated tools for 99% editor control!

The PRO version has been updated to 1.7.8

Type Link
Video Preview Bilibili Video
Free Trial VberAI Cocos Creator 3.x MCP Pro Trial
Free Trial VberAI Cocos Creator 2.x MCP Pro Trial
AI Design Canvas VberAI Studio — The World's First AI-Native Design Platform for Games
Official Website VberAI Official Website vberai.com

Cocos MCP 3.x Pro Edition Features

🚀 The Pro edition is built and continuously maintained by VberAITry the Pro Edition NowWatch the Video Demo

A professional-grade MCP (Model Context Protocol) plugin built for Cocos Creator 3.8.6+, giving AI assistants direct control over the editor through a standardized protocol. 16 intent-level tools cover 231 operations across 12 major capability modules, spanning the entire Cocos Creator 3.x development workflow. Built on the Streamable HTTP protocol with a token-optimized design for lower token usage and more stable calls, with one-click configuration support for mainstream AI clients (Cursor, Claude, Windsurf, etc.).

Intent-Level Tools Operations Covered Modules Covered Communication Protocol
16 231 12 Major Modules Streamable HTTP

Twelve Capability Modules

Module Operations Description
Scene Management 24 Opening, saving, creating, and switching scenes; hierarchy queries and snapshots; supports undo operations and script execution.
Node Operations 18 Full CRUD for nodes, with support for batch modification, script attachment, node type detection, and clipboard operations.
Component System 8 Add/remove/query/modify components and set properties; supports click event binding and batch event configuration.
Prefab System 13 Prefab creation, instantiation, and edit-mode switching; supports applying/reverting changes and prefab validation.
Asset Management 19 Asset querying, searching, CRUD, and import; supports dependency analysis and UUID/path conversion.
Editor Control 33 Editor-level operations such as project settings, logs, preferences, building, and preview.
Scene View 32 Gizmo, camera, grid, and reference images, providing viewport context and boundary-aware control.
UI & Template Building 13 One-click creation of UI components; build complete node hierarchies from a JSON tree; built-in UI templates.
Animation System 39 Keyframe editing, curve adjustment, animation events, preset application, and Spine skeletal animation management.
Knowledge Base Queries 8 A built-in knowledge base covering component properties, UI design rules, layout patterns, and best practices, giving AI precise development assistance.
Validation & Snapshots 6 Scene layout checks, asset reference validation, and hierarchy analysis, together with scene snapshots for regression checking.
Fonts & Labels 9 Font asset management and rich-text Label operations, covering text typography settings.

Smart Features

  • Smart Path Resolution — All node parameters accept a UUID, a path (e.g. Canvas/Panel/Button), or a name, and are resolved automatically
  • Automatic UI Detection — Automatically adds cc.UITransform when creating a node under a UI parent node
  • Viewport Context — Returns the design resolution and visible range when creating/modifying nodes, with automatic warnings when out of bounds
  • Built-in Knowledge Base — AI can query component property tables, coordinate system rules, layout patterns, and other knowledge
  • Scene Builder — Describe a complete UI hierarchy in JSON and build it in a single call, with automatic handling of Canvas/Camera/component configuration
  • Reference Image System — Overlay UI design mockups on the scene view so AI can build interfaces while looking at the design
  • Node Tree Caching — A 2-second TTL cache avoids redundant queries and is automatically invalidated after change operations
  • Atomic Operations — builder/composite use a snapshot mechanism that automatically rolls back on failure

Pro Edition vs. Open-Source Edition

Feature Open-Source Edition Pro Edition
Communication Protocol HTTP protocol Streamable HTTP
Token Optimization Basic design Optimized design, lower token usage and more stable
Opcode Method
One-Click Configuration
Tool Customization
Intent-Recognition-Level Tools Basic tools 16 tools, covering 231 operations
One-Shot Scene Creation
Built-in Knowledge Base
Animation / Spine System ✅ 39 animation operations

🌐 About VberAI — AI-Native Game Production Platform

VberAI is an AI-native game production platform for game developers, art teams, and content teams, and is the developer and maintainer of the Pro edition of this Cocos MCP plugin. VberAI is currently the only vendor providing MCP plugins for all three mainstream engines — Unity, Godot, and Cocos Creator — simultaneously, building three product lines around the mission of "truly integrating AI into the game production pipeline":

  • 🎮 Game Engine MCP Plugins — Run an MCP service inside the engine editor, letting AI clients such as Claude Desktop, Claude Code, Cursor, Windsurf, and Cline directly read and manipulate scenes, components, assets, animations, and scripts.
  • 🎨 AI Studio — An AI-native game design canvas: import PSD / Figma / engine projects on one side, and export Unity / Cocos / Godot scenes and prefabs on the other.
  • ✂️ AI Super Matting — Browser-based one-click background removal with hair-strand-level precision and true alpha-channel output, billed on a pay-as-you-go basis.

Engine MCP Plugin Family

Plugin Description
Unity MCP Enterprise-grade MCP plugin covering scenes / GameObjects / components / prefabs / materials / animation / shaders, supporting Unity 2022.3+ and Unity 6
Cocos MCP 3.x Pro The Pro edition of this project — 16 intent-level tools / 231 operations, Cocos Creator 3.8.6+, Streamable HTTP
Cocos MCP 2.x Pro Purpose-built for legacy Cocos Creator 2.4.x+ projects (2.x titles still live in production)
Godot MCP Completely free and MIT open-source, with 100+ tool commands covering 21 systems, for Godot 4.x, compatible with GDScript and C#

🎨 VberAI Studio — The World's First AI-Native Design Platform for Games

An AI-native design platform built for games. Compatible with the Unity, Cocos, and Godot engines from the ground up, with a wide range of high-frequency AI tools and automated workflows for art generation, one-click re-skinning, asset management, and end-to-end delivery from design mockups to the engine — plus reverse sync back from the engine — completely connecting the full development chain from "AI design → in-engine AI."

👉 Enter AI Studio NowLearn More

Complete Production Pipeline

Import design and project assets → high-frequency AI generation and editing → componentized engine delivery → real-time sync to the engine via Engine MCP → reverse sync back from the engine

Working together with this Cocos MCP plugin, AI Studio writes scenes, prefabs, components, and art assets back into the project, after which Engine MCP lets AI continue handling scripting, component configuration, asset management, and debugging inside Cocos Creator — forming an end-to-end development loop that dramatically boosts team efficiency, to the point where a single person can work like an entire team.

🔗 Related Links: VberAI Official WebsiteAI StudioAI Super MattingPlatform Pricing | Contact Support: support@vberai.com


Open-Source Version Changelog

🚀 Major Update v1.5.4

Current Open-Source Version Video Demo

视频演示

  • Tool Consolidation & Refactoring: Condensed the original 150+ tools into 50 highly reusable, high-coverage core tools, removing all dead and redundant code to greatly improve usability and maintainability.
  • Unified Opcodes: All tools now use an "opcode + parameters" pattern, greatly simplifying the AI calling process, improving AI call success rates, reducing the number of AI calls, and cutting token consumption by 50%.
  • Comprehensive Prefab Upgrade: Thoroughly fixed and refined all core prefab functionality — creation, instantiation, syncing, and referencing — with support for complex reference relationships, fully aligned with the official format.
  • Event Binding & Legacy Feature Completion: Added and implemented event binding and other legacy features for nodes/components/assets, with all methods fully aligned with the official implementation.
  • Interface Optimization: All interface parameters are clearer and better documented, making them easier for AI to understand and call.
  • Plugin Panel Optimization: A cleaner panel UI with more intuitive operation.
  • Performance & Compatibility Improvements: A more efficient overall architecture, compatible with all versions of Cocos Creator 3.8.6 and above.

Tool System & Opcodes

  • All tools are named using a "category_operation" convention, with parameters following a unified schema and support for switching between multiple opcodes (action), greatly improving flexibility and extensibility.
  • The 50 core tools cover the full range of editor operations, including scenes, nodes, components, prefabs, assets, projects, debugging, preferences, the server, and message broadcasting.
  • Example tool call:
{
  "tool": "node_lifecycle",
  "arguments": {
    "action": "create",
    "name": "MyNode",
    "parentUuid": "parent-uuid",
    "nodeType": "2DNode"
  }
}

Main Feature Categories (Partial Examples)

  • scene_management: Scene management (get/open/save/create/close scenes)
  • node_query / node_lifecycle / node_transform: Node querying, creation, deletion, and property changes
  • component_manage / component_script / component_query: Adding/removing components, attaching scripts, component information
  • prefab_browse / prefab_lifecycle / prefab_instance: Prefab browsing, creation, instantiation, syncing
  • asset_manage / asset_analyze: Asset import, deletion, dependency analysis
  • project_manage / project_build_system: Running and building the project, configuration information
  • debug_console / debug_logs: Console and log management
  • preferences_manage: Preferences
  • server_info: Server information
  • broadcast_message: Message broadcasting

v1.4.0 - July 26, 2025

🎯 Major Feature Fixes

  • Completely Fixed Prefab Creation: Thoroughly resolved the issue of component/node/asset type references being lost during prefab creation
  • Correct Reference Handling: Implemented a reference format fully consistent with manually created prefabs
  • Internal References: Node and component references inside the prefab are correctly converted to the {"__id__": x} format
  • External References: Node and component references outside the prefab are correctly set to null
  • Asset References: References to prefabs, textures, sprite frames, and other assets fully preserve the UUID format
  • Standardized Component/Script Removal API: Removing a component/script now requires passing the component's cid (the type field) — the script name or class name can no longer be used. AI and users should first call getComponents to get the type field (cid), then pass it to removeComponent. This ensures 100% accurate removal of all component and script types and is compatible with all Cocos Creator versions.

🔧 Core Improvements

  • Index Order Optimization: Adjusted the prefab object creation order to ensure consistency with the standard Cocos Creator format
  • Component Type Support: Extended component reference detection to support all component types prefixed with cc. (Label, Button, Sprite, etc.)
  • UUID Mapping Mechanism: Refined the internal UUID-to-index mapping system to ensure reference relationships are correctly established
  • Property Format Standardization: Fixed component property order and format, eliminating engine parsing errors

🐛 Bug Fixes

  • Fixed Prefab Import Error: Resolved the Cannot read properties of undefined (reading '_name') error
  • Fixed Engine Compatibility: Reso

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 363
Function 101
Class 40
Interface 24

Languages

TypeScript100%

Modules by API surface

source/tools/prefab-tools.ts83 symbols
source/panels/tool-manager/index.ts32 symbols
source/tools/project-tools.ts28 symbols
source/tools/scene-advanced-tools.ts27 symbols
source/tools/tool-manager.ts25 symbols
source/tools/scene-view-tools.ts24 symbols
source/mcp-server.ts23 symbols
source/types/index.ts22 symbols
source/tools/node-tools.ts22 symbols
source/tools/component-tools.ts21 symbols
source/panels/default/index.ts21 symbols
source/main.ts21 symbols

For agents

$ claude mcp add cocos-mcp-server \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page