
一、UnityMCP+Claude+VSCode,构建 AI 游戏开发环境
1.1 介绍
在配置 UnityMCP 之前,需要完成基础环境的安装和配置。以下组件为必须安装的依赖:
- Git CLI:用于克隆服务器代码。
- Python:3.12 或更高版本。
- Unity Hub 及编辑器:2020.3 LTS 或更高版本。
- uv(Python 包管理器):
pip install uv - 支持 MCP 的 AI 客户端:如 Claude Desktop、Cursor、VSCode 等。
本文重点介绍如何在 VSCode 中接入 Claude 和 UnityMCP 进行游戏开发。
1.2 使用说明及下载
- GitHub 下载地址:https://github.com/CoplayDev/unity-mcp
除了 CoplayDev UnityMCP 之外,还有其他 UnityMCP 项目可供选择,例如 IvanMurzak/Unity-MCP 等。
| 工具 | 地址 | 介绍 |
|---|---|---|
| unity-mcp(本文使用) | https://github.com/CoplayDev/unity-mcp | star:7.2k,持续更新中 |
| Unity-MCP | https://github.com/IvanMurzak/Unity-MCP | star:1.4k |
| CoderGamester - mcp-unity | https://github.com/CoderGamester/mcp-unity | star:1.5k |
| zoucdr - unity3d-mcp | https://github.com/zoucdr/unity3d-mcp/tree/master | star:44 |
二、VSCode 配置
2.1 连接 UnityMCP
在 Unity 中通过 Window → MCP For Unity 打开相关面板,Client 选择 VSCode 然后点击 Start Server 开启连接。















