# Unity MCP Server

Provides AI assistants with direct access to Unity project settings, scenes, and assemblies without running the editor. Useful for project audits from your IDE.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: rachitkumarrastogi
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/rachitkumarrastogi/unity-mcp-server
- Updated: 2026-08-04
- HTML: https://affpapa.org/en/nevibecode/mcp/unity-mcp-server

## What it does

The server inspects project folders directly over stdio, reading package manifests, project settings, and asset files. As a result, assistants in Claude Code or Cursor can inspect build scene lists, physics collision matrices, and assembly definitions. Running the Unity Editor is never required.

The toolset covers code inspection, asmdef dependency tracking, and package graph evaluation. It can check time step values, audio settings, or package samples straight from the project directory.

Every setup requires the `UNITY_PROJECT_PATH` environment variable pointing to the root folder, since the server cannot read files without a defined location.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `UNITY_PROJECT_PATH` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: Unity

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add unity-mcp-server -e UNITY_PROJECT_PATH=<UNITY_PROJECT_PATH> -- npx -y unity-mcp-server
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add unity-mcp-server --env UNITY_PROJECT_PATH=<UNITY_PROJECT_PATH> -- npx -y unity-mcp-server
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "unity-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "unity-mcp-server"
            ],
            "env": {
                "UNITY_PROJECT_PATH": "<UNITY_PROJECT_PATH>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "unity-mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "unity-mcp-server"
            ],
            "env": {
                "UNITY_PROJECT_PATH": "<UNITY_PROJECT_PATH>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e UNITY_PROJECT_PATH=<UNITY_PROJECT_PATH> unity-mcp-server npx -y unity-mcp-server
```
Replace <…> with your own values

## When to use it
- list build scenes in their configured order
- trace dependencies across asmdef definitions
- inspect physics collision layers and matrix settings
- check installed Unity packages and version configs

## Example prompts
- What scenes are registered in the build settings?
- Show the collision layer matrix for this project
- Which assemblies depend on `MyGame.Core`?

## Similar
- [Pascal 3D Editor](https://affpapa.org/en/nevibecode/mcp/pascal-3d-editor.md) — MCP server · ★ 25137
- [Unity-MCP](https://affpapa.org/en/nevibecode/mcp/unity-mcp.md) — MCP server · ★ 4534
- [mcp](https://affpapa.org/en/nevibecode/mcp/sceneview-mcp.md) — MCP server · ★ 1349
- [Gearboy MCP Server](https://affpapa.org/en/nevibecode/mcp/gearboy-mcp-server.md) — MCP server · ★ 1218
- [ChiR24-unreal_mcp_server](https://affpapa.org/en/nevibecode/mcp/chir24-unreal-mcp-server.md) — MCP server · ★ 982
- [Nova3D](https://affpapa.org/en/nevibecode/mcp/nova3d.md) — MCP server · ★ 732

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
