Funplay MCP for Cocos

A Cocos Creator extension with a built-in MCP server: the agent builds UI, edits scenes and takes editor screenshots

  • 371 ★ on the repository
  • Last commit
  • MIT
MCP server

Broad access

Why this level

  • The agent runs arbitrary JavaScript in the editor and scene environment, and the safety checks can be bypassed
  • Tools create and delete nodes, prefabs and asset files in the project with no call approval
  • Screenshots and input simulation work at the Electron level and can see editor window contents
All reasons and checks

funplayai/funplay-cocos-mcp

Install

Manual install

git clone https://github.com/FunplayAI/funplay-cocos-mcp.git extensions/funplay-cocos-mcp

Run it inside the Cocos Creator project folder. The main route is the extension page in the Cocos Store. Restart Creator after installing.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The agent runs arbitrary JavaScript in the editor and scene environment, and the safety checks can be bypassed
  • Tools create and delete nodes, prefabs and asset files in the project with no call approval
  • Screenshots and input simulation work at the Electron level and can see editor window contents

This is third-party code. Review the repository files before installing.

What it does

Funplay MCP for Cocos is an extension for the Cocos Creator 3.8+ editor. It starts an HTTP MCP server inside the editor, and an AI agent gets access to the open project. No separate daemon or external bridge is needed. Ten clients can connect, from Claude Code and Cursor to Codex and OpenCode. The main tool is execute_javascript. The context parameter sets the environment: scene runs code in the active scene, editor in the editor's context. With it the agent builds a UI hierarchy under the Canvas, attaches Cocos components and checks the result. The other tools are helpers: they work with the hierarchy, prefabs and assets, read logs and script diagnostics, and also take screenshots and simulate mouse and keyboard input. By default the core profile exposes 39 tools and full exposes all 106. The custom profile enables and disables categories and single tools. Besides tools the server publishes resources about the project, scene, selection and logs, and four ready prompts, fix_script_errors among them. The Funplay > MCP Server menu configures the client you pick with one button.

Who it is for. For Cocos Creator game developers who want an agent to build UI, edit scenes and check prefabs right in the editor.

Good fit when

  • You need a login screen with account and password fields and two buttons, then a check on a screenshot
  • The agent should find broken references in prefabs and asset dependencies
  • Project scripts crash and you want diagnostics and logs collected without copying them into chat by hand
  • You need to test a gameplay flow: the agent simulates mouse clicks and key presses and captures the result
  • You connect several clients at once and want to set them up with a button in the editor panel

Not a fit when

  • You work in Unity, Godot or Unreal Engine: the extension is only for Cocos Creator
  • You need dependencies inside the game itself: the extension runs in the editor only and adds nothing to the final build
  • You cannot let an agent run arbitrary JavaScript in the editor: the safety checks block only obvious calls
  • You want every call approved: the extension has no built-in approval toggle

Example request

Build a login screen in the current scene with account and password fields, a login button and a guest button, check the hierarchy and take a screenshot

MCP

Transport
http, stdio
Authentication
not required

Environment variables

FUNPLAY_COCOS_MCP_URL
HTTP server address of the editor for the stdio wrapper, for example http://127.0.0.1:8765/

Limitations

  • Requires Cocos Creator 3.8 or newer. The extension is editor-only and adds nothing to the game.
  • The execute_javascript safety checks block obvious file deletes, paths outside the project and child_process, but they are not a sandbox. The safety_checks: false parameter turns them off.
  • File tools and cocos://asset/path resources are limited to the active project root.
  • New projects get a port from the 20000–29999 range. If it is busy the server moves to a neighbouring one, so take the URL for the client config from the panel.
  • A global install for all projects must be repeated for each Creator version.

How to disable. In the Funplay > MCP Server menu turn the server off. To remove the extension, delete the extensions/funplay-cocos-mcp folder from the project or the global copy in the .CocosCreator/builtin-extensions directory, then restart Creator. Delete the cocos-<project>-<hash> entry from the client config; in Claude Code use claude mcp remove with that name.

FAQ

How do I install an MCP server for Cocos Creator?

Install the extension from the Cocos Store page, or run git clone https://github.com/FunplayAI/funplay-cocos-mcp.git extensions/funplay-cocos-mcp in the project folder and restart Creator. Then open Funplay > MCP Server and click One-Click Configure for your client.

How do I connect it to Claude Code?

The easiest way is the One-Click Configure button in the panel: the extension writes an entry to ~/.claude.json scoped to your project's Git root. By hand, add an mcpServers block with type http and the URL from the panel, for example http://127.0.0.1:8765/.

How do the core and full profiles differ?

The core profile exposes the 39 most useful tools and keeps the list short. The full profile exposes all 106. With custom you can turn categories and single tools on and off and save your own profiles.

What does execute_javascript do?

It runs JavaScript in the scene context (context: scene) or the editor context (context: editor). Console output of each call is captured and returned to the agent with the duration.

Do I need the stdio mode?

If your client wants a local command, install the wrapper with npm install -g funplay-cocos-mcp and set the address in FUNPLAY_COCOS_MCP_URL. The wrapper forwards traffic to the editor's HTTP endpoint, which must already be running.

Discussion

No questions or reviews yet.

Cocos Creator MCP Server

Cocos Creator MCP Server Plugin

An MCP server as a Cocos Creator editor extension: the agent controls scenes, nodes, components, prefabs and project assets

MCP serverExtended access1.5KRepository stars

An MCP server inside the Unity Editor: the agent builds scenes and scripts, enters play mode and checks the game with screenshots

MCP serverBroad access275Repository stars

An MCP server for Godot 4 that runs inside the editor: the agent edits scenes, nodes and scripts, runs the project and reads the debugger, no Node.js

MCP serverBroad access863Repository stars

An MCP server with 157 tools for Godot 4: the agent edits scenes and projects, runs the game, changes live nodes and writes GDScript and .NET scripts

MCP serverBroad access506Repository stars

A plugin with skills for building TypeScript MCP servers and MCP apps: the agent scaffolds, edits, debugs and verifies them

PluginExtended access10.8KRepository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialAuthenticationRepository starsMain difference
Funplay MCP for Cocos (this entry)nonot required371
Cocos Creator MCP Servernonot required1,468an extension of the same kind with a different tool set and its own panel
MCP Unitynonot required2,006connects an agent to the Unity editor rather than Cocos Creator

README in short

The project compares itself with its sibling server for Unity and covers the limits of the Cocos editor. The full list of core profile tools comes at the end.

README badge

Report a problem

Foxx AIFunplay MCP for Cocos
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.