HappyLifeOk/cc-3-8-x-mcp logo

HappyLifeOk/cc-3-8-x-mcp

Free

Cocos Creator 3.8.x 的 MCP 服务 + 离线 CLI,把编辑器的场景 / 资源 / 预览 / 构建 / 进程控制暴露给 AI 客户端,并附带 headless prefab 读写与命令行打包。

FreeFree tier
Type
Open Source

About HappyLifeOk/cc-3-8-x-mcp

cc-3-8-x-mcp is an open-source MCP (Model Context Protocol) bridge extension for Cocos Creator 3.8.x. It exposes the editor's scene, asset, preview, and local state capabilities to AI clients (such as Claude Code) via the MCP protocol, enabling AI-assisted game development workflows. The tool includes three main components: an editor extension that runs inside the Cocos Creator process and provides an HTTP MCP server; a stdio router that aggregates multiple editor instances and offline prefab tools; and a standalone CLI (cocos-mcp-cli) for offline read/write of .prefab files without requiring the editor to be running. The tool supports multi-instance editing, heartbeat-based instance discovery, a debug panel with JS injection, and a comprehensive set of tools for scene manipulation (query/set properties, open/save scenes), asset management (query/import/create/delete), preview control (URL, browser, screenshot), and local state management.

Key Features

Exposes Cocos Creator 3.8.x editor capabilities as MCP tools (scene, asset-db, preview, local)
Offline prefab editing CLI (cocos-mcp-cli) for reading/writing .prefab files without editor
Multi-instance support via stdio router that aggregates multiple editor instances with automatic discovery (heartbeat every 15s)
Comprehensive scene tools: query/modify node tree, set properties, open/save/soft-reload scenes, execute component methods
Asset management tools: query, import, create, save, delete, move assets with glob pattern support
Preview control tools: query preview URL, open browser, take screenshots, inject JavaScript (eval_js)
Custom debug panel with status indicators, command logs, worktree listing, and configurable quick-action buttons
Supports stub node property overriding and nested prefab protocols (cc.TargetOverrideInfo)
Open source (MIT license) and free to use

Pros & Cons

Pros
  • Bridges AI clients to Cocos Creator editor, enabling AI-driven game development
  • Offline prefab editing capability reduces dependency on editor for file modifications
  • Multi-instance support allows managing multiple projects simultaneously
  • Heartbeat-based auto-discovery of editor instances simplifies configuration
  • Includes detailed documentation (AGENTS.md, QUICK-REF.md, doc/) for both AI agents and human users
  • Open source with permissive MIT license
  • Feature-rich debug panel with real-time status, command logs, and JS injection
Cons
  • Limited to Cocos Creator 3.8.x; not compatible with other versions
  • Requires Node.js runtime and some setup (MCP client configuration)
  • Relatively new tool; community and documentation may still be maturing
  • Some features depend on the Cocos Creator editor running; offline CLI covers only prefab/anim files

Best For

AI-assisted Cocos Creator game development (e.g., Claude Code generating and modifying scenes)Automated asset pipeline management (import, rename, delete assets programmatically)Headless scene manipulation for CI/CD or build pipelinesDebugging and testing preview scenes with script injectionMulti-project workflow management across multiple Cocos Creator instancesBatch processing of .prefab and .anim files using the offline CLI

FAQ

What is cc-3-8-x-mcp?
It is an open-source MCP bridge extension for Cocos Creator 3.8.x that exposes editor capabilities (scene, asset, preview, local) to AI clients like Claude Code via the MCP protocol. It also includes an offline CLI for reading/writing .prefab files without the editor.
Is cc-3-8-x-mcp free?
Yes, the project is open source and free to use under the MIT license.
What can I do with the offline CLI?
The offline CLI (cocos-mcp-cli) allows you to read, modify, and batch process .prefab and .anim files without needing the Cocos Creator editor running. It supports node querying, property editing, stub overriding, and more.
Does it support multiple Cocos Creator projects?
Yes. The stdio router can discover and manage multiple editor instances (each running on a different project) via heartbeat registration. Each instance's tools are prefixed with a short name to avoid conflicts.
How do I inject custom JavaScript into the preview?
The debug panel includes a 'Debug Injection' section where you can run arbitrary JavaScript in the preview page via the eval_js tool. You can also configure custom quick buttons in .dev/cc-mcp-panel.json.