Cocos Creator workflows¶
Install the extension and run a first scene read before following the live examples. Run commands with uv run --project server --locked --no-dev from the repository root, or with the project environment on your PATH.
Discover and call tools¶
By default, cocos-mcp serve advertises four MCP tools. Search the catalog with discover_tools, inspect a signature with tool_help, and dispatch by effect with read_game_tool or edit_game_tool. Set the client's arguments to ["serve", "--profile", "full"] to advertise the individual typed engine tools used by existing clients.
Run cocos-mcp skills to list installed skills and cocos-mcp skills cocos-batch to read the batch guide offline. Both MCP profiles publish the guide as the native skill skill://cocos-batch/SKILL.md, the batch_guide prompt, and the biome://skills/cocos-batch resource.
cocos-mcp list 3d
cocos-mcp describe get_camera_3d
cocos-mcp tree --depth 2 --limit 20 --ids
cocos-mcp call get_editor_status '{}' --fields state --etag
cocos-mcp call screenshot '{}' --image ./capture.png
list and describe work offline. tree and call use the configured live project. Tree output defaults to bounded text with native IDs. For labels only, use --no-ids or include_ids: false. Use --root, --depth, and --limit to narrow the tree, --summary for counts, or --json for structured output.
Use tree --children --root ID --limit 50 --json to page a wide branch. Pass the returned next_cursor to --cursor with the same root. If sibling membership or order changes, start again with an empty cursor. Use the scene UUID to page its top-level nodes.
Read calls can select top-level result keys with --fields or MCP's fields. Text row limits default to 50. To check for changes, repeat the same read and options with the returned ETag as --if-none-match or MCP's if_none_match. The bridge performs the read and returns a short not_modified result when the selected output matches. Call execute_batch for read-only batches or for atomic property batches of rename_node and set_node_active. Screenshots arrive as MCP image content. With the CLI, --image writes to a new file and stdout reports image metadata.
Tools¶
The generated tool catalog describes 137 engine tools. The original catalogs cover 129 editor, scene, asset, and media operations. The 3D domain adds eight.
Tools marked scene_ready require an active scene. Depth 0 returns just the root. The tree caps results at 1,000 nodes, including the root.
The 3D tools work with native Creator nodes identified by UUID and their Camera, light, and MeshRenderer components. Primitive creation uses a built-in mesh, with an optional project material asset for a custom color. Use Creator's save_scene and open_scene tools to persist and reopen native .scene assets. Bounds are axis-aligned. Projection and triangle picking use bottom-left-origin render target pixels and an enabled camera with a render target. The 3D verification fixture shows how to launch the Observatory scene.
The editor applies project security levels, presets, and per-tool overrides at call time. Use is_mcp_tool_enabled to check availability. The MCP schema stays stable when these settings change or when the bridge reconnects.
The Cocos implementation has the following limits.
- Timeline editing covers editable native
AnimationClipassets with numeric andVec3tracks. Signal tools work with serialized Cocos UI event bindings. run_testsruns named scene assertions in the editor and retains a bounded history for the current editor process.- File tools are confined to ordinary paths under
db://assets. Text writes are limited to.json,.txt,.csv, and.tsv. Copy, move, and delete operate on individual registered asset files. validate_referencesreports incomplete coverage on a dirty scene, where it can inspect live properties. Save the scene to include serialized asset references in the check.
Run writes serially and pause manual scene changes while each write is in flight. Creator's scene checks and edit commands are separate operations, so changing scenes or editing through the GUI during a write can race with the tool. After unknown_outcome or a lost response during a write, reconnect and inspect the active scene or saved asset before deciding whether to retry. If Creator reports editor_busy, wait for the in-flight operation to settle. If the editor stays stalled, check its state and use Restart bridge once you have reconciled any pending edits.
See the verification guide for core contract coverage, the disposable fixture, and commands for native Creator and MCP stdio acceptance. Verification guide