Skip to content

Commit 741b4f7

Browse files
authored
Merge pull request #265 from dsarno/update-readme-docs
Update * Clean up README, fix install paths, add logo
2 parents b7411e2 + 2d3ec51 commit 741b4f7

File tree

1 file changed

+59
-95
lines changed

1 file changed

+59
-95
lines changed

README.md

Lines changed: 59 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MCP for Unity
1+
<img width="676" height="380" alt="MCP for Unity" src="https://github.com/user-attachments/assets/b712e41d-273c-48b2-9041-82bd17ace267" />
22

33
#### Proudly sponsored and maintained by [Coplay](https://www.coplay.dev/?ref=unity-mcp) -- the best AI assistant for Unity. [Read the backstory here.](https://www.coplay.dev/blog/coplay-and-open-source-unity-mcp-join-forces)
44

@@ -15,9 +15,9 @@
1515

1616
MCP for Unity 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.
1717

18-
## 💬 Join Our Community
18+
---
1919

20-
### [Discord](https://discord.gg/y4p8KfzrN4)
20+
### 💬 Join Our [Discord](https://discord.gg/y4p8KfzrN4)
2121

2222
**Get help, share ideas, and collaborate with other MCP for Unity developers!**
2323

@@ -37,7 +37,7 @@ MCP for Unity acts as a bridge, allowing AI assistants (like Claude, Cursor) to
3737

3838
* `read_console`: Gets messages from or clears the console.
3939
* `manage_script`: Manages C# scripts (create, read, update, delete).
40-
* `manage_editor`: Controls and queries the editor\'s state and settings.
40+
* `manage_editor`: Controls and queries the editor's state and settings.
4141
* `manage_scene`: Manages scenes (load, save, create, get hierarchy, etc.).
4242
* `manage_asset`: Performs asset operations (import, create, modify, delete, etc.).
4343
* `manage_shader`: Performs shader CRUD operations (create, read, modify, delete).
@@ -50,37 +50,36 @@ MCP for Unity acts as a bridge, allowing AI assistants (like Claude, Cursor) to
5050

5151
---
5252

53-
## How It Works 🤔
53+
## How It Works
5454

5555
MCP for Unity connects your tools using two components:
5656

5757
1. **MCP for Unity Bridge:** A Unity package running inside the Editor. (Installed via Package Manager).
5858
2. **MCP for Unity Server:** A Python server that runs locally, communicating between the Unity Bridge and your MCP Client. (Installed automatically by the package on first run or via Auto-Setup; manual setup is available as a fallback).
5959

60-
**Flow:** `[Your LLM via MCP Client] <-> [MCP for Unity Server (Python)] <-> [MCP for Unity Bridge (Unity Editor)]`
60+
<img width="562" height="121" alt="image" src="https://github.com/user-attachments/assets/9abf9c66-70d1-4b82-9587-658e0d45dc3e" />
6161

6262
---
6363

6464
## Installation ⚙️
6565

66-
> **Note:** The setup is constantly improving as we update the package. Check back if you randomly start to run into issues.
67-
6866
### Prerequisites
6967

7068
* **Python:** Version 3.12 or newer. [Download Python](https://www.python.org/downloads/)
7169
* **Unity Hub & Editor:** Version 2021.3 LTS or newer. [Download Unity](https://unity.com/download)
72-
* **uv (Python package manager):**
70+
* **uv (Python toolchain manager):**
7371
```bash
74-
pip install uv
75-
# Or see: https://docs.astral.sh/uv/getting-started/installation/
72+
# macOS / Linux
73+
curl -LsSf https://astral.sh/uv/install.sh | sh
74+
75+
# Windows (PowerShell)
76+
winget install Astral.Sh.Uv
77+
78+
# Docs: https://docs.astral.sh/uv/getting-started/installation/
7679
```
77-
* **An MCP Client:**
78-
* [Claude Desktop](https://claude.ai/download)
79-
* [Claude Code](https://github.com/anthropics/claude-code)
80-
* [Cursor](https://www.cursor.com/en/downloads)
81-
* [Visual Studio Code Copilot](https://code.visualstudio.com/docs/copilot/overview)
82-
* [Windsurf](https://windsurf.com)
83-
* *(Others may work with manual config)*
80+
81+
* **An MCP Client:** : [Claude Desktop](https://claude.ai/download) | [Claude Code](https://github.com/anthropics/claude-code) | [Cursor](https://www.cursor.com/en/downloads) | [Visual Studio Code Copilot](https://code.visualstudio.com/docs/copilot/overview) | [Windsurf](https://windsurf.com) | Others work with manual config
82+
8483
* <details> <summary><strong>[Optional] Roslyn for Advanced Script Validation</strong></summary>
8584

8685
For **Strict** validation level that catches undefined namespaces, types, and methods:
@@ -102,7 +101,8 @@ MCP for Unity connects your tools using two components:
102101

103102
**Note:** Without Roslyn, script validation falls back to basic structural checks. Roslyn enables full C# compiler diagnostics with precise error reporting.</details>
104103

105-
### 🌟Step 1: Install the Unity Package🌟
104+
---
105+
### 🌟 Step 1: Install the Unity Package
106106

107107
#### To install via Git URL
108108

@@ -118,14 +118,13 @@ MCP for Unity connects your tools using two components:
118118

119119
#### To install via OpenUPM
120120

121-
1. Instal the [OpenUPM CLI](https://openupm.com/docs/getting-started-cli.html)
121+
1. Install the [OpenUPM CLI](https://openupm.com/docs/getting-started-cli.html)
122122
2. Open a terminal (PowerShell, Terminal, etc.) and navigate to your Unity project directory
123123
3. Run `openupm add com.coplaydev.unity-mcp`
124124

125125
**Note:** If you installed the MCP Server before Coplay's maintenance, you will need to uninstall the old package before re-installing the new one.
126126
127-
### Step 2: Configure Your MCP Client
128-
127+
### 🛠️ Step 2: Configure Your MCP Client
129128
Connect your MCP Client (Claude, Cursor, etc.) to the Python server set up in Step 1 (auto) or via Manual Configuration (below).
130129
131130
<img width="648" height="599" alt="MCPForUnity-Readme-Image" src="https://github.com/user-attachments/assets/b4a725da-5c43-4bd6-80d6-ee2e3cca9596" />
@@ -134,7 +133,7 @@ Connect your MCP Client (Claude, Cursor, etc.) to the Python server set up in St
134133
135134
1. In Unity, go to `Window > MCP for Unity`.
136135
2. Click `Auto-Setup`.
137-
3. Look for a green status indicator 🟢 and "Connected ✓". *(This attempts to modify the MCP Client\'s config file automatically).*
136+
3. Look for a green status indicator 🟢 and "Connected ✓". *(This attempts to modify the MCP Client's config file automatically).*
138137

139138
<details><summary><strong>Client-specific troubleshooting</strong></summary>
140139

@@ -147,14 +146,31 @@ Connect your MCP Client (Claude, Cursor, etc.) to the Python server set up in St
147146
148147
If Auto-Setup fails or you use a different client:
149148
150-
1. **Find your MCP Client\'s configuration file.** (Check client documentation).
149+
1. **Find your MCP Client's configuration file.** (Check client documentation).
151150
* *Claude Example (macOS):* `~/Library/Application Support/Claude/claude_desktop_config.json`
152151
* *Claude Example (Windows):* `%APPDATA%\Claude\claude_desktop_config.json`
153152
2. **Edit the file** to add/update the `mcpServers` section, using the *exact* paths from Step 1.
154153

155154
<details>
156155
<summary><strong>Click for Client-Specific JSON Configuration Snippets...</strong></summary>
157156

157+
---
158+
**Claude Code**
159+
160+
If you're using Claude Code, you can register the MCP server using the below commands:
161+
🚨**make sure to run these from your Unity project's home directory**🚨
162+
163+
**macOS:**
164+
165+
```bash
166+
claude mcp add UnityMCP -- uv --directory /Users/USERNAME/Library/AppSupport/UnityMCP/UnityMcpServer/src run server.py
167+
```
168+
169+
**Windows:**
170+
171+
```bash
172+
claude mcp add UnityMCP -- "C:/Users/USERNAME/AppData/Local/Microsoft/WinGet/Links/uv.exe" --directory "C:/Users/USERNAME/AppData/Local/UnityMCP/UnityMcpServer/src" run server.py
173+
```
158174
**VSCode (all OS)**
159175

160176
```json
@@ -181,7 +197,7 @@ On Windows, set `command` to the absolute shim, e.g. `C:\\Users\\YOU\\AppData\\L
181197
"args": [
182198
"run",
183199
"--directory",
184-
"C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Programs\\UnityMCP\\UnityMcpServer\\src",
200+
"C:\\Users\\YOUR_USERNAME\\AppData\\Local\\UnityMCP\\UnityMcpServer\\src",
185201
"server.py"
186202
]
187203
}
@@ -202,7 +218,7 @@ On Windows, set `command` to the absolute shim, e.g. `C:\\Users\\YOU\\AppData\\L
202218
"args": [
203219
"run",
204220
"--directory",
205-
"/usr/local/bin/UnityMCP/UnityMcpServer/src",
221+
"/Users/YOUR_USERNAME/Library/AppSupport/UnityMCP/UnityMcpServer/src",
206222
"server.py"
207223
]
208224
}
@@ -211,7 +227,7 @@ On Windows, set `command` to the absolute shim, e.g. `C:\\Users\\YOU\\AppData\\L
211227
}
212228
```
213229

214-
(Replace YOUR_USERNAME if using ~/bin)
230+
(Replace YOUR_USERNAME. Note: AppSupport is a symlink to "Application Support" to avoid quoting issues)
215231

216232
**Linux:**
217233

@@ -223,7 +239,7 @@ On Windows, set `command` to the absolute shim, e.g. `C:\\Users\\YOU\\AppData\\L
223239
"args": [
224240
"run",
225241
"--directory",
226-
"/home/YOUR_USERNAME/bin/UnityMCP/UnityMcpServer/src",
242+
"/home/YOUR_USERNAME/.local/share/UnityMCP/UnityMcpServer/src",
227243
"server.py"
228244
]
229245
}
@@ -234,21 +250,7 @@ On Windows, set `command` to the absolute shim, e.g. `C:\\Users\\YOU\\AppData\\L
234250

235251
(Replace YOUR_USERNAME)
236252

237-
**For Claude Code**
238-
239-
If you\'re using Claude Code, you can register the MCP server using these commands:
240253

241-
**macOS:**
242-
243-
```bash
244-
claude mcp add UnityMCP -- uv --directory /[PATH_TO]/UnityMCP/UnityMcpServer/src run server.py
245-
```
246-
247-
**Windows:**
248-
249-
```bash
250-
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
251-
```
252254
</details>
253255

254256
---
@@ -261,58 +263,19 @@ claude mcp add UnityMCP -- "C:/Users/USERNAME/AppData/Roaming/Python/Python313/S
261263

262264
3. **Interact!** Unity tools should now be available in your MCP Client.
263265

264-
Example Prompt: `Create a 3D player controller`, `Create a yellow and bridge sun`, `Create a cool shader and apply it on a cube`.
265-
266-
---
267-
268-
## Future Dev Plans (Besides PR) 📝
269-
270-
### 🔴 High Priority
271-
272-
- [ ] **Asset Generation Improvements** - Enhanced server request handling and asset pipeline optimization
273-
- [ ] **Code Generation Enhancements** - Improved generated code quality and error handling
274-
- [ ] **Robust Error Handling** - Comprehensive error messages, recovery mechanisms, and graceful degradation
275-
- [ ] **Remote Connection Support** - Enable seamless remote connection between Unity host and MCP server
276-
- [ ] **Documentation Expansion** - Complete tutorials for custom tool creation and API reference
277-
278-
### 🟡 Medium Priority
279-
280-
- [ ] **Custom Tool Creation GUI** - Visual interface for users to create and configure their own MCP tools
281-
- [ ] **Advanced Logging System** - Logging with filtering, export, and debugging capabilities
282-
283-
### 🟢 Low Priority
284-
285-
- [ ] **Mobile Platform Support** - Extended toolset for mobile development workflows and platform-specific features
286-
- [ ] **Easier Tool Setup**
287-
- [ ] **Plugin Marketplace** - Community-driven tool sharing and distribution platform
288-
289-
<details open>
290-
<summary><strong>✅ Completed Features<strong></summary>
291-
292-
- [x] **Shader Generation** - Generate shaders using CGProgram template
293-
- [x] **Advanced Script Validation** - Multi-level validation with semantic analysis, namespace/type checking, and Unity best practices (Will need Roslyn Installed, see [Prerequisite](#prerequisites)).
294-
</details>
295-
296-
### 🔬 Research & Exploration
297-
298-
- [ ] **AI-Powered Asset Generation** - Integration with AI tools for automatic 3D models, textures, and animations
299-
- [ ] **Real-time Collaboration** - Live editing sessions between multiple developers *(Currently in progress)*
300-
- [ ] **Analytics Dashboard** - Usage analytics, project insights, and performance metrics
301-
- [ ] **Voice Commands** - Voice-controlled Unity operations for accessibility
302-
- [ ] **AR/VR Tool Integration** - Extended support for immersive development workflows
266+
Example Prompt: `Create a 3D player controller`, `Create a tic-tac-toe game in 3D`, `Create a cool shader and apply to a cube`.
303267

304268
---
305269

306-
## For Developers 🛠️
270+
## Development & Contributing 🛠️
307271

308-
### Development Tools
272+
### For Developers
309273

310-
If you\'re contributing to MCP for Unity or want to test core changes, we have development tools to streamline your workflow:
274+
If you're contributing to MCP for Unity or want to test core changes, we have development tools to streamline your workflow:
311275
312276
- **Development Deployment Scripts**: Quickly deploy and test your changes to MCP for Unity Bridge and Python Server
313277
- **Automatic Backup System**: Safe testing with easy rollback capabilities
314278
- **Hot Reload Workflow**: Fast iteration cycle for core development
315-
- **More coming!**
316279
317280
📖 **See [README-DEV.md](README-DEV.md)** for complete development setup and workflow documentation.
318281
@@ -321,15 +284,10 @@ If you\'re contributing to MCP for Unity or want to test core changes, we have d
321284
Help make MCP for Unity better!
322285
323286
1. **Fork** the main repository.
324-
325287
2. **Create a branch** (`feature/your-idea` or `bugfix/your-fix`).
326-
327288
3. **Make changes.**
328-
329289
4. **Commit** (feat: Add cool new feature).
330-
331290
5. **Push** your branch.
332-
333291
6. **Open a Pull Request** against the main branch.
334292
335293
---
@@ -344,12 +302,18 @@ Help make MCP for Unity better!
344302
- Check the status window: Window > MCP for Unity.
345303
- Restart Unity.
346304
- **MCP Client Not Connecting / Server Not Starting:**
347-
- **Verify Server Path:** Double-check the --directory path in your MCP Client\'s JSON config. It must exactly match the location where you cloned the UnityMCP repository in Installation Step 1 (e.g., .../Programs/UnityMCP/UnityMcpServer/src).
348-
- **Verify uv:** Make sure `uv` is installed and working (pip show uv).
349-
- **Run Manually:** Try running the server directly from the terminal to see errors: `# Navigate to the src directory first! cd /path/to/your/UnityMCP/UnityMcpServer/src uv run server.py`
350-
- **Permissions (macOS/Linux):** If you installed the server in a system location like /usr/local/bin, ensure the user running the MCP client has permission to execute uv and access files there. Installing in ~/bin might be easier.
305+
- **Verify Server Path:** Double-check the --directory path in your MCP Client's JSON config. It must exactly match the installation location:
306+
- **Windows:** `%USERPROFILE%\AppData\Local\UnityMCP\UnityMcpServer\src`
307+
- **macOS:** `~/Library/AppSupport/UnityMCP/UnityMcpServer\src`
308+
- **Linux:** `~/.local/share/UnityMCP/UnityMcpServer\src`
309+
- **Verify uv:** Make sure `uv` is installed and working (`uv --version`).
310+
- **Run Manually:** Try running the server directly from the terminal to see errors:
311+
```bash
312+
cd /path/to/your/UnityMCP/UnityMcpServer/src
313+
uv run server.py
314+
```
351315
- **Auto-Configure Failed:**
352-
- Use the Manual Configuration steps. Auto-configure might lack permissions to write to the MCP client\'s config file.
316+
- Use the Manual Configuration steps. Auto-configure might lack permissions to write to the MCP client's config file.
353317
354318
</details>
355319

0 commit comments

Comments
 (0)