local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Allows automation of the PlayCanvas Editor, providing tools for entity management, asset handling, script creation/editing, material management, scene settings modification, and asset store interactions within the PlayCanvas development environment.
使用 LLM 自动化PlayCanvas 编辑器的 MCP 服务器。
[!重要的]
目前,MCP 服务器需要由 Anthropic 的 Claude 驱动。根据我们的经验,Claude 的免费套餐无法提供足够大的聊天上下文来可靠地运行 MCP 服务器。因此,我们强烈建议您订阅 Claude 专业版帐户。
可用工具
- 实体
list_entities
create_entities
delete_entities
duplicate_entities
modify_entities
reparent_entity
add_components
remove_components
add_script_component_script
- 资产
list_assets
create_assets
delete_assets
instantiate_template_assets
set_script_text
script_parse
set_material_diffuse
- 场景
query_scene_settings
modify_scene_settings
- 店铺
store_search
store_get
store_download
安装
运行npm install
来安装所有依赖项。
安装 Chrome 扩展程序
- 访问
chrome://extensions/
并启用开发者模式 - 单击
Load unpacked
程序”并选择extensions
文件夹 - 加载 PlayCanvas 编辑器。扩展应该已经加载。
运行 MCP 服务器
MCP 服务器可以由 Cursor 或 Claude Desktop 驱动。
[!提示]
我们发现 Claude Desktop 总体上更加可靠。
克劳德桌面
- 安装Claude Desktop 。
- 转到
Claude
>Settings
。 - 选择
Developer
,然后Edit Config
。 - 这将打开
claude_desktop_config.json
,即您的 MCP 配置 JSON 文件。
光标
- 安装光标。
- 选择
File
>Preferences
>Cursor Settings
。 - 单击
+ Add new global MCP server
。 - 这将打开
mcp.json
,即您的 MCP 配置 JSON 文件。
[!提示]
同样在Cursor Settings
中,选择Features
并滚动到Chat
部分。勾选Enable auto-run mode
,即可允许 LLM 运行 MCP 工具而无需持续授权。此操作风险自负(但我们更希望您这样做)!
[!重要的]
在 Cursor 中,确保已选择Agent
和Edit
Ask
将无法识别 MCP 服务器。
MCP 配置 JSON 文件
您的配置应该是这样的:
视窗
macOS
将编辑器连接到 MCP 服务器
PlayCanvas 编辑器不会自动连接到 MCP 服务器。连接方法如下:
- 激活运行 PlayCanvas 编辑器的 Chrome 标签。
- 选择地址栏右侧的扩展图标。
- 选择 PlayCanvas Editor MCP Extension 来打开扩展弹出窗口。
- 选择
CONNECT
(端口号应与 MCP 配置 JSON 文件中设置的端口号相匹配)。
[!NOTE] 目前,您一次只能将一个 PlayCanvas 编辑器实例连接到 MCP 服务器。
您现在应该能够在 Claude Desktop 或 Cursor 中发出命令。
You must be authenticated.
MCP 服务器使 LLM 能够在 PlayCanvas 编辑器中构建实时 3D Web 应用程序。