cocos-mcp-community
Cocos MCP Community
Расширение для Cocos Creator 3.8+ на основе Model Context Protocol (MCP), созданное сообществом. Подключите совместимый ИИ-клиент, чтобы просматривать проект, открытый в Cocos Creator, и управлять им.
Расширение работает локально, прослушивает 127.0.0.1 и требует явного подтверждения для постоянных или структурных изменений.
Текущая версия:
0.2.3. Автоматизированный набор тестов проходит, а основные сценарии чтения и изолированной записи проверены в Cocos Creator 3.8.8.
Возможности
Сервер предоставляет 23 целенаправленных MCP-инструмента. Каждый инструмент группирует связанные действия, как клиенты получают сфокусированный спискинструментов, retaining широким охватм редактора.
Tool | Capabilities |
| Читать информацию о проекте и сводки по ресурсам; запрашивать или обновлять конфигурацию проекта |
| Просматривать активную сцену и иерархию; открывать, сохранять или сохранять как сцену |
| Находить, просматривать, создавать, обновлять, дублировать, копировать, вырезать, вставлять, сбрасывать, переназначать родителя или удалять узлы |
| Перечислять, добавлять, удалять, просматривать, редактировать или сбрасывать компоненты; редактировать массивы и события Button; применять стили текста |
| Проверять AssetDB, перечислять и просматривать ресурсы, читать безопасные текстовые ресурсы, импортировать, создавать, сохранять, копировать, перемещать, обновлять, реимпортировать или удалять |
| Перечислять и просматривать префабы, искать места использования, создавать связанные or несвязанные копии, копировать or удалять ассеты и восстанавливания экземпляры |
| Захватывать and восстанавливать снимки иерархии; начаrinaть, фиксировult or прерывать scoped structural transactions |
| Создавать проверенные дерева узлов or полный экран UI Canvas/Panel/Title/Button atomically |
| Просматривать andерархию and UI; validating references; анализировать зависitmoists, циклы, cutыll missing and orphan candidates |
| Захватывать layout data, Camera-rendered PNG or cropped local Preview-canvas PNG |
| Create, save, batch generate, inspect, and incrementally edit AnimationClips; bind and control clips |
| читать design resolution and editor view state; focus or align nodes; configure 2D, grid, gizmo and icon options |
| Read editor context, selection, unchanged state, readiness, Creator Console entries, project logs, Preview errors |
| Проверять архив Preview networking, запускать supported целей Preview, обновлять Preview, stop Game View and click Buttons local Preview |
| requires a Canvas and create templates, Layout containers, dialogs, lists, navigationbars, settings screens |
| Assigning Spine data; list/play/queue/clear animations on |
| Listing project fonts; applying project font or system font to |
| List SpriteFrames and place an in-scene reference image from project asset |
| Checking engine and platform paths, devices, editor networking, and editor. |
| Поиск встроенных Cocos по теме |
| Read local service status and latest operation metadata |
| inspect, disable, enable, reset local tool selection |
| Generate client configuration for Claude Desktop, Storm, VS Code, Windsurf |
Additional workflow features include session-aware Streamable HTTP, tool-list notifications, schema-validated input, confirmation gates, rollback-aware batch operations and project-specific tool preset.
Related MCP server: Cocos Creator MCP Server
Requirements
Cocos Creator
3.8or laterNode.js
18or laternpm
MCP client with Streamable HTTP support
Installation and usage
1. Install the extension
Clone the repository into the extensions directory of the Cocos project, install dependencies and build:
cd /path/to/YourCocosProject/extensions
git clone <repository-url> cocos-mcp-community
cd cocos-mcp-community
npm ci
npm run buildOpen the project in Cocos Creator. If the editor is already open, reload the extensions or restart the editor.
2. Launch MCP server
Open Extensions → Cocos MCP Community and select Start server. The default endpoint is:
http://127.0.0.1:3100/mcpThe panel displays the active endpoint and server status. You can also change the per-project port or enable automatic starting.
3. Connect MCP client
Add a Streamable HTTP server to the MCP settings of your client. The generic server entry:
{
"type": "http",
"url": "http://127.0.0.1:3100/mcp"
}The remaining configuration differs. After the first connection, client_config can generate full entries for Claude Desktop, Cursor, VS Code, Windsurf.
After changing client configuration, restart or reconnect MCP client. If the server port changed on the Cocos panel, update the client URL accordingly.
4. Check the connection
Keep the target project and scene open in Cocos Creator, then request a read-only action from AI client, 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 reports project or scene information, connection is ready.
5. Use editing workflows
You can define 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 explicit confirmation. Recommended workflow:
Ask the client to inspect current state and explain planned change.
Check the target scene, nodes, assets, paths.
Confirm the operation when client asks for permission.
View result in Cocos Creator and save scene if needed.
Do not "confusion. Use a disposable scene and temporary assets for first trial.
Manage tools
Tool panel contains two tabs:
Server tab controls port, auto-install and server state.
Tool managing tab includes individual tool switches and All, Core workflow, UI workflow, Minimal presets.
Reducing exposed toolset reduces number of MCP tool definitions sent to client. The client_config tool remains always available. Clients supporting tool list updates reload automatically; reconnect old clients if tool list does not change.
Settings are saved per project at library/cocos-mcp-community.settings.json.
Troubleshooting
Client can’t connect: make sure Cocos Creator is open, the extension is enabled, and the panel reports server running. Ensure client URL uses same port.
Tool list is outdated: reconnect MCP client after changes in the Tool management.
Scene operation fails: open the target scene and try read-only scene summary first.
Modify rejected: check target UUID or asset path and explicitly approve requested write operation.
Port occupied: select another port between
1024and65535in Server tab and update client configuration.
Development
npm install
npm run check
npm run build
npm run test:ciCommand | Purpose |
| Run type check without emitting compiled files |
| Build the extension into |
| Run local regression tests |
| Run regression and MCP transport/tool-discovery tests |
| Build and run full suite |
Smoke tests do not change Cocos project. Integration tests should use temporary scene and temporary asset.
Project structure
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 testsContribution
Issues and pull requests are welcome. Please read CONTRIBUTING.md, preserve confirmation flows for persistent edits, and add tests and docs for user-facing changes.
Acknowledgements
Thanks to the following open-source projects for reference and inspiration:
License
Available under MIT License.
This is an independent community project and is not official Cocos product. Cocos and Cocos Creator are trademarks.
This server cannot be installed
Maintenance
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
- AlicenseNot gradedqualityFmaintenanceEnables 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.2337MIT
- -licenseNot gradedqualityNot gradedmaintenanceEnables 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.
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to directly control the Cocos Creator game editor via MCP protocol, supporting scene management, node manipulation, component attachment, and asset management.231MIT
- FlicenseNot gradedqualityBmaintenanceEnables 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.
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…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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