cocos-mcp-control

cocos-mcp-control is a skill for Codex from HappyLifeOk/cocos-mcp-gateway. It costs 60 tokens per session (750 once invoked), scanned A, original, Apache-2.0.

A guide for connecting an MCP client to a Cocos Creator project, a game project made with the Cocos editor. It covers editor selection, scenes, assets, prefabs, animations, previews, and project extensions.

In plain words
What is it for?
Use it to query or edit prefabs and animations, manage assets, refresh previews, start the correct editor, and validate changes in a Cocos project.
Why use it?
It prevents commands from being sent to the wrong project or editor and defines checks to perform before and after asset changes.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to query or edit prefabs and animations, manage assets, refresh previews, start the correct editor, and validate changes in a Cocos project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/happylifeok/cocos-mcp-gateway/cocos-mcp-control
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HappyLifeOk/cocos-mcp-gateway --skill cocos-mcp-control
Clone the repo
git clone --depth 1 https://github.com/HappyLifeOk/cocos-mcp-gateway

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cocos-mcp-control

README.md
[![agentmods](https://agentmods.dev/badge/skills/happylifeok/cocos-mcp-gateway/cocos-mcp-control/github.svg)](https://agentmods.dev/skills/happylifeok/cocos-mcp-gateway/cocos-mcp-control)
Your own site
<a href="https://agentmods.dev/skills/happylifeok/cocos-mcp-gateway/cocos-mcp-control"><img src="https://agentmods.dev/badge/skills/happylifeok/cocos-mcp-gateway/cocos-mcp-control/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cocos-mcp-control

Your own site · 80×15
<a href="https://agentmods.dev/skills/happylifeok/cocos-mcp-gateway/cocos-mcp-control"><img src="https://agentmods.dev/badge/skills/happylifeok/cocos-mcp-gateway/cocos-mcp-control.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 750 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.00750
Opus 5 $0.00030 $0.00375
Sonnet 5 $0.00012 $0.00150
Haiku 4.5 $0.00006 $0.00075

Measured 12d ago against content hash 2740728be541, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

cocos-mcp-control scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cocos-mcp-control/SKILL.md · 40 lines

What it actually says

Cocos MCP 控制

绑定当前项目

  1. 从当前工作目录向上寻找同时包含 assets/settings/package.json 的项目根。
  2. 调用 gateway_list_editors,用规范化后的绝对 projectPath 精确匹配当前项目。不要只凭工具前缀或项目名猜实例。
  3. 匹配后使用该实例的 <shortName>__* 工具。多个项目同时打开时只操作当前项目。
  4. 没有匹配实例时,读取项目 package.jsoncreator.version,调用 editor_spawn,显式传绝对 projectPath 和版本,再等待就绪。
  5. gateway_list_editors 只应返回 transport=editor-bridgegatewayApiVersion>=2bridgeApiVersion=1 的实例;旧项目 /mcp 不受支持。
  6. Cocos Creator 3.8.x 项目缺少 extensions/cc-3-8-x-mcp 时:若用户要求接入项目,运行 cocos-mcp-connect <项目绝对路径>;若当前任务未授权安装扩展,则停止并说明缺失。非 3.8.x 项目不得安装此扩展。

选择入口

  • .prefab.anim 的结构化查询与修改:优先使用全局 prefab_queryprefab_editprefab_batch;路径必须为绝对路径。
  • 场景运行态、AssetDB、预览和编辑器状态:使用当前项目带前缀的 MCP 工具。
  • 项目扩展的 /bridge 是 Gateway 私有协议;不要直接调用、不要把它注册成 MCP Server,也不要输出注册记录里的 token。
  • 浏览器中的真实交互:先用 MCP 获取预览 URL,再交给可用的浏览器工具。
  • 纯文本源码和文档:使用普通文件工具,不走 Prefab CLI。

修改 Prefab 前先查询节点树或字段;批量修改先 dry-run;任一操作失败时不要绕过 CLI 直接改 JSON。

修改后的闭环

  1. 单个资源修改后调用当前项目的 asset_reimport
  2. 多资源或依赖不确定时调用 asset_refresh,再调用 preview_refresh_and_reload
  3. 尊重项目自己的预览刷新守卫、服务端和测试账号约定。
  4. 运行项目要求的类型检查或定向验证,并区分静态验证与真实预览验证。

安全边界

  • 重启或关闭编辑器前先确认目标 projectPath;工具报告存在活跃调试连接时,不传 force 绕过。
  • editor_spawneditor_restarteditor_wait_ready 在编辑器未注册时必须显式传绝对项目路径。
  • 工具行为、文档与实际不一致时报告插件问题,不在业务项目添加临时 workaround。
  • 详细工具分工和失败排查见 references/operations.md
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 40 lines · 60 tokens per session scan A 2740728be541

Subscribe to this mod's changes

cocos-mcp-control is a skill published in the GitHub repository HappyLifeOk/cocos-mcp-gateway (2 stars, last pushed 3d ago), licensed Apache-2.0. It adds 60 tokens to every session and 750 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

gameobject-component-destroy

Destroy one or more Components from a target GameObject. Missing (null) components are skipped — they cannot be destroyed. Use 'gameobject-find' and 'gameobject-component-get' to identify the components first.

IvanMurzak/Unity-MCP · 49 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

godot-signals-groups

Build event-driven, decoupled Godot 4.7 gameplay with signals and node groups: declare and emit custom signals, connect with Callables (incl. bind/one-shot), and broadcast to many nodes via groups and callgroup. Use when wiring node communication in a Godot project, replacing tight references with signals…

gamedev-skills/awesome-gamedev-agent-skills · 95 tokens

motion

How an agent turns a character mesh into a usable animated FBX — and how to judge whether the result is shippable.

OpenDCAI/GameFactory-3A · 0 tokens

unity-addressables

Manage Addressables groups, entries, profiles and content builds (com.unity.addressables, reflection-based).

Besty0728/Unity-Skills · 25 tokens

threejs-exposure-color-grading

Build a measured exposure and grading path in Three.js. Use for a 64x36 encoded luminance meter, asynchronous readback, weighted log-average exposure, asymmetric adaptation, single tone-map ownership, and a generated 32-cube post-tone-map LUT.

scottstts/Threejs-Awesome-Graphics-Agent-Skills · 60 tokens