unity-mcp-server  by AnkleBreaker-Studio

AI co-pilot for Unity game development

Created 3 months ago
280 stars

Top 92.9% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides an AI-powered Model Context Protocol (MCP) server enabling AI assistants like Claude and Cursor to act as co-pilots for Unity game development. It offers an extensive suite of 288 tools across 30+ categories, allowing developers to control the Unity Editor and Hub directly from AI chat interfaces, streamlining complex workflows from scene creation to builds and profiling.

How It Works

The architecture connects AI assistants to Unity via the MCP server, which acts as a bridge to a companion Unity Editor plugin (HTTP API) and the Unity Hub CLI. Commands are routed in real-time, enabling AI-driven manipulation of GameObjects, components, assets, scripts, scenes, and more. A novel two-tier tool system manages the vast number of functionalities, exposing core tools directly while lazily loading advanced tools to remain within MCP client constraints. Robust multi-instance and port resilience mechanisms ensure stable operation across complex development setups.

Quick Start & Requirements

  1. Install Unity Plugin: In Unity Editor, use Window > Package Manager > + > Add package from git URL with https://github.com/AnkleBreaker-Studio/unity-mcp-plugin.git.
  2. Install MCP Server: Clone the repository (git clone https://github.com/AnkleBreaker-Studio/unity-mcp-server.git), navigate into the directory (cd unity-mcp-server), and run npm install.
  3. Configure AI Client: For Claude Desktop, add a JSON configuration to Settings > Developer > Edit Config, specifying the Node.js command and arguments to run the server script, along with the Unity Hub path.
  • Prerequisites: Node.js 18+, Unity Hub, and the Unity Editor with the unity-mcp-plugin installed.

Highlighted Details

  • Comprehensive Toolset: 288 tools covering Unity Hub management, scene/GameObject manipulation, component editing, asset workflows, scripting, multi-platform builds, console/compilation error handling, testing, play mode control, physics, lighting, terrain sculpting, NavMesh baking, particle systems, UI, animation, Shader Graph, Amplify Shader Editor, profiling, frame debugging, memory analysis, multiplayer scenarios (MPPM), and UMA integration.
  • Advanced Integrations: Seamlessly leverages installed packages/assets like com.unity.memoryprofiler, com.unity.shadergraph, com.unity.visualeffectgraph, com.unity.inputsystem, com.unity.multiplayer.playmode, Amplify Shader Editor, and UMA 2 for expanded capabilities.
  • Resilience Features: Includes port identity validation, compile-time resilience during long builds, crash detection via heartbeats, and port affinity to maintain stable connections across editor restarts and project changes.
  • Multi-Instance & Agent Support: Automatically discovers and allows selection between multiple running Unity Editor instances, and supports multiple AI agents operating concurrently with session tracking and queued execution.
  • Editor Window Capture: unity_screenshot_editor_window tool (Windows only) captures any Unity Editor window content directly.

Maintenance & Community

Developed and maintained by AnkleBreaker Studio. The project encourages community support through GitHub Sponsors or Patreon to fund ongoing development, new features, and bug fixes. Specific community channels like Discord or Slack are not detailed in the README.

Licensing & Compatibility

  • License: AnkleBreaker Open License v1.0.
  • Restrictions: Requires inclusion of copyright notice, attribution ("Made with AnkleBreaker MCP" or "Powered by AnkleBreaker MCP" - exempt for personal/educational use), and prohibits reselling, sublicensing, or commercial distribution of the software or its derivatives.
  • Compatibility: Works with any MCP-compatible AI assistant (Claude, Cursor, Windsurf) and Unity versions 2021.3 LTS and newer.

Limitations & Caveats

The unity_screenshot_editor_window tool is restricted to Windows platforms. The AnkleBreaker Open License v1.0 prohibits commercial resale or sublicensing of the software itself, although it is free for personal and educational use with required attribution. Functionality for certain advanced features depends on the presence of specific Unity packages or Asset Store assets.

Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
2
Star History
92 stars in the last 30 days

Explore Similar Projects

Starred by Paul Stamatiou Paul Stamatiou(Cofounder of Limitless), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
5 more.

claude-task-master by eyaltoledano

0.7%
28k
AI-powered task management system for code editors
Created 1 year ago
Updated 1 month ago
Feedback? Help us improve.