Get the FREE Ultimate OpenClaw Setup Guide →

cocos

一款全面的、便捷的cocos creator AI MCP服务插件,适用于3.8.0以上cocos版本,一键安装,一键启动。A comprehensive and convenient cocos creator AI MCP service plug-in, suitable for cocos versions above 3.8.0, one-click installation and one-click start.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio daxianlee-cocos-mcp-server node dist/server.js \
  --env PORT="3000" \
  --env DEBUG="mcp:*"

How to use

This MCP server provides a Cocos Creator focused Model Context Protocol (MCP) endpoint that exposes 50 core tools for editing scenes, nodes, components, prefabs, assets, project settings, debugging, and more. Clients can connect via HTTP to the server at http://localhost:3000/mcp (or your configured port) and issue standardized MCP tool calls using the defined tool names and parameters. The server aggregates a comprehensive set of editor operations such as scene_management, node_lifecycle, component_manage, prefab_browse, asset_manage, project_manage, and server_info, enabling an AI assistant to control and automate editor workflows. To use with Claude, Cursor, or other MCP clients, configure the mcpServers section in the client to point at http://<host>:<port>/mcp and reference the available 50 core tools by category and operation.

Once connected, you can request tool lists, send action payloads for creating nodes, instantiating prefabs, adjusting transform properties, managing assets, and broadcasting messages. The unified operation-code naming convention (category_action) and a consistent argument schema help AI clients generate valid requests with minimal prompting. This server aims to cover 99% of common editor tasks via MCP, with 50 high-coverage tools and extensive compatibility with Cocos Creator APIs.

How to install

Prerequisites:

  • Node.js (≥ 14.x) and npm installed
  • Basic familiarity with extending Cocos Creator projects

Installation steps:

  1. Ensure you have a Cocos Creator project with the extension installed. If not, clone or download the cocos-mcp-server extension.
  2. Navigate to the plugin folder:
cd extensions/cocos-mcp-server
  1. Install dependencies:
npm install
  1. Build the plugin/server (if a build step is provided):
npm run build
  1. Start the MCP server (as defined in mcp_config, typically via the host application or node command):
node dist/server.js
  1. Verify the server is running by curling the MCP endpoint:
curl http://localhost:3000/mcp

Prerequisites recap:

  • A working Node.js and npm environment
  • Access to the project folder containing the cocos-mcp-server extension
  • Knowledge of the port you wish to expose (default 3000) and ensuring it is not blocked by firewall

Additional notes

Tips and common considerations:

  • The MCP server is designed to work with Cocos Creator 3.8+; ensure your editor version is compatible.
  • The default port is 3000; you can override it by setting the PORT environment variable when launching the server.
  • Enable verbose/debug logging to diagnose integration issues with AI clients; the DEBUG environment variable can be adjusted accordingly.
  • The npm package name for this Node.js server is cocos-mcp-server; if you publish or deploy differently, update the mcp_config accordingly.
  • When connecting from AI clients, reference the endpoint as /mcp and use the stated tool categories and actions (e.g., scene_management_open, node_lifecycle_create).
  • If you encounter authentication or rate-limit issues, consider adding additional middleware to control access or adjust max connections via the configuration.

Related MCP Servers

Sponsor this space

Reach thousands of developers