CAT
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Cross AI Tools

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by @mertduzgun

Independent project, not affiliated with Anthropic

Funplay Cocos MCP

funplayai/funplay-cocos-mcp
34STDIOregistry active
Summary

Embeds an HTTP MCP server directly inside Cocos Creator 3.8+ so Claude and other AI assistants can inspect and manipulate your running game project. The core workflow is execute_javascript with two contexts: "scene" runs code in your active Cocos scene runtime, "editor" runs it in the browser editor environment. You can ask your AI to build UI hierarchies, attach components, query the scene graph, and capture screenshots for validation. Ships with 34 focused tools in core mode or 89 in full, plus cocos:// resource URIs for project inspection and a one-click config generator for Claude Desktop, Cursor, VS Code, and others. Install it as a Cocos extension, start the server from the Funplay menu, and point your client at localhost:8765.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

Funplay MCP for Cocos

An Embedded MCP Server for Cocos Creator Editor

Cocos Creator 3.8+ License: MIT MCP Compatible Editor Only Install from Cocos Store

中文 | English

If this project helps your Cocos workflow, please consider giving it a Star. It helps more developers discover the project and supports ongoing development.


Funplay MCP for Cocos is an MIT-licensed Cocos Creator extension that embeds an HTTP MCP server directly inside the editor. It lets AI assistants such as Claude Code, Cursor, Codex, VS Code Copilot, Trae, and Kiro inspect and operate your running Cocos project.

The package follows the same product direction as Funplay MCP for Unity: keep the default tool surface focused, provide a one-click client configuration window, and make one high-flexibility execution tool the primary workflow.

For Cocos, the primary tool is execute_javascript:

  • context: "scene" runs JavaScript in the active Cocos scene/runtime context
  • context: "editor" runs JavaScript in the Cocos editor/browser context

"Create a login page UI with account/password fields and a main login button."

Your AI assistant can call execute_javascript, build the UI hierarchy under the active Canvas, attach Cocos components, inspect the result, and capture a screenshot for validation.

Quick Start

If you just want to connect quickly, do these three things:

  • Install this repository as a Cocos Creator extension
  • Open Funplay > MCP Server
  • Use the built-in one-click MCP client configuration

1. Install as a Cocos Creator Extension

Recommended install: use the official Cocos Store page and install the extension into your target Cocos Creator project.

For local development or unreleased builds, clone or copy this repository into your Cocos project extension directory:

cd /path/to/your-cocos-project
mkdir -p extensions
git clone https://github.com/FunplayAI/funplay-cocos-mcp.git extensions/funplay-cocos-mcp

Then restart Cocos Creator or reload extensions from the editor.

For a non-git install, download Funplay.CocosMcp.v<version>.zip from the GitHub Releases page, unzip it, and move the extracted funplay-cocos-mcp folder into your project extensions/ directory.

You can also install it globally by copying the folder into your Cocos Creator user extensions directory.

2. Start the MCP Server

Open the editor menu:

Funplay > MCP Server

The server runs on http://127.0.0.1:8765/ by default.

If the configured port is already occupied, the extension first checks whether the existing listener belongs to the same Cocos project. Same-project listeners are reused safely; unrelated listeners trigger automatic fallback to the next available local port.

The panel is intentionally small:

  • Enable or disable the MCP server
  • Change the server port
  • Switch tool exposure between core, full, and custom
  • Save, apply, import, and export named tool profiles
  • Check the installed version against the latest GitHub release
  • Inspect recent tool calls and runtime log previews
  • Tune tool exposure by category controls or individual tool names
  • Configure AI clients with one click and preview the selected client config
  • Copy quick curl commands for /health and /tools
  • Expand debug output only when needed

3. Configure Your AI Client

Use the built-in MCP Client Config section in the Funplay > MCP Server panel first.

Select your target client, click One-Click Configure, and the extension writes the recommended MCP config entry for you.

The MCP server name written to clients is:

funplay_cocos

If you prefer to edit config files manually, use the examples below as fallback references.

Claude Code / Claude Desktop
{
  "mcpServers": {
    "funplay_cocos": {
      "type": "http",
      "url": "http://127.0.0.1:8765/"
    }
  }
}
Cursor
{
  "mcpServers": {
    "funplay_cocos": {
      "url": "http://127.0.0.1:8765/"
    }
  }
}
VS Code
{
  "servers": {
    "funplay_cocos": {
      "type": "http",
      "url": "http://127.0.0.1:8765/"
    }
  }
}
Trae
{
  "mcpServers": {
    "funplay_cocos": {
      "url": "http://127.0.0.1:8765/"
    }
  }
}
Kiro
{
  "mcpServers": {
    "funplay_cocos": {
      "type": "http",
      "url": "http://127.0.0.1:8765/"
    }
  }
}
Codex
[mcp_servers.funplay_cocos]
url = "http://127.0.0.1:8765/"

Optional: npm stdio Wrapper

If your MCP client prefers a local stdio command, install the npm wrapper after starting the Cocos editor server:

npm install -g funplay-cocos-mcp

Example MCP client entry:

{
  "mcpServers": {
    "funplay_cocos": {
      "command": "funplay-cocos-mcp",
      "env": {
        "FUNPLAY_COCOS_MCP_URL": "http://127.0.0.1:8765/"
      }
    }
  }
}

The wrapper bridges stdio MCP traffic to the embedded Cocos HTTP endpoint. You can also run it with npx funplay-cocos-mcp --url http://127.0.0.1:8765/.

4. Verify the Connection

Open your AI client and try a few safe requests first:

  • "Call get_project_info and summarize the current Cocos project."
  • "Read cocos://project/context and tell me the editor status."
  • "Use execute_javascript with context: \"scene\" to return the active scene name."
  • "Use execute_javascript with context: \"editor\" to return the project path."

If these work, the MCP server, resources, prompts, and primary execution tool are connected correctly.

For local transport debugging, the panel can copy these commands, or you can run them directly:

curl http://127.0.0.1:8765/health
curl http://127.0.0.1:8765/tools

5. Start Building

Try a higher-level prompt in your AI client:

Create a login page UI in the current Cocos scene with account/password fields, a login button, and a guest-login button. Use execute_javascript first, inspect the hierarchy, then capture a screenshot.

Before You Start

  • This extension is Editor-only. It is meant to automate Cocos Creator, not to add runtime dependencies to your final game build.
  • The MCP server listens on http://127.0.0.1:8765/ by default.
  • If the configured port is busy, the server automatically falls back to the next available port and the panel/client config use the actual running port.
  • GET /health and GET /tools are read-only debug endpoints for quick local checks outside an MCP client.
  • The default core profile exposes 37 high-signal tools. Switch to full for all 101 tools, or use custom to include/exclude tool categories and individual tools.
  • The panel includes a manual update check against the latest GitHub release.
  • Streamable HTTP responses follow the MCP transport requirements for Accept, MCP-Protocol-Version, JSON-RPC notifications/responses, and optional Mcp-Session-Id sessions.
  • Tool listings include MCP outputSchema and annotations; structured tool results use a standard envelope with ok, tool, callId, summary, data, and follow-up refs.
  • execute_javascript safety checks are enabled by default. They block obvious risky filesystem and shell patterns such as delete/truncate calls, raw writable streams, path traversal, user/system absolute paths, and child_process. This is a guardrail, not a full sandbox; a call can explicitly pass safety_checks: false when you have reviewed the risk.
  • All exposed MCP tools execute directly. There is no extra approval toggle inside the Cocos extension.
  • File tools and cocos://asset/path/... resources are restricted to the active Cocos project root.
  • The recommended workflow is execute_javascript first, then focused helper tools for screenshots, diagnostics, assets, and inspection.
  • If you change the server port or tool exposure in the panel, the extension saves the config and restarts the server when needed.

Why This Project

  • execute_javascript First — One high-flexibility JavaScript tool can orchestrate scene/runtime work and editor-side automation without flooding AI clients with too many narrow tool calls
  • Embedded Cocos Extension — No separate Python daemon or external bridge process is required for the Cocos-side plugin
  • One-Click Client Configuration — Configure Claude Code, Cursor, VS Code, Trae, Kiro, and Codex directly from Cocos Creator
  • Project Context Built In — Exposes live project, scene, selection, script diagnostics, logs, and interaction-history resources
  • Focused by Default, Full When Needed — core reduces tool-list noise; full exposes every available tool; custom plus saved profiles lets you tune and restore tool exposure by category or tool
  • Visual Validation — Scene/editor/preview screenshots and input simulation help AI verify UI and gameplay changes

Highlights

  • 101 Built-in Tools — Scene hierarchy, editor state, selection workflows, prefabs, assets, asset dependencies, project instructions, UI creation, components, files, logs, script diagnostics, screenshots, runtime control, build/preview helpers, editor preferences, event binding, and input simulation
  • Primary Unified Tool — execute_javascript supports both scene and editor contexts
  • Resources & Prompts — Live project/log resources plus reusable workflows like script fixing, scene validation, and playable prototype creation
  • Cocos Panel UI — A compact Funplay > MCP Server panel for service management, update checks, tool exposure, recent activity, logs, curl diagnostics, and MCP client setup
  • Screenshot and Input Support — Capture editor/scene/game/preview screenshots and send Electron-level mouse/keyboard events
  • Vendor Agnostic — Works with any AI client that supports MCP over HTTP JSON-RPC

Relationship to Funplay MCP for Unity

Funplay MCP for Cocos follows the same design principles as Funplay MCP for Unity, adapted to Cocos Creator's JavaScript/TypeScript editor environment.

AreaFunplay MCP for CocosFunplay MCP for Unity
Editor integrationCocos Creator extensionUnity Editor package
Embedded serverBuilt-in HTTP MCP serverBuilt-in HTTP MCP server
Primary execution toolexecute_javascriptexecute_code
Primary languageJavaScript in scene/editor contextsC# in Unity editor/runtime contexts
Default profilecore with 37 toolscore focused tool profile
Full profile101 tools plus custom exposure79 tools
Client setupOne-click config panelOne-click config window

MCP Capabilities

The current package exposes four capability layers:

  • Tools — 37 tools in core, 101 tools in full, plus custom include/exclude rules and saved tool profiles
  • Primary execution — execute_javascript for scene/runtime and editor/browser automation
  • Prompts — fix_script_errors, create_playable_prototype, scene_validation, and auto_wire_scene
  • Resources — project context, scene summaries, current selection, script diagnostics, asset selection, logs, and MCP interaction history

For the generated tool reference, including categories, profiles, and read/mutation hints, see docs/TOOLS.md.

The default core set is intentionally small: execute_javascript, execute_scene_script, execute_editor_script, get_editor_state, get_tool_catalog, check_for_updates, get_selection, list_project_instructions, read_project_instruction, set_selection, get_project_info, get_build_status, get_scene_info, get_hierarchy, list_scenes, open_scene, inspect_prefab, validate_prefab_references, inspect_prefab_instance, list_assets, inspect_asset, inspect_asset_dependencies, validate_asset_dependencies, open_asset, select_asset, run_script_diagnostics, get_recent_logs, search_project_logs, clear_logs, validate_scene, get_performance_snapshot, get_script_diagnostic_context, get_runtime_state, capture_editor_screenshot, capture_scene_screenshot, capture_preview_screenshot, and list_editor_windows.

Built-in Resources

ResourceDescription
cocos://project/contextFull project and editor context
cocos://project/summaryShort project summary
cocos://scene/activeActive scene snapshot
cocos://scene/currentAlias for the current scene
cocos://selection/currentCurrent editor selection
cocos://selection/assetCurrent selected asset
cocos://errors/scriptsScript diagnostics
cocos://logs/editorRecent MCP runtime logs and tool interactions
cocos://logs/projectRecent tails from common project log files
cocos://mcp/interactionsRecent MCP interaction history

Built-in Tools

Funplay MCP for Cocos currently ships with 101 tool functions in the full profile:

CategoryTools
Script Executionexecute_javascript, execute_scene_script, execute_editor_script
Editor Stateget_editor_state, get_tool_catalog, check_for_updates, get_selection, set_selection, get_editor_selection
Project Instructionslist_project_instructions, read_project_instruction, write_project_instruction, create_project_skill, create_cocos_mcp_project_skill
Project & Sceneget_project_info, get_scene_info, get_hierarchy, find_nodes, inspect_node, list_scenes, open_scene, run_scene_asset
Node Editingcreate_node, delete_node, set_node_transform
Assets & Prefabslist_assets, inspect_asset, inspect_asset_dependencies, validate_asset_dependencies, open_asset, select_asset, delete_asset, list_prefabs, inspect_prefab, validate_prefab_references, duplicate_prefab, edit_prefab_json, create_prefab_instance, inspect_prefab_instance, apply_prefab_instance, revert_prefab_instance, instantiate_prefab
Componentslist_components, inspect_component, add_component, remove_component, set_component_property, reset_component_property
UIcreate_canvas, create_label, create_button, create_sprite
Cameralist_cameras, create_camera, set_camera_properties
Animationlist_animations, add_animation_clip, play_animation, stop_animation
Filesread_file, get_file_snippet, write_file, replace_in_file, search_files, list_directory, exists, refresh_assets
Diagnostics & Logsrun_script_diagnostics, get_script_diagnostic_context, get_recent_logs, search_project_logs, clear_logs, validate_scene, get_performance_snapshot
Build & Editorget_build_status, open_build_panel, run_project_preview, save_current_scene, get_editor_preference, set_editor_preference, broadcast_editor_message
Runtimeget_runtime_state, pause_runtime, resume_runtime, set_time_scale
Interaction & Eventsemit_node_event, simulate_button_click, list_button_click_events, bind_button_click_event, invoke_component_method, simulate_mouse_click, simulate_mouse_drag, simulate_key_press, simulate_key_combo, simulate_preview_input
Screenshots & Windowscapture_desktop_screenshot, capture_editor_screenshot, capture_scene_screenshot, capture_game_screenshot, capture_preview_screenshot, list_editor_windows

Primary Tool Examples

Scene Context

{
  "context": "scene",
  "code": "return { sceneName: scene.name, rootCount: scene.children.length };",
  "args": {}
}

Editor Context

{
  "context": "editor",
  "code": "return { projectPath: context.projectPath, toolCount: helpers.listTools().length };",
  "args": {}
}

Editor-context scripts receive Editor, fs, path, os, require, context, args, and helper functions such as helpers.getStatus(), helpers.listTools(), helpers.readResource(uri), helpers.callTool(name, args), and helpers.configureClient(targetId).

Optional Configuration

Place funplay-cocos-mcp.config.json in the Cocos project root:

{
  "host": "127.0.0.1",
  "port": 8765,
  "toolProfile": "core",
  "enabledToolCategories": [],
  "disabledToolCategories": [],
  "enabledTools": [],
  "disabledTools": [],
  "enableSessions": false,
  "executeJavascriptSafetyChecks": true,
  "autostart": true,
  "maxInteractionLogEntries": 50,
  "activeToolProfileName": "",
  "savedToolProfiles": []
}

Environment variables are also supported:

  • COCOS_MCP_HOST
  • COCOS_MCP_PORT
  • COCOS_MCP_PROFILE

toolProfile: "custom" starts from the core set, then adds enabledToolCategories / enabledTools and removes disabledToolCategories / disabledTools. The panel can save these exposure settings as named savedToolProfiles for quick restore or sharing. enableSessions is off by default because this server does not need cross-request client state for normal editor automation.

Architecture

Cocos Creator Extension
    ├─ browser.js
    │   ├─ Embedded HTTP MCP Server
    │   ├─ Tool Registry
    │   ├─ Resource Provider
    │   ├─ Prompt Provider
    │   └─ One-Click Client Configuration
    ├─ scene.js
    │   └─ Scene/runtime execution bridge
    ├─ panel/index.js
    │   └─ Minimal MCP Server panel
    └─ lib/
        ├─ assets, diagnostics, screenshots, input
        ├─ tool-profiles, javascript-safety
        ├─ tools/
        │   ├─ files
        │   ├─ assets-advanced
        │   ├─ cocos-project
        │   └─ scene-events
        └─ server, resources, prompts, tool registry

The server speaks MCP-style HTTP JSON-RPC 2.0 and supports tools, resources, resource templates, prompts, health checks, and a read-only /tools debug endpoint.

Development

Run checks before publishing changes:

npm run check
npm test
npm run docs:check
npm run release:check
npm run pack:dry-run

Regenerate the tool reference after changing lib/tool-registry.js:

npm run docs:generate

To generate a GitHub Release-ready extension package:

npm run release:package

The package is written to releases/<version>/ with a zip, manifest, checksum file, and release README. See RELEASE_WORKFLOW.md and RELEASE_CHECKLIST.md for the full process.

Validate MCP Registry metadata before publishing:

npm run registry:validate

License

MIT License. See LICENSE.

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

Configuration

FUNPLAY_COCOS_MCP_URL

Optional local Cocos MCP HTTP endpoint. Defaults to http://127.0.0.1:8765/.

FUNPLAY_COCOS_MCP_TIMEOUT_SECONDS

Optional HTTP timeout per request in seconds. Defaults to 120.

Registryactive
Packagefunplay-cocos-mcp
TransportSTDIO
UpdatedMay 21, 2026
View on GitHub