# unity-mcp

> MCP Server

This Unity package facilitates communication between Unity and LLMs via the Model Context Protocol, enabling developers to automate workflows, manipulate assets, and control the Unity Editor programmatically. This Unity package

## Overview

- **Category:** Developer Tools
- **Language:** C#
- **Stars:** 13461
- **Forks:** 142
- **Owner:** justinpbarnett
- **GitHub:** https://github.com/justinpbarnett/unity-mcp
- **Created:** 2025-03-18T11:01:58+00:00
- **Updated:** 2025-03-28T19:59:35+00:00
- **Source:** https://model-context-protocol.com/servers/unity-editor-mcp-server-llm-automation

## Setup

## Setup

To use the Unity MCP Package, ensure you have Unity 2020.3 LTS or newer (URP projects only), Python 3.12 or newer, and the uv package manager installed.

### Step 1: Install Python

Download and install Python 3.12 or newer from [python.org](https://www.python.org/downloads/), adding Python to your systemâs PATH during installation.

### Step 2: Install uv

Install uv using the appropriate command for your operating system:

- **Mac**:

  ```bash
  brew install uv
  ```

- **Windows**:

  ```bash
  powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
  ```

  Then, add uv to your PATH:

  ```bash
  set Path=%USERPROFILE%\.local\bin;%Path%
  ```

- **Linux**:

  ```bash
  curl -LsSf https://astral.sh/uv/install.sh | sh
  ```

For alternative installation methods, see the [uv installation guide](https://docs.astral.sh/uv/getting-started/installation/).

**Important**: Do not proceed without installing uv.

### Step 3: Install the Unity Package

1. Open Unity and go to `Window > Package Manager`.
2. Click the `+` button and select `Add package from git URL`.
3. Enter: `https://github.com/justinpbarnett/unity-mcp.git`

Once installed, the Unity MCP Package will be available in your Unity project, and the server will start automatically when used with an MCP client.

## Tools

## Available Tools

1.  Bidirectional Communication (Seamlessly send and receive data between Unity and LLMs.)
2.  Asset Management (Import assets, instantiate prefabs, and create new prefabs programmatically.)
3.  Scene Control (Open, save, and modify scenes, plus create and manipulate game objects.)
4.  Material Editing (Apply and modify materials with ease.)
5.  Script Integration (Create, view, and update C# scripts within Unity.)
6.  Editor Automation (Automate Unity Editor tasks like building projects or entering play mode.)
