You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unity MCP acts as a bridge, allowing AI assistants (like Claude, Cursor) to interact directly with your Unity Editor via a local **MCP (Model Context Protocol) Client**. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
3. Search for`Microsoft.CodeAnalysis.CSharp` and install the package
85
+
5. Go to `Player Settings > Scripting Define Symbols`
86
+
6. Add `USE_ROSLYN`
87
+
7. Restart Unity
88
+
89
+
**Method 2: Manual DLL Installation**
90
+
1. Download Microsoft.CodeAnalysis.CSharp.dll and dependencies from [NuGet](https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp/)
91
+
2. Place DLLs in`Assets/Plugins/` folder
92
+
3. Ensure .NET compatibility settings are correct
93
+
4. Add `USE_ROSLYN` to Scripting Define Symbols
94
+
5. Restart Unity
95
+
96
+
**Note:** Without Roslyn, script validation falls back to basic structural checks. Roslyn enables full C# compiler diagnostics with precise error reporting.</details>
97
+
67
98
68
99
### Step 1: Install the Unity Package (Bridge)
69
100
@@ -81,10 +112,12 @@ Unity MCP connects your tools using two components:
81
112
82
113
Connect your MCP Client (Claude, Cursor, etc.) to the Python server you installed in Step 1.
83
114
84
-
**Option A: Auto-Configure (Recommended for Claude/Cursor)**
**Option A: Auto-Configure (Recommended for Claude/Cursor/VSC Copilot)**
85
118
86
119
1. In Unity, go to `Window > Unity MCP`.
87
-
2. Click `Auto Configure Claude` or `Auto Configure Cursor`.
120
+
2. Click `Auto Configure` on the IDE you uses.
88
121
3. Look for a green status indicator 🟢 and "Connected". *(This attempts to modify the MCP Client's config file automatically)*.
89
122
90
123
**Option B: Manual Configuration**
@@ -163,6 +196,20 @@ If Auto-Configure fails or you use a different client:
163
196
164
197
</details>
165
198
199
+
**Option C: Claude Code Registration**
200
+
201
+
If you're using Claude Code, you can register the MCP server using these commands:
202
+
203
+
**macOS:**
204
+
```bash
205
+
claude mcp add UnityMCP -- uv --directory /[PATH_TO]/UnityMCP/UnityMcpServer/src run server.py
206
+
```
207
+
208
+
**Windows:**
209
+
```bash
210
+
claude mcp add UnityMCP -- "C:/Users/USERNAME/AppData/Roaming/Python/Python313/Scripts/uv.exe" --directory "C:/Users/USERNAME/AppData/Local/Programs/UnityMCP/UnityMcpServer/src" run server.py
211
+
```
212
+
166
213
---
167
214
168
215
## Usage ▶️
@@ -173,8 +220,41 @@ If Auto-Configure fails or you use a different client:
173
220
174
221
3. **Interact!** Unity tools should now be available in your MCP Client.
175
222
176
-
Example Prompt: `Create a 3D player controller.`
223
+
Example Prompt: `Create a 3D player controller`, `Create a yellow and bridge sun`, `Create a cool shader and apply it on a cube`.
177
224
225
+
---
226
+
227
+
## Future Dev Plans (Besides PR) 📝
228
+
229
+
### 🔴 High Priority
230
+
- [ ] **Asset Generation Improvements** - Enhanced server request handling and asset pipeline optimization
- [x] **Shader Generation** - Generate shaders using CGProgram template
249
+
- [x] **Advanced Script Validation** - Multi-level validation with semantic analysis, namespace/type checking, and Unity best practices (Will need Roslyn Installed, see [Prerequisite](#prerequisites)).
250
+
</details>
251
+
252
+
### 🔬 Research & Exploration
253
+
- [ ] **AI-Powered Asset Generation** - Integration with AI tools for automatic 3D models, textures, and animations
254
+
- [ ] **Real-time Collaboration** - Live editing sessions between multiple developers *(Currently in progress)*
- [ ] **AR/VR Tool Integration** - Extended support for immersive development workflows
178
258
179
259
---
180
260
@@ -227,23 +307,29 @@ Help make Unity MCP better!
227
307
228
308
</details>
229
309
230
-
Still stuck? [Open an Issue](https://www.google.com/url?sa=E&q=https%3A%2F%2Fgithub.com%2Fjustinpbarnett%2Funity-mcp%2Fissues).
310
+
Still stuck? [Open an Issue](https://www.google.com/url?sa=E&q=https%3A%2F%2Fgithub.com%2Fjustinpbarnett%2Funity-mcp%2Fissues) or [Join the Discord](https://discord.gg/vhTUxXaqYr)!
231
311
232
312
---
233
313
234
-
## License 📜
314
+
## Contact 👋
235
315
236
-
MIT License. See [LICENSE](https://www.google.com/url?sa=E&q=https%3A%2F%2Fgithub.com%2Fjustinpbarnett%2Funity-mcp%2Fblob%2Fmaster%2FLICENSE) file.
MIT License. See [LICENSE](https://www.google.com/url?sa=E&q=https%3A%2F%2Fgithub.com%2Fjustinpbarnett%2Funity-mcp%2Fblob%2Fmaster%2FLICENSE) file.
244
325
245
326
---
246
327
247
328
## Acknowledgments 🙏
248
329
249
330
Thanks to the contributors and the Unity team.
331
+
332
+
333
+
## Star History
334
+
335
+
[](https://www.star-history.com/#justinpbarnett/unity-mcp&Date)
0 commit comments