CC

caravanglory/cocos-mcp-server

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

45 stars 18 forks Качество 61 Тренд 0

caravanglory/cocos-mcp-server - кандидат на сервер MCP, импортированный из https://github.com/caravanglory/cocos-mcp-server.

Обзор

caravanglory/cocos-mcp-server - кандидат на сервер MCP, импортированный из https://github.com/caravanglory/cocos-mcp-server.

Обзор (машинный перевод)

Cocos Creator 3.8.x → AI MCP (Model Context Protocol) , AI (Claude Cursor ) Cocos Creator

Плагин сервера AI MCP (Model Context Protocol) для Cocos Creator 3.8.x, позволяющий помощникам AI (Claude, Cursor и др.) напрямую управлять редактором Cocos Creator.

Feature / Особенности

MCP / MCP Protocol: JSON-RPC 2.0 MCP , HTTP / Standard JSON-RPC 2.0 over HTTP transport -130+Инструменты130+Инструменты**:景Информационные ресурсы of/Полный охват сцены, узла, компонента, сборки, актива и проектных операций

  • Vue 3 - / Панель управления Vue 3: 工の- / Встроенный интерфейс управления сервером и инструментами

  • совместимость 工/конфигурация инструмента: s/sсовместимость s/включение/отключение инструментов по требованию и сохранение пользовательских конфигураций *** / Автозапуск **: 载の the / Необязательно автоматически запускать сервер при загрузке расширения ** and / Двуязычный интерфейс **: 中 and / and / Английский и китайский интерфейс

##Совместимость

Создатель кокосов / Статус [скрыто] [скрыто] | 3.8.x | / Полностью поддерживается | | 3.7.x | / Непроверенный |

法 ⇒ Установка

-一:- / Вариант 1: Расширение уровня проекта

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

Cocos MCP Server

适用于 Cocos Creator 3.8.x 的 AI MCP (Model Context Protocol) 服务器插件,让 AI 助手(Claude、Cursor 等)能够直接控制 Cocos Creator 编辑器。

An AI MCP (Model Context Protocol) server plugin for Cocos Creator 3.8.x, enabling AI assistants (Claude, Cursor, etc.) to directly control the Cocos Creator editor.


功能特性 / Features

  • MCP 协议 / MCP Protocol:基于 JSON-RPC 2.0 的标准 MCP 协议,通过 HTTP 传输 / Standard JSON-RPC 2.0 over HTTP transport
  • 130+ 工具 / 130+ Tools:覆盖场景、节点、组件、预制体、资源、项目等全方位编辑器操作 / Full coverage of scene, node, component, prefab, asset, and project operations
  • Vue 3 控制面板 / Vue 3 Control Panel:内置服务器控制和工具管理界面 / Built-in server control and tool management UI
  • 工具配置管理 / Tool Configuration:按需启用/禁用工具,保存自定义配置 / Enable/disable tools on demand and save custom configurations
  • 自动启动 / Auto-start:可配置插件加载时自动启动服务器 / Optionally start the server automatically when the extension loads
  • 双语支持 / Bilingual UI:中文/英文界面 / English and Chinese interface

兼容性 / Compatibility

Cocos Creator 状态 / Status
3.8.x 完全支持 / Fully supported
3.7.x 未测试 / Untested

安装方法 / Installation

方式一:项目级插件 / Option 1: Project-level Extension

将插件目录复制到 Cocos Creator 项目的 extensions 目录下:

Copy the plugin folder into the extensions directory of your Cocos Creator project:

{your-project}/
└── extensions/
    └── cocos-mcp-server/

方式二:全局插件 / Option 2: Global Extension

将插件目录复制到全局插件目录:

Copy the plugin folder to the global extensions directory:

~/.CocosCreator/extensions/cocos-mcp-server/

启用插件 / Enable the Extension

  1. 打开 Cocos Creator 3.8.x / Open Cocos Creator 3.8.x
  2. 菜单栏 → 扩展 → 扩展管理器 / Go to Extension → Extension Manager
  3. 在 项目 或 全局 标签页找到 cocos-mcp-server / Find cocos-mcp-server under the Project or Global tab
  4. 点击启用 / Click Enable

开发构建 / Development Build

# 安装依赖 / Install dependencies
npm install

# 编译 TypeScript / Compile TypeScript
npm run build

# 开发模式(文件监听)/ Development mode (file watching)
npm run watch

编译输出位于 dist/ 目录。/ Compiled output is placed in the dist/ directory.


使用方法 / Usage

1. 启动服务器 / Start the Server

插件启用后,通过菜单 扩展 → Cocos MCP Server 打开控制面板,点击"启动服务器"。

After enabling the extension, open the control panel via Extension → Cocos MCP Server, then click Start Server.

默认服务器地址 / Default server address:http://127.0.0.1:3000/mcp

2. 连接 AI 客户端 / Connect an AI Client

Claude Code:

claude mcp add --transport http cocos-creator http://127.0.0.1:3000/mcp

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "cocos-creator": {
      "url": "http://127.0.0.1:3000/mcp",
      "transport": "http"
    }
  }
}

Cursor / VS Code: 在 MCP 设置中添加 HTTP 类型服务器,URL 填写 http://127.0.0.1:3000/mcp。

Add an HTTP-type MCP server in your MCP settings and set the URL to http://127.0.0.1:3000/mcp.


工具列表 / Tool Reference

场景工具 / Scene Tools (8)

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "cocos-creator": { "url": "http://127.0.0.1:3000/mcp", "transport": "http" } } }