FM

firekula/mcp-bridge

Developer tools

This page was translated automatically. Technical details may differ from the original. View the original

236 stars 80 forks Quality 74 Trend 22NOASSERTION

Cocos Creator 2.4.x MCP Bridge — Launches local HTTP services, allowing Claude and other AIs to directly control the editor via Model Context Protocol: 30+ tools fully automated, including scene node management, component add, delete, modify, and query, offline preform modifications, resource management, project construction, and more. — QQ group: 788307395

Overview

This is an MCP (Model Context Protocol) bridge plugin designed for Cocos Creator, used to connect external AI tools with the Cocos Creator editor, enabling automated operations on scenes, nodes, and other resources. This plugin is compatible with Cocos Creator version 2.4.x. Due to the use of a specific editor API, it may not be compatible with newer or older versions. - : Provides standard HTTP interfaces, external tools can call the Cocos Creator editor function via the MCP protocol - : Retrieve, create, and modify nodes in scenes - : Create scenes and presets, open scenes or presets to enter editing mode - : Add, delete, get node components - : Create, delete, read, and write script files - : Batch execute multiple MCP tool operations to improve efficiency - : Create, delete, move, and retrieve resource information - : Fast and secure offline editor engine. Automatically recognize physical skeleton differences between prefabrics (.prefab) and scenes (.fire). Supports creating resource skeletons from nothing, deep copy reference recalculation cloning, render-level reordering, nested array reference binding (clickEvents[0].target), attribute reference binding, as well as physical deletion + deep recursive reference updates to prevent crash mechanisms. Editor's private serialization fields (_N$) are automatically synchronized, completely eliminating deserialization deadlocks and Watcher blocking. - : Provides detailed operation log recording and display, supports persistent writing to project log files - : Supports automatic service start when the editor starts - : Get and set selected objects, refresh the editor - : Find nodes in the scene based on conditions - : Create and manage material resources - : Create and manage texture resources - : Execute Cocos Creator editor menu items - : Apply text editing operations to files - : Read editor console output - : Verify script syntax correctness - : Search text content in the project - : Manage the editor's undo stack - : Create and modify particle systems - : Command queue executes serially, with a queue limit of 100 entries (over-limit returns HTTP 429), preventing editor freezes - : IPC communication and command queue have timeout safety mechanisms - : Core component attribute blacklist mechanism prevents AI from crashing by tampering with node/uuid references - : Parameter alias mapping (operation→action, save→update/write), compatible with large model illusions - : Finds all locations in the scene where specified nodes or resources are referenced, supports Texture2D →...

Overview (machine translated)

This is an MCP (Model Context Protocol) bridge plugin designed for Cocos Creator, used to connect external AI tools with the Cocos Creator editor, enabling automated operations on scenes, nodes, and other resources.

Applicable Versions

This plugin is compatible with Cocos Creator version 2.4.x. Due to the use of a specific editor API, it may not be compatible with newer or older versions.

Functional Features

  • HTTP Service Interface: Provides a standard HTTP interface, allowing external tools to call the Cocos Creator editor functionality via the MCP protocol
  • Scene Node Operations: Retrieve, create, and modify nodes in the scene
  • Resource Management: Create scenes and preforms, then open the scene or preform and enter editing mode
  • Component Management: Add, delete, and retrieve node components
  • Script Management: Create, delete, read, and write script files
  • Batch Execution: Batch execution of multiple MCP tool operations to improve efficiency
  • Asset Management: Creating, deleting, moving, and retrieving resource information
  • Offline Preset/Scene Modification: A high-speed, secure offline editor engine. Automatically detects physical skeleton differences between presets (.prefab) and scenes (.fire). Supports creating resource skeletons from scratch, deep copy reference recalculation cloning, render-level reordering, nested array reference binding (clickEvents[0].target), attribute reference binding, and physical deletion + deep recursive reference updates to prevent crash mechanisms. Editor’s private serialization fields (_N$) automatically synchronize, completely eliminating deserialization deadlocks and Watcher blocking
  • Real-Time Logs: Provides detailed operation log records and displays, supporting persistent writing to project log files
  • Auto Start: Supports automatically enabling services when the editor starts
  • Editor Management: Retrieve and set the selected object, refresh the editor
  • Game Object Search: Finds nodes in a scene based on conditions
  • Material Management: Create and manage material resources
  • Texture Management: Create and manage texture resources
  • Menu Item Execution: Execute the Cocos Creator editor menu item
  • Code Editing Enhancements: Apply text editing operations to files
  • Console Read: Read the output from the editor console
  • Script Verification: Verifies the syntax correctness of the script
  • Global Search: Search for text content within the project
  • Undo/Redo: Manage the editor’s undo stack
  • Special Effects Management: Create and modify particle systems
  • Concurrency Security: Command queues are executed in serial mode, with a queue limit of 100 entries (over-limit returns HTTP 429), preventing editor freezes
  • Timeout Protection: IPC communication and instruction queues have timeout safety mechanisms
  • Attribute Protection: Core attribute blacklist mechanism for components to prevent AI from tampering with references like node/uuid that could cause crashes

This page was translated automatically. Technical details may differ from the original.

Install

npx tsc --noEmit
New to MCP? Start with the mcpskill.org guide →

Configuration

{ "mcpServers": { "mcp-bridge": { "command": "node", "args": ["[插件安装路径]/dist/mcp-proxy.js"] } } }