# Installation & Setup

## Requirements

* **Unity 6000.0+** (Unity 6)
* **Newtonsoft JSON** (`com.unity.nuget.newtonsoft-json`) — installed automatically as dependency
* **git** must be installed and available in PATH — [git-scm.com](https://git-scm.com)

## Installation

### Via Unity Asset Store (Recommended)

Install directly from the Unity Asset Store:

[**realvirtual MCP Server on Unity Asset Store**](https://assetstore.unity.com/preview/361912/1260684)

### Via Unity Package Manager (Git URL)

1. Open Unity **Window > Package Manager**
2. Click **+ > Add package from git URL**
3. Enter: `https://github.com/game4automation/io.realvirtual.mcp.git`

Both methods install the package with all dependencies automatically.

## Setup

### Automated Setup (Recommended)

After installing the package:

1. A **brain icon** appears in the Unity Scene View toolbar — this is the MCP status indicator
2. Click the **gear icon** next to it to open the setup popup
3. Click **Download Python Server** — this runs `git clone` to download the Python server into `Assets/StreamingAssets/realvirtual-MCP/`
4. Click **Configure Claude Code & Desktop** — this writes the MCP configuration to Claude Desktop and/or Claude Code

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-0f684e46896568afef446324ebe61c0f23028be5%2Fmcp-setup.png?alt=media" alt=""><figcaption><p>Setup popup showing initial state with Python server not yet installed</p></figcaption></figure>

Once configured, the popup shows green status indicators:

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-35e902c021f0449bebd412e495add98c3ce52d81%2Fmcp-configured.png?alt=media" alt=""><figcaption><p>Setup popup after successful configuration</p></figcaption></figure>

You can also access setup via the Unity menu: **Tools > realvirtual > MCP**

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-8fe5232080d108572c7821fc734e045cf691affe%2Fmcp-menu.png?alt=media" alt=""><figcaption><p>MCP menu in Unity Editor</p></figcaption></figure>

### Manual Setup

If you prefer to set up manually:

1. Clone the Python server repository:

   ```bash
   cd <your-project>/Assets/StreamingAssets
   git clone https://github.com/game4automation/realvirtual-MCP.git
   ```
2. Configure your MCP client manually. For Claude Code, add to your MCP settings:

   ```json
   {
     "mcpServers": {
       "realvirtual-unity": {
         "command": "<project-path>/Assets/StreamingAssets/realvirtual-MCP/python/python.exe",
         "args": ["<project-path>/Assets/StreamingAssets/realvirtual-MCP/unity_mcp_server.py"]
       }
     }
   }
   ```

## Updating

### Python Server

Click **Update Python Server (git pull)** in the toolbar popup, or run manually:

```bash
cd <your-project>/Assets/StreamingAssets/realvirtual-MCP
git pull
```

### Unity Package

1. Open **Window > Package Manager**
2. Select **realvirtual MCP Server**
3. Click **Update** (if available)

If no update button appears, remove the lock entry for `io.realvirtual.mcp` from `Packages/packages-lock.json` and reopen Unity.
