A powerful log bridging tool that synchronizes log information between Cocos Creator editor and Cursor AI, helping developers analyze and solve problems more effectively.
一个强大的日志桥接工具,用于在 Cocos Creator 编辑器和 Cursor AI 之间同步日志信息,帮助开发者更有效地分析和解决问题。
克隆仓库
git clone https://github.com/czh2774/cocosMCP.git
复制到 Cocos Creator 项目
将克隆的 cocosMCP
目录复制到你的 Cocos Creator 项目的 extensions
目录下。
安装 Python 依赖
cd your-project/extensions/cocosMCP/Python uv pip install -r requirements.txt
在 Cocos Creator 中启用扩展
启动 Cocos Creator,进入 扩展 -> 扩展管理器
,确保 cocosMCP
扩展已启用。
配置 Cursor AI
在 Cursor AI 设置中配置 MCP 服务器,指向 Python 服务器脚本。
# 查询日志 logs = await mcp.query_logs({ "show_logs": True, "show_warnings": True, "show_errors": True }) # 清除日志 await mcp.clear_logs() # 检查连接状态 status = await mcp.connection_status() # 获取场景信息 scene_info = await mcp.get_scene_info() # 列出场景中的所有节点 nodes = await mcp.list_scene_nodes() # 打开指定UUID的场景 await mcp.open_scene("scene-uuid-here")
本项目包含三个详细的文档:
Cocos MCP 由三个主要部分组成:
欢迎贡献代码、报告问题或提出新功能建议!请查看 开发者指南 了解详情。
本项目采用 MIT 许可证 - 详情请参阅 LICENSE 文件。
如有问题或建议,请提交 Issues。
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!