unity-mcp  by CoplayDev

Unity Editor tool for LLM control via Model Context Protocol

created 4 months ago
2,713 stars

Top 17.9% on sourcepulse

GitHubView on GitHub
Project Summary

This project enables AI assistants like Claude and Cursor to interact directly with the Unity Editor, allowing natural language control over assets, scenes, scripts, and editor functions. It targets Unity developers seeking to automate workflows and leverage LLMs for game development tasks.

How It Works

The system comprises a Unity package (Bridge) installed via the Package Manager and a Python server. The Bridge runs within the Unity Editor, while the Python server acts as a local intermediary. An MCP Client (e.g., Claude Desktop, Cursor) communicates with the Python server, which then translates commands to the Unity Bridge for execution within the editor. This architecture facilitates a seamless flow from natural language prompts to Unity Editor actions.

Quick Start & Requirements

  • Install Unity Package: Add https://github.com/justinpbarnett/unity-mcp.git?path=/UnityMcpBridge via Unity Package Manager.
  • Prerequisites: Git CLI, Python 3.12+, Unity Hub & Editor (2020.3 LTS+), uv package manager, and an MCP Client (Claude Desktop, Cursor).
  • Configuration: Auto-configure via Unity MCP window or manually edit MCP Client's JSON configuration file.
  • Docs: Unity MCP

Highlighted Details

  • Supports natural language control for Unity tasks.
  • Provides tools for managing assets, scenes, scripts, GameObjects, and executing editor menu items.
  • Offers automation capabilities for repetitive Unity workflows.
  • Designed for extensibility with various MCP Clients.

Maintenance & Community

  • Project maintained by justinpbarnett.
  • Contact via X/Twitter: @justinpbarnett.

Licensing & Compatibility

  • MIT License. Permissive for commercial use and closed-source linking.

Limitations & Caveats

Auto-configuration may fail due to file permission issues, requiring manual configuration of the MCP client's JSON file. Troubleshooting involves verifying server paths and ensuring uv is correctly installed and accessible.

Health Check
Last commit

3 days ago

Responsiveness

1 day

Pull Requests (30d)
26
Issues (30d)
23
Star History
827 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.