通过MCP协议提供55个工具,让AI代理能直接操作XML和Windows UI自动化来编辑游戏工程。
Construct 2 can get an AI editing workflow even though the editor never shipped a scripting API. 🧩
Wesley Rosa's Construct 2 MCP gives a coding agent 55 tools for working with the Windows game editor.
It uses two routes, depending on whether it needs to change the project or interact with the open editor.
📄 Project edits go straight into the folder project's XML.
An agent can add objects, behaviors, layers, instances, and event-sheet logic.
It can read an event sheet with IDs on its conditions and actions, then update specific entries.
The tools also convert between a packaged CAPX and a folder project.
The server builds a catalog from installed add-ons and checks each condition, action, and parameter against it.
That includes third-party plugins installed in your Construct 2 setup.
🖱️ The other route is Windows UI Automation.
It opens or reloads projects, runs previews, and steps through the export wizard.
Most editor actions use automation controls or window messages, leaving the mouse pointer and keyboard available.
A test project built through the tools opened in Construct 2 r279 and exported to HTML5 with its events working.
The project also reports byte-identical round trips for 822 XML files from nine released Construct 2 games.
🔒 The tool checks for unsaved work in the open editor.
It refuses project edits when the editor has unsaved changes.
If the project is open and saved, it can reload it after the edit. Originals are backed up before changes.
Object renaming is still unsupported, and the editor's Free edition limits still apply.
The MIT project targets Windows, Construct 2 r279 or r280, Python 3.11 or newer, and uv.
GitHub
https://github.com/wjrosa/construct2-mcp
#Construct2 #GameDev #MCP
来源:CuteGuy☣️ · x.com