About Cc 3 8 X MCP
Cc 3 8 X MCP is an MCP server published by HappyLifeOk in the Browser category: cocos Creator 3.8.x 的 MCP 服务 + 离线 CLI:把编辑器的场景/资源/预览/构建/进程控制以 MCP 协议暴露给 AI 客户端,附带 headless prefab 读写与命令行打包。. Conduid read 28 tools from its source: asset_create, asset_delete, asset_move, asset_query_assets, asset_query_info, asset_query_url and 22 more. No package is published for it, so it installs from a source checkout.
The repository has 160 stars and 35 forks, is licensed Apache-2.0, and its last commit was on 18 Nov 2026. The latest release is v3.0.0. The release before it was v2.0.0. It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass No dynamic code execution. Its topics include browser.
Install
git clone https://github.com/HappyLifeOk/cc-3-8-x-mcpTools (28)
asset_create创建资源(文本内容)| Parameter | Type | Description |
|---|---|---|
| content * | string | |
| overwrite | boolean | |
| url * | string |
asset_delete删除资源| Parameter | Type | Description |
|---|---|---|
| url * | string |
asset_move移动资源| Parameter | Type | Description |
|---|---|---|
| source * | string | |
| target * | string |
asset_query_assets按 pattern 列出资源(glob,如 db://assets/**/*.prefab)| Parameter | Type | Description |
|---|---|---|
| ccType | string | 可选:cc 类型过滤,如 cc.Prefab |
| pattern | string |
asset_query_info按 url 或 uuid 查询资源元数据| Parameter | Type | Description |
|---|---|---|
| urlOrUUID * | string |
asset_query_url由 uuid 反查 url| Parameter | Type | Description |
|---|---|---|
| uuid * | string |
asset_query_uuid由 url 反查 uuid| Parameter | Type | Description |
|---|---|---|
| url * | string |
asset_refresh刷新资源(可指定子目录)| Parameter | Type | Description |
|---|---|---|
| url | string | 默认 db://assets/ |
asset_reimport重新导入指定资源| Parameter | Type | Description |
|---|---|---|
| url * | string |
asset_save保存已有资源内容| Parameter | Type | Description |
|---|---|---|
| content * | string | |
| url * | string |
local_clean_dev_dir清理 .dev 临时产物local_get_status获取插件本地状态(git 分支/HEAD、watchers、预览、命令日志)local_list_worktrees扫描同机其他 worktree 的 dev-reload-info.jsonlocal_open_dev_dir在 Finder 打开 .dev 目录local_reload_packagereload(disable→enable)指定编辑器扩展,让其 JS 代码改动生效,无需重启编辑器。本质 Editor.Package.disable→enable,fire-and-forget 立即返回。| Parameter | Type | Description |
|---|---|---|
| name * | string | 扩展名(package.json 的 name,如 state-ctrl-gen) |
prefab_batch[offline] 不需要 Cocos 编辑器运行。从 JSON 文件读取 ops 后批量编辑 prefab。
opsJsonPath 指向一个 JSON 文件,内容为 op 数组(与 prefab_edit 的 ops 格式相同)。
两个路径均必须为绝对路径。| Parameter | Type | Description |
|---|---|---|
| filePath * | string | prefab 文件的绝对路径 |
| opsJsonPath * | string | ops JSON 文件的绝对路径 |
prefab_edit[offline] 不需要 Cocos 编辑器运行。声明式批量编辑 prefab 文件,全部 op 成功后一次性落盘。
支持 CLI editPrefab 的全部 op;组件操作包括 add-component / remove-component / replace-component / set-component-ref。
replace-component 在原组件 __id__ 槽位平替,默认保留字段、引用、组件顺序和 fileId;可用 replacementType 换类型,refreshFileId=true 模拟删旧再挂新。
op.node / op.parent / op.refNode 可以是节点名称字符串,或 { id: N } 按 __id__ 定位。| Parameter | Type | Description |
|---|---|---|
| filePath * | string | prefab 文件的绝对路径 |
| ops * | array | op 描述数组,参考 cli editPrefab 文档 |
prefab_query[offline] 不需要 Cocos 编辑器运行。查询 prefab 文件节点树或单节点详情。
selector.type 可选:
tree(默认)→ 精简节点树
node → { name } 按名称查单节点详情
find → { nodeType } 返回所有匹配 __type__ 的元素 id 列表| Parameter | Type | Description |
|---|---|---|
| filePath * | string | prefab 文件的绝对路径,如 /path/to/HomeUI.prefab |
| selector | object | 查询选择器,不传时默认 type="tree" |
preview_query_url查询当前预览地址preview_refresh_and_reload一键:刷新资源 + 软重载场景scene_execute_component_method调用指定节点的组件方法| Parameter | Type | Description |
|---|---|---|
| args | array | |
| name * | string | 方法名 |
| uuid * | string |
scene_execute_script直接调用扩展 Scene 脚本方法,避免组件内同 Scene 重入等待| Parameter | Type | Description |
|---|---|---|
| args | array | 传给 Scene 脚本方法的参数列表 |
| extension * | string | 扩展 package.json 的 name |
| method * | string | 扩展 scene.js 导出的 methods 方法名 |
scene_open_scene打开场景(传场景资源 uuid)| Parameter | Type | Description |
|---|---|---|
| uuid * | string | 场景资源 uuid |
scene_query_node查询单节点完整 dump(含所有组件属性)| Parameter | Type | Description |
|---|---|---|
| uuid * | string |
scene_query_node_tree查询当前场景节点树;传 uuid 查子树| Parameter | Type | Description |
|---|---|---|
| uuid | string | 可选:节点 uuid |
scene_save_scene保存当前场景scene_set_property设置节点/组件属性(path 为 dump path,如 `position`、`comps.0.string`)| Parameter | Type | Description |
|---|---|---|
| dump * | object | |
| path * | string | |
| uuid * | string |
scene_soft_reload软重载场景,不清编辑器状态Security checks
Static checks derived from the repository 11 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 1.1K words.
- ✓License declaredThe repository declares the Apache-2.0 license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by package-lock.json.
- !No dynamic code executionScanned 88 source files and found 5 calls to eval or shell execution, in cli/src/classid-resolver.js:59, cli/src/uuid-resolver.js:79 and main.js:207 among others. Review how tool inputs reach them before granting credentials.
1 check has not been run yet.
What the source scan found
- Transport
- None found in the source
- Starts other programs
- 13 callscli/src/classid-resolver.js:59, cli/src/cli/build-cmd.js:130, cli/src/cli/open-cmd.js:77
- Outbound network calls
- 2 callspanel/index.js:194, router/src/http-json-rpc.js:84
- Writes or deletes files
- 28 callscli/src/cli/compact-cmd.js:109, cli/src/cli/create-cmd.js:151, cli/src/cli/create-cmd.js:153
- Lockfile
- package-lock.json
Pattern matches on the source text of 88 files: places to read, not proof of what the code does at run time.
Releases
README
The repository's README runs to about 1.1K words, fetched a month ago. The original in the repository is authoritative.
Read full README