Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 44 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
# Unity MCP ✨

**Connect your Unity Editor to LLMs using the Model Context Protocol.**

[![](https://img.shields.io/badge/Unity-000000?style=flat&logo=unity&logoColor=blue 'Unity')](https://unity.com/releases/editor/archive)
[![python](https://img.shields.io/badge/Python-3.12-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)
[![](https://badge.mcpx.dev?status=on 'MCP Enabled')](https://modelcontextprotocol.io/introduction)
![GitHub commit activity](https://img.shields.io/github/commit-activity/w/justinpbarnett/unity-mcp)
![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/justinpbarnett/unity-mcp)
[![](https://img.shields.io/badge/License-MIT-red.svg 'MIT License')](https://opensource.org/licenses/MIT)




**Create your Unity apps with LLMs!**

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.

---

## <picture><source media="(prefers-color-scheme: dark)" srcset="https://github.com/justinpbarnett/unity-mcp/assets/11047284/c279675a-dd58-406b-9613-5b16b5c6bb63"><source media="(prefers-color-scheme: light)" srcset="https://github.com/justinpbarnett/unity-mcp/assets/11047284/b54f891d-961b-4048-a9c4-3af46e2a52fc"><img alt="UnityMCP Workflow" width="100%" style="max-width: 600px; display: block; margin-left: auto; margin-right: auto;"></picture>

## Key Features 🚀

Expand Down Expand Up @@ -48,8 +58,6 @@ Unity MCP connects your tools using two components:

### Prerequisites

<details>
<summary><strong>Click to view required software...</strong></summary>

* **Git CLI:** For cloning the server code. [Download Git](https://git-scm.com/downloads)
* **Python:** Version 3.12 or newer. [Download Python](https://www.python.org/downloads/)
Expand All @@ -62,8 +70,8 @@ Unity MCP connects your tools using two components:
* **An MCP Client:**
* [Claude Desktop](https://claude.ai/download)
* [Cursor](https://www.cursor.com/en/downloads)
* [Visual Studio Code Copilot](https://code.visualstudio.com/docs/copilot/overview)
* *(Others may work with manual config)*
</details>

### Step 1: Install the Unity Package (Bridge)

Expand All @@ -84,7 +92,7 @@ Connect your MCP Client (Claude, Cursor, etc.) to the Python server you installe
**Option A: Auto-Configure (Recommended for Claude/Cursor)**

1. In Unity, go to `Window > Unity MCP`.
2. Click `Auto Configure Claude` or `Auto Configure Cursor`.
2. Click `Auto Configure` on the IDE you uses.
3. Look for a green status indicator 🟢 and "Connected". *(This attempts to modify the MCP Client's config file automatically)*.

**Option B: Manual Configuration**
Expand Down Expand Up @@ -175,6 +183,28 @@ If Auto-Configure fails or you use a different client:

Example Prompt: `Create a 3D player controller.`

---

## TODOs (Besides PR) 📝
### High Priority
- [ ] **AssetsGeneration Improvements** - Better server request handling
- [ ] **CodeGeneration Improvements** - Better generated code handling
- [ ] **Error Handling Improvements** - Better error messages and recovery mechanisms
- [ ] **Remote Connection** - Enable remote connection between host and server
- [ ] **Documentation Expansion** - Add tutorials on how to add your own tools, and documentation on existing tools and functions

### Medium Priority
- [ ] **Custom Tool Creation** - GUI for users to create their own MCP tools
- [ ] **Logging System** - Comprehensive logging for debugging and monitoring

### Low Priority
- [ ] **Mobile Platform Support** - Extended tools for mobile development workflows
- [ ] **Easier Setup**

### Research & Exploration
- [ ] **AI-Powered Asset Generation** - Integration with AI tools for automatic asset creation
- [ ] **Real-time Collaboration** - Live editing sessions between multiple developers (Currently ongoing)
- [ ] **Analytics Dashboard** - Usage analytics and project insights

---

Expand Down Expand Up @@ -227,7 +257,7 @@ Help make Unity MCP better!

</details>

Still stuck? [Open an Issue](https://www.google.com/url?sa=E&q=https%3A%2F%2Fgithub.com%2Fjustinpbarnett%2Funity-mcp%2Fissues).
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)!

---

Expand All @@ -239,11 +269,17 @@ MIT License. See [LICENSE](https://www.google.com/url?sa=E&q=https%3A%2F%2Fgithu

## Contact 👋

- **X/Twitter:** [@justinpbarnett](https://www.google.com/url?sa=E&q=https%3A%2F%2Fx.com%2Fjustinpbarnett)
- **justinpbarnett:** [X/Twitter](https://www.google.com/url?sa=E&q=https%3A%2F%2Fx.com%2Fjustinpbarnett)
- **scriptwonder**: [Email](mailto:swu85@ur.rochester.edu), [LinkedIn](https://www.linkedin.com/in/shutong-wu-214043172/)


---

## Acknowledgments 🙏

Thanks to the contributors and the Unity team.


## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=unity-mcp/unity-mcp,justinpbarnett/unity-mcp&type=Date)](https://www.star-history.com/#unity-mcp/unity-mcp&justinpbarnett/unity-mcp&Date)
4 changes: 2 additions & 2 deletions UnityMcpBridge/Editor/Tools/ManageAsset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,9 @@ private static bool ApplyMaterialProperties(Material mat, JObject properties)
);
}
}
} else if (properties["_Color"] is JArray colorArr) //Current Prevention for systems that use _Color instead of color
} else if (properties["color"] is JArray colorArr) //Use color now with examples set in manage_asset.py
{
string propName = "_Color"; // Default main color
string propName = "_Color";
try {
if (colorArr.Count >= 3)
{
Expand Down