Files
furao bee9f89c98 跨平台化:移除 AppleScript + 去 macOS 硬编码
- 删除浏览器交互的 AppleScript(osascript 控 Chrome/Safari 做截图/eval/刷新/打开),
  改由外部 playwright MCP 承担;保留走 Editor.Message 的跨平台编辑器操作
- openDevDir 打开命令按平台分支(mac=open / win=explorer / linux=xdg-open)
- execPath 解析弱化靠注册表/进程查询,删掉 /Applications macOS 硬编码兜底
- editor-control 去 macOS-only 假设,ps 进程查询按平台分支(win 用 wmic)
- build-cmd Cocos 安装路径按平台拼

Win 特定逻辑(wmic、CocosDashboard 安装路径)标 TODO[win-verify],待 Windows 实测补全。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 17:54:05 +08:00

53 lines
1.6 KiB
JSON

{
"package_version": 2,
"version": "2.0.0",
"name": "cc-3-8-x-mcp",
"title": "Cocos Creator 3.8.x MCP Server",
"description": "把 Cocos Creator 3.8.x 编辑器能力(scene/asset-db/preview/local)以 MCP 协议暴露给外部 AI 客户端;兼容原 dev-reload 信号文件通道",
"license": "Apache-2.0",
"author": "付饶",
"editor": ">=3.8.0",
"main": "./main.js",
"panels": {
"default": {
"title": "Cocos MCP",
"type": "dockable",
"main": "panel/index.js",
"size": {
"min-width": 340,
"min-height": 460,
"width": 400,
"height": 560
}
}
},
"contributions": {
"menu": [
{
"path": "i18n:menu.extension/Cocos MCP",
"label": "功能面板",
"message": "open-panel"
},
{
"path": "i18n:menu.extension/Cocos MCP",
"label": "重启 MCP Server",
"message": "restart-server"
}
],
"messages": {
"open-panel": { "methods": ["openPanel"] },
"restart-server": { "methods": ["restartServer"] },
"get-status": { "methods": ["getStatus"] },
"get-mcp-config": { "methods": ["getMcpConfig"] },
"refresh-assets": { "methods": ["refreshAssets"] },
"query-preview-url": { "methods": ["queryPreviewUrl"] },
"trigger-refresh": { "methods": ["triggerRefresh"] },
"trigger-reimport": { "methods": ["triggerReimport"] },
"soft-reload-scene": { "methods": ["softReloadScene"] },
"clean-dev-dir": { "methods": ["cleanDevDir"] },
"list-worktrees": { "methods": ["listWorktrees"] },
"open-dev-dir": { "methods": ["openDevDir"] }
}
}
}