# Funplay Cocos MCP [Health: Active]

**Category:** 🎮 Gaming  
**Repository:** https://github.com/FunplayAI/funplay-cocos-mcp  
**GitHub Stars:** 388  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/funplay-cocos-mcp

## Description
stdio bridge for the local Cocos Creator Editor MCP server from FunplayAI/funplay-cocos-mcp.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "funplay-cocos-mcp": {
    "command": "npx",
    "args": ["-y","@deepseek-ai/dsh"]
  }
}
```

## Documentation

## What Funplay Cocos MCP does

Funplay Cocos MCP connects MCP-compatible AI clients to a live Cocos Creator project. It runs inside the editor as a Cocos Creator extension and exposes an HTTP MCP server for the active project. The extension is intended for editor use and supports Cocos Creator 3.8 and later.

The central workflow uses `execute_javascript`. An assistant can send JavaScript to the active scene/runtime context or to the Cocos editor/browser context. This supports operations such as building a UI hierarchy under an active Canvas, attaching Cocos components, inspecting the result, and capturing a screenshot for validation. The tool surface is designed to stay focused, with JavaScript execution providing the main flexible interface.

## How it works

After the extension starts, the editor exposes a local HTTP endpoint. New projects receive a project-derived port in the `20000–29999` range, while saved configurations retain their configured port. The MCP Server panel displays the exact URL that clients should use.

If the selected port is occupied, the extension checks whether the listener belongs to the same Cocos project. It reuses a matching listener and selects another local port when the listener belongs to something else. A temporary fallback port can be pinned from the panel before client setup.

JavaScript calls can target two contexts:

- `scene`: the active Cocos scene or runtime context
- `editor`: the Cocos Creator editor or browser context

Script calls retain console output from the injected `console`, including messages emitted before a failure. Responses can include execution details such as context, duration, bounded logs, and omitted-entry counts. Recent Activity in the editor shows call summaries, results, and execution logs separately.

## Setup and configuration

Install the extension from the Cocos Store, or place a cloned or released extension directory under a project's `extensions/` directory. Restart Cocos Creator or reload extensions after a local installation.

The extension can also be installed for all projects using Funplay > MCP Settings. That option downloads the latest GitHub release, verifies its SHA256 checksums, and places it in the managed global extension directory for the selected Cocos Creator version. Global installations are separated by Creator version. A project-level copy is not removed, so duplicate-install warnings may appear until the project copy is removed or disabled.

Open Funplay > MCP Server to enable the endpoint and configure a client. The MCP Client Config section provides one-click setup and a preview of the selected configuration. The generated server name follows the `cocos-<project>-<hash>` pattern. Manual configuration is also possible with the URL shown in the panel; older examples using `funplay_cocos` or port `8765` may need to be replaced.

## Tools and capabilities

- Execute JavaScript in the active scene/runtime context.
- Execute JavaScript in the Cocos editor/browser context.
- Create or modify scene UI and attach Cocos components through editor-side scripting.
- Inspect execution results and capture screenshots for validation workflows.
- Review recent MCP activity, return values, execution logs, and bounded script output.
- Configure MCP clients from the Cocos Creator editor.

## Limitations and notes

The extension runs in the Cocos Creator editor rather than as a standalone game-runtime service. MCP tool identifiers and schemas remain in English, while the editor panels and supporting text can follow Cocos Creator's language or use a project-specific Chinese/English setting. Script output is bounded and may be redacted or omitted for large results; separately required modules and global or project logs are not collected by per-call script capture. The project also includes a setting to silence MCP console messages without removing Recent Activity or internal diagnostics.

_Full upstream README: https://allmcps.com/mcp/funplay-cocos-mcp/readme_

