Cocos Creator Local MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cocos Creator Local MCP Create a new Cocos Creator 3.8 project called MyPlatformer"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cocos Creator Local MCP
English | 简体中文

cocos-creator-local-mcp is an MCP server for local Cocos Creator automation. It gives coding agents a practical tool surface for creating Cocos Creator 3.8 projects, installing a project-local editor bridge, assembling scenes, saving editor state, and building local WeChat Mini Game packages.
This project is intentionally focused on local project automation, not AI asset generation. Pair it with an asset pipeline MCP when your workflow needs generated sprites, audio, UI packs, or tilesets.
Why This Exists
Coding agents can write TypeScript, but Cocos games are not finished by code alone. A playable local prototype also needs scene files, node hierarchies, serialized component references, editor imports, build configuration, and platform output checks.
This MCP closes that local loop:
create project -> create scene -> generate scripts -> open editor
-> apply scene blueprint -> save scene -> write build config
-> build wechatgame -> inspect outputIt is designed for agent-driven development on a developer machine where Cocos Creator is installed locally.
Related MCP server: cocos-mcp-server
Highlights
Local-first Cocos Creator 3.8 workflow with no cloud service dependency.
Project creation from Cocos Creator built-in templates.
Project-local editor bridge extension for scene inspection and mutation.
Generated mini-game starter scripts and scene blueprints.
Scene opening, node creation, component attachment, property assignment, and save operations through the bridge.
High-level sprite placement helpers for generated Cocos assets.
Repeatable
wechatgamebuild configuration and command-line build execution.Output checks for required WeChat Mini Game files and package-size warnings.
WeChat DevTools CLI helpers for opening local builds, preview artifacts, cache cleanup, and explicit runtime-evidence vocabulary.
Static runtime package audits for oversized textures, audio, scripts, and first-package risk.
Vertical-slice evidence aggregation that separates build success, DevTools opening, and verified gameplay.
Clean responsibility boundary: this MCP automates Cocos locally; asset generation belongs in a separate asset MCP.
Quick Links
Requirements
Node.js 20 or newer.
macOS for the default paths currently documented here.
Cocos Creator 3.8.8 installed locally, or pass
creatorPathto tools.WeChat DevTools is optional unless you want to open/debug the built package in the simulator.
Default Cocos Creator executable path on macOS:
/Applications/Cocos/Creator/3.8.8/CocosCreator.app/Contents/MacOS/CocosCreatorDefault WeChat DevTools CLI path on macOS:
/Applications/wechatwebdevtools.app/Contents/MacOS/cliInstall
git clone https://github.com/lightblink/cocos-creator-local-mcp.git
cd cocos-creator-local-mcp
npm install
npm run buildRun locally during development:
npm run devUse the built server:
node dist/index.jsValidate the project:
npm run checkMCP Client Config
Example for MCP clients that launch stdio servers:
{
"mcpServers": {
"cocos-creator-local": {
"command": "node",
"args": [
"/absolute/path/to/cocos-creator-local-mcp/dist/index.js"
],
"startup_timeout_sec": 120
}
}
}If you also use an asset generation MCP, keep it as a separate server:
{
"mcpServers": {
"cocos-creator-local": {
"command": "node",
"args": [
"/absolute/path/to/cocos-creator-local-mcp/dist/index.js"
]
},
"cocos-asset-forge": {
"command": "node",
"args": [
"/absolute/path/to/cocos-asset-forge-mcp/dist/index.js",
"--config",
"/absolute/path/to/cocos-asset-forge-mcp/examples/config.example.json"
]
}
}
}Tools
Tool | Purpose |
| Detect local Cocos Creator and WeChat DevTools CLI paths. |
| Create a local Cocos Creator 3.8 project from a built-in template. |
| Launch or reuse Cocos Creator for a project and optionally wait for the bridge. |
| Create a Cocos scene from local Creator templates. |
| Inspect project folders, settings, scenes, scripts, bridge files, and build output. |
| Create a Cocos Creator TypeScript component. |
| Generate baseline mini-game scripts and a scene blueprint. |
| Generate an optional multi-system TypeScript architecture starting point for games such as tower defense. |
| Install the project-local editor bridge extension. |
| Check bridge files and optionally ping the HTTP bridge. |
| Poll until the bridge responds. |
| Call a bridge HTTP route directly. |
| Open a scene in the running Cocos editor. |
| Apply a scene blueprint through the bridge and optionally save. |
| Assign a resolved SpriteFrame asset to an existing node's |
| Assign ordered generated frame assets to a component array property such as |
| Ensure one Sprite node exists and assign a generated SpriteFrame asset. |
| Place multiple generated sprite assets into the scene in one operation. |
| Write a repeatable local WeChat Mini Game build config, including optional |
| Run a local Cocos |
| Inspect build output for required files and size warnings. |
| Open a local |
| Run WeChat DevTools preview and optionally write QR/info artifacts. |
| Clean DevTools cache, close a project, or quit DevTools locally. |
| Audit output/assets for package budgets, oversized textures/audio, and first-package risk. |
| Aggregate scene, bridge, build, DevTools, screenshot, log, and manual gameplay evidence into a verification status. |
Companion Codex Skills
This repository includes optional Codex skills under skills/. The MCP provides executable local automation tools; the skills teach an agent when and how to use those tools for game architecture, scene/prefab assembly, and local WeChat Mini Game builds.
Included skills:
cocos-creator-gameplay-architecture: build maintainable Cocos Creator gameplay code, UI systems, and runtime flow.cocos-game-balance-director: design tunable numbers, probability tables, economy loops, progression curves, and balance sanity checks.cocos-game-design-director: turn a Cocos mini-game idea into a playable design brief, core loop, vertical slice, and downstream handoffs.cocos-game-reference-research-director: research reference games, genre expectations, IP-safe design pillars, and downstream handoffs before planning.cocos-interaction-ux-director: define touch-first controls, HUD states, feedback, readability, and adaptive layout requirements.cocos-level-content-design: design levels, waves, missions, procedural rules, pacing, and reusable content data.cocos-playtest-qa-director: plan playtest gates, collect runtime evidence, and verify whether local playability claims are supported.cocos-scene-prefab-assembly: wire scenes, prefabs, components, serialized properties, and generated assets into playable local scenes.cocos-wechat-local-build: prepare, build, inspect, and debug localwechatgamepackages without publishing.
To install them for Codex:
mkdir -p ~/.codex/skills
cp -R skills/cocos-creator-gameplay-architecture ~/.codex/skills/
cp -R skills/cocos-game-balance-director ~/.codex/skills/
cp -R skills/cocos-game-design-director ~/.codex/skills/
cp -R skills/cocos-game-reference-research-director ~/.codex/skills/
cp -R skills/cocos-interaction-ux-director ~/.codex/skills/
cp -R skills/cocos-level-content-design ~/.codex/skills/
cp -R skills/cocos-playtest-qa-director ~/.codex/skills/
cp -R skills/cocos-scene-prefab-assembly ~/.codex/skills/
cp -R skills/cocos-wechat-local-build ~/.codex/skills/Use these skills together with an MCP client entry that exposes this server as cocos_creator_local. If your workflow also generates sprites, audio, UI packs, or tilesets, pair this server with the separate Cocos Asset Forge MCP.
Generated Assets To Scene
When paired with an asset generation MCP, write generated PNGs under the Cocos project assets/ folder, wait for Cocos AssetDB import, then place them with cocos_local_place_sprite_assets.
Example sprite placement payload:
{
"projectRoot": "/absolute/path/to/my-cocos-project",
"openScene": true,
"sprites": [
{
"assetPath": "assets/generated/background.png",
"nodePath": "Scene/Canvas/GameRoot/Background",
"position": { "x": 0, "y": 0, "z": -10 },
"scale": { "x": 1, "y": 1, "z": 1 }
},
{
"assetPath": "assets/generated/player.png",
"nodePath": "Scene/Canvas/GameRoot/Player",
"position": { "x": 0, "y": -120, "z": 0 },
"scale": { "x": 1, "y": 1, "z": 1 }
}
]
}assetPath accepts db://assets/..., assets/..., an absolute project path, or a SpriteFrame UUID. The tool resolves AssetDB info and prefers SpriteFrame sub-assets when assigning Sprite.spriteFrame.
For generated frame-by-frame animation, import the individual PNG frames under assets/, add a component with an array property such as @property([SpriteFrame]) frames, then call cocos_local_assign_sprite_frame_sequence:
{
"projectRoot": "/absolute/path/to/my-cocos-project",
"nodePath": "Scene/Canvas/GameRoot/Player",
"componentType": "SpriteFrameAnimator",
"property": "frames",
"assetPaths": [
"assets/art/characters/run/frame-001.png",
"assets/art/characters/run/frame-002.png",
"assets/art/characters/run/frame-003.png"
],
"addComponent": true
}The sequence tool preserves the provided order, resolves each PNG to its imported SpriteFrame sub-asset, assigns the resulting asset array through the editor bridge, and saves the scene when requested.
From Zero To Local WeChat Build
Call
cocos_local_get_environmentto confirm local paths.Call
cocos_local_create_projectwith a targetprojectRoot.Call
cocos_local_open_projectwithwaitForBridge: true; by default it reuses an already-open editor for the same project instead of launching a duplicate window.For non-trivial gameplay, consider
cocos_local_create_architecture_skeletonbefore feature scripts, then prune or merge the suggested systems to fit the actual slice.Call
cocos_local_apply_scene_blueprintto create and wire the starter scene.Call
cocos_local_create_wechat_build_configwithstartScenePath: "assets/scenes/Main.scene"and an explicitdesignResolutionsuch as{ "width": 720, "height": 1280, "fitWidth": true, "fitHeight": false }for phone-first mini-games.Call
cocos_local_build_wechatgame.Call
cocos_local_check_wechat_build_output.Call
cocos_local_audit_runtime_packageto catch package-budget and asset-size risks before opening the simulator.Call
cocos_local_open_wechat_devtoolsto open the localbuild/wechatgameoutput.After observing launch, first input, core loop, result/failure, restart, and logs, call
cocos_local_collect_runtime_evidence.
Cocos Creator returns exit code 36 for a successful command-line build.
Use precise verification language:
Build verified: the build completed and output files passed inspection.
DevTools opened: WeChat DevTools accepted the local build path.
Runtime verified: launch, first input, core loop, result/failure, restart, logs, and screenshot or scene-summary evidence were checked.
Do not describe a vertical slice as runtime-verified from build output alone.
Editor Bridge
The bridge is installed into the target Cocos project as a project-local extension:
extensions/codex-editor-bridge/It exposes a localhost HTTP API while the project is open in Cocos Creator. The MCP uses that API to inspect and edit the active scene. The extension is local to the project being automated and should not be shipped with your game runtime.
Local Safety Boundary
This server is for local development and packaging only. It does not:
upload WeChat Mini Game builds
submit review or release candidates
manage production app credentials
change payment, ads, login, or backend configuration
generate art or audio assets
Use placeholder WeChat appids only for pure local gameplay checks. Use a real appid before testing platform APIs.
Development
npm install
npm run typecheck
npm test
npm run buildThe unit tests verify the editor bridge scaffold and generated mini-game skeleton. A full local smoke test also requires Cocos Creator 3.8.8 on the host machine.
Trademark Notice
Cocos Creator and WeChat are trademarks of their respective owners. This project is an unofficial local automation tool and is not affiliated with or endorsed by Cocos or Tencent.
Available Tools
19 toolscocos_local_apply_scene_blueprintApply Cocos Scene BlueprintC
Read a generated scene blueprint JSON and apply it to the currently open Cocos scene through the editor bridge.
Inputs: projectRoot (required), port, openScene, saveScene, +4 more.
cocos_local_assign_sprite_frameAssign SpriteFrameB
Resolve a Cocos asset path or SpriteFrame UUID and assign it to an existing node's Sprite.spriteFrame property.
Inputs: nodePath (required), assetPath (required), projectRoot (required), port, +5 more.
cocos_local_build_wechatgameBuild Cocos WeChat GameB
Run Cocos Creator command-line build for the wechatgame platform using a configPath or raw build options.
Inputs: projectRoot (required), dryRun, logDest, timeoutMs, +3 more.
cocos_local_call_editor_bridgeCall Cocos Editor BridgeC
Call the localhost HTTP bridge exposed by the Cocos editor extension after it is enabled in Cocos Creator.
Inputs: body, port, route, method, +1 more.
cocos_local_check_editor_bridgeCheck Cocos Editor BridgeC
Check whether the project-local Codex editor bridge extension files exist and optionally ping its localhost HTTP server.
Inputs: projectRoot (required), port, pingHttp, extensionName.
cocos_local_check_wechat_build_outputCheck WeChat Game Build OutputC
Check a local Cocos wechatgame build output for required files and package-size budget warnings.
Inputs: projectRoot (required), outputDir, mainPackageLimitBytes, totalPackageLimitBytes.
cocos_local_create_component_scriptCreate Cocos Component ScriptA
Create a Cocos Creator 3.8 TypeScript Component script with ccclass, typed properties, and lifecycle stubs.
Inputs: className (required), projectRoot (required), baseClass, lifecycle, +4 more.
cocos_local_create_minigame_skeletonCreate Cocos Mini Game SkeletonC
Create a minimal Cocos Creator 3.8 mini-game runtime skeleton plus a scene assembly blueprint for Editor Bridge application.
Inputs: projectRoot (required), gameName, overwrite, scriptDir, +2 more.
cocos_local_create_projectCreate Cocos ProjectB
Create a local Cocos Creator 3.8 project from a built-in template, optionally adding Codex mini-game skeleton scripts and the editor bridge.
Inputs: projectRoot (required), gameName, overwrite, scenePath, +6 more.
cocos_local_create_scene_from_templateCreate Cocos Scene From TemplateC
Create a Cocos Creator scene asset from the local Creator 3.8 built-in default scene templates.
Inputs: projectRoot (required), template, overwrite, sceneName, +2 more.
cocos_local_create_sprite_nodeCreate Sprite NodeA
Ensure a scene node exists, attach a Sprite component, resolve a SpriteFrame asset, assign it, and optionally save the scene.
Inputs: sprite (required), projectRoot (required), port, openScene, +4 more.
cocos_local_create_wechat_build_configCreate WeChat Game Build ConfigC
Create a Cocos Creator 3.x command-line build config JSON for the wechatgame platform.
Inputs: projectRoot (required), appid, debug, scenes, +9 more.
cocos_local_get_environmentGet Local Cocos EnvironmentB
Detect local Cocos Creator and WeChat DevTools CLI paths for local WeChat Mini Game development.
Inputs: creatorPath, wechatDevToolsCliPath.
cocos_local_inspect_projectInspect Cocos ProjectA
Inspect a Cocos Creator project root for the files and folders needed before local preview or wechatgame build.
Inputs: projectRoot (required).
cocos_local_install_editor_bridgeInstall Cocos Editor BridgeB
Install a project-local Cocos Creator 3.x editor extension that exposes a localhost bridge for scene inspection and simple scene operations.
Inputs: projectRoot (required), port, overwrite, extensionName.
cocos_local_open_projectOpen Cocos ProjectC
Launch Cocos Creator 3.8 for a local project and optionally wait until the Codex editor bridge responds.
Inputs: projectRoot (required), port, dryRun, timeoutMs, +2 more.
cocos_local_open_sceneOpen Cocos SceneC
Open a Cocos Creator scene asset in the running editor through the Codex editor bridge.
Inputs: projectRoot (required), port, scenePath, sceneUuid, +1 more.
cocos_local_place_sprite_assetsPlace Sprite AssetsB
Place multiple generated sprite assets into the active Cocos scene as Sprite nodes in one bridge operation.
Inputs: sprites (required), projectRoot (required), port, openScene, +4 more.
cocos_local_wait_for_editor_bridgeWait For Cocos Editor BridgeB
Poll the localhost Codex editor bridge until it responds or a timeout is reached.
Inputs: port, timeoutMs, intervalMs.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Each tool has a distinct verb-noun pair clearly indicating its action (create, inspect, build, etc.) on a specific domain object (scene, script, build config, etc.). No two tools have overlapping purposes.
All tools follow the exact pattern cocos_local_verb_noun in snake_case, with consistent verb usage. The naming is uniform and predictable.
19 tools cover the full lifecycle of local Cocos Creator mini-game development without being excessive. Each tool serves a clear purpose within the domain.
The set covers project creation, scene management, sprite handling, scripting, editor bridge operations, building, and environment detection. No obvious gaps for the stated purpose of local Cocos Creator development.
Maintenance
Related MCP Connectors
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
MCP server for agentverse documentation, generated by doc2mcp.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Open-source Zapier/n8n alternative as an MCP server: agents build, run and debug your workflows.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceMCP server for Cocos Creator that enables AI tools to automate scene editing, resource management, and project operations via HTTP and stdio interfaces.237-
- FlicenseNot gradedqualityDmaintenanceA comprehensive MCP server plugin for Cocos Creator 3.8+ that enables AI assistants to control the editor via standardized protocol, offering 50 tools for scene, node, component, prefab, asset, project, and debugging operations.1-
- FlicenseNot gradedqualityDmaintenanceA comprehensive MCP server for Cocos Creator 3.8+ that enables AI assistants to interact with the editor via 50+ tools for scene, node, component, prefab, asset, and project management.1-
- AlicenseNot gradedqualityCmaintenanceAn MCP server plugin for Cocos Creator 3.8+ that enables AI assistants to interact with and control the editor through a standardized protocol.27 npm1MIT