Skip to main content
Glama
chang0022

cocos-mcp-community

by chang0022

Cocos MCP Community

English | 简体中文

Una extensión del Model Context Protocol (MCP) construida por la comunidad para Cocos Creator 3.8+. Conecta un cliente de IA compatible para inspeccionar y operar el proyecto actualmente abierto en Cocos Creator.

La extensión se ejecuta localmente, escucha en 127.0.0.1 y requiere confirmación explícita para cambios persistentes o estructurales.

Versión actual: 0.2.3. La suite automatizada supera las verificaciones, y los flujos principais de lectura y de escritura aislada se han verificado con Cocos Creator 3.8.8.

Características

El servidor expone 23 herramientas MCP orientadas a intenciones. Cada herramienta agrupa acciones related to que clientes reciban un listado de herramientas en focalizado y, a la vez, mantienen amplia cobertura de editor.

Herramienta

Capacidades

project

Lee la infrmación acceso del proyecto and y proxis completion; consulta o actualiza la config de project

scene

Inspecciona la escena active and la jerarquía; abre,seuarda or guarda como escena

node

Busca, inspecciona, crea, actualiza, duplica, copia, cortas, pega, restablece, reasgna el padre o asea los nodos

component

Enumera, añadades, eliminía, inspcciona, edita o restablece components; edita matrices y esquemas de mayúl; aplica estilos de texto

asset

Verifica AssetDB, enumera e inspcciona resources, lee recursos de texto seguros, importa, crea, store, copia, move, refresca, reimporta or eliminía

prefab

Enumera e inspcciona Preabs, verifica on los usos, instancia copias ligadas o desligadas, copia o elimina de recursos y restaura las instancias

snapshot

Captura y restaura los instanes de la jerarquía; empz aa, confirma o aborta las transaciones de estructadelimitada

builder

Crea arbaros de nodos validadros or pultamos with a procardo en Canvas/Panel/Title/Button de forme atómica

validation

Verifica problemas de jerarquía and UI; valida referencias; analiza dependencias of periodic, elements missing and candidates for orphans.

capture

Captura de datos of diseno, un PNG renderizado con Caméra ou un PNG recortado from the lienzo local of the Preview

animation

Crea, guarda, genera en lotes, inspecciona y edita de forma incremental AnimationClips; adjunta y controla los clips

subviewport

Lee la resolución de diseño y el estado de vista del editor; centra o alinea los nodos; configuras opciones de 2D, cuadrícula, gizmos e iconos

editor

Lee el contexto the editor, la selección, el estado sin guardar, the saga not disposed, la availability, the entries of Cocos Creator Console, the project logs and the errors of vista

preview

Inspecciona la red de Preview, inicia destinos de Preview compatibles, recarga la Preview, detiene Game View y hace clic en los botones locales de Preview

ui

Asegura la presencia de un Canvas y crea plantillas, contenedores de Layout, diálogos, listas, barras de navegación o pantallas de configuración.

spine

Asigna los datos de Spine y enumera, reproduce, pone en cola o borra animaciones en los componentes sp.Skeleton.

font

Enumera las fuentes del proyecto y aplica una fuente de project or a fuentes del sistema en cc.Label.

reference_image

Enumera SpriteFrames y cola una imagen de referencia in scene at a resicourse of the project

environment

Reads engine y native paths, disposivos of red network, programación, and plugins

knowledge

Busca in the guías de flujos de trba de Cocos incluídas by thema

server

Lee el estado del servidor local y los metadatos the opciones recientes

preferencies

Inspecciona, dis activa, activa o a través the selection local the "herramientin de project"

cliente_config

Gen... config. "El resto de los parámetros de de configuración project for Claude Desktop, Curora, VS Code or Windsurf

Otras funcciones availables: Streamable HTTP compatible con sesión, notifación de changes in la "lista de herramientas", entradas extracted by esquema, pasos de confirmación, operaciones en lotes con reversión y presets de herramientas locales del proyecto.

Related MCP server: Cocos Creator MCP Server

Requisitos

  • Cocos Creator 3.8 o posterior.

  • Node.js 18 o posterior.

  • npm.

  • Un clien MCP compatible Con Streamable HTTP.

Instalación y uso

1. Instalar la extensión

Clona el repositorio en el directorio extensions del project Cocos, instala deps and compila:

cd /path/to/YourCocosProject/extensions
git clone <repository-url> cocos-mcp-community
cd cocos-mcp-community
npm ci
npm run build

Abra el proyecto in Cocos Creator. Si el editor ya estaba abierto, recarga las extensiones or reinicia el editor.

2. Iniciar el servidor MCP

Abra Extensión → Cocos MCP Community y selecciona Start server. El endpunto predeterminado es:

http://127.0.0.1:3100/mcp

El panel muestra el punto de conexión activo y el estado del servidor. También puedes cambiar el puerto local del proyecto o activar el inicio automático.

3. Connect an MCP client

Añada un servidor Streamable HTTP a la configuración MCP de tu cliente. La entrada genérica del servidor es:

{
  "type": "http",
  "url": "http://127.0.0.1:3100/mcp"
}

The rest of the configuration parameters differ by client. After the first connection, the client_config tool can generate complete entries for Claude Desktop, Cursor, VS Code, and Windsurf.

Restart or reconnect the MCP client after making configuration changes. If the server port changes in the Cocos panel, update the client URL as well.

4. Verify the connection

Keep the target project and scene open in Cocos Creator, then ask the AI client for a read-only action, for example:

Summarize the current Cocos scene hierarchy.
List the assets under db://assets and report any missing references.
Check the current editor and Preview errors without changing the project.

If the client can return project or scene information, the connection is ready.

5. Use editing workflows

You can describe editor tasks in natural language. For example:

Create a Canvas with a centered panel, a title, and a button in the current scene.
Set the selected Label font size to 32 and change its text to "Play".
Create an AnimationClip that moves the selected node from x=0 to x=300 in one second.

Persistent and structural changes require confirmation. A recommended workflow is:

  1. Ask the client to inspect the current state and explain the planned change.

  2. Review the target scene, nodes, assets, and paths.

  3. Confirm the operation when the client requests permission.

  4. Check the result in Cocos Creator and save the scene as appropriate.

Commit or back up important work before using tools that mutate. Use a disposable scene and temporary assets for your first attempt.

Tool management

The extension panel has two tabs:

  • Server controls the port, autوسtart, and server state.

  • Tool management provides individual tool toggles and the All, Core workflow, UI workflow, and Minimal presets.

Diminishing the set of exposed tools reduces the MCP tool definitions sent to the client. The preferences recovery tool always remains available. Clients that support tool-list change notifications refresh automatically; reconnect older clients when their tool list shows stale.

Settings are stored per project in library/cocos-mcp-community.settings.json.

Troubleshooting

  • The client cannot connect: verify that Cocos Creator is open, extensions are enabled, and the panel shows the server as running. Check that the client URL uses the same port.

  • Stale tool list: reconnect the MCP client after saving Tool management changes.

  • A scene action fails: open the target scene and try a read-only summary of that scene first.

  • A write edit is rejected: verify the target UUID or asset path and explicitly approve the requested write operation.

  • Port already in use: choose another port between 1024 and 65535 in the Server panel, then update the client configuration.

開發

npm install
npm run check
npm run build
npm run test:ci

Commando

Finalidad

npm run check

Comprues types without emitting build files

npm run build

Compila la extensión en dist/

npm run test:regression

Ejecut las comprobaciones de regresión de local

npm run test:smoke

Ejecuta la regresión y comprobaciones de transporte/descubribdition de herramientas MCP

npm run test:ci

Compila y ejecuta el suite automatizado completo

La suite smoke no moddo something modify project Cocos. Las pruebas de integración de escritura deben usar escenas desechables and temporary assets.

Estructura del obyecto

src/main.ts                 Extension lifecycle and panel messages
src/server/                 MCP transport, sessions, and tool registration
src/cocos/editor-bridge.ts  Cocos Editor integration
src/scene.ts                Scene-process operations
src/tools/                  Schema-validated MCP tools
src/panels/default/         Dockable extension panel
scripts/                    Regression and smoke tests

Contribución

Las ies and pull requests son bienvenid. Lea CONTRIBUTING.md, preserlos pasos de confirmación and verifications for persistent edits, and include tests and documentation for user-facing changes.

Contribuir

Agradecimientos

Gracias a los siguientes proyectos open source por referencia and inspiración:

Licencia

Publicado bajo la licencia MIT.

Este es un proyecto comunitario independiente y no es un producto oficial de Cocos. Cocos and Cocos Creator son marcas comerciales de sus respectivos responsables.

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    Enables AI assistants to directly control the Cocos Creator 3.8.x editor via MCP protocol, providing over 130 tools for scene, node, component, asset, and project operations.
    23
    37
    MIT
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables AI assistants to interact with the Cocos Creator 3.8+ editor through standardized protocols for scene, node, component, prefab, asset, project, debugging, and server operations.
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI assistants to directly control the Cocos Creator game editor via MCP protocol, supporting scene management, node manipulation, component attachment, and asset management.
    23
    1
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP clients to control Cocos Creator 2.x for UI design, such as translating Figma designs into Cocos scenes by creating nodes, components, and prefabs.

View all related MCP servers

Related MCP Connectors

  • Control Unreal Engine to browse assets, import content, and manage levels and sequences. Automate…

  • Create, browse, remix, collaborate on, and run durable AI workflow nodes from MCP hosts.

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chang0022/cocos-mcp-community'

If you have feedback or need assistance with the MCP directory API, please join our Discord server