# Unity AI Tools Template

> Unity MCP Tool template project

- **Type:** MCP server
- **Install:** `agentstack add mcp-ivanmurzak-unity-ai-tools-template`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [IvanMurzak](https://agentstack.voostack.com/s/ivanmurzak)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [IvanMurzak](https://github.com/IvanMurzak)
- **Source:** https://github.com/IvanMurzak/Unity-AI-Tools-Template

## Install

```sh
agentstack add mcp-ivanmurzak-unity-ai-tools-template
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

Unity AI Tools Template

Template for AI MCP Tools for [AI Game Developer (Unity-MCP)](https://github.com/IvanMurzak/Unity-MCP). Use this template to create your custom MCP tools for Unity Engine in 30 minutes. Read more about custom MCP tools [here](https://github.com/IvanMurzak/Unity-MCP?tab=readme-ov-file#add-custom-mcp-tool).

This template repository is designed to be easily updated into a real Unity package. Please follow the instruction bellow, it will help you to go through the entire process of package creation, distribution and installing.

# Steps to make your package

### 1️⃣ Click the button - create repository

[](https://github.com/IvanMurzak/Unity-AI-Tools-Template/generate)

### 2️⃣ Clone your new repository

### 3️⃣ Initialize Project

Use the initialization script to rename the package and replace all placeholders.

```powershell
./commands/init.ps1 -PackageId "com.company.package" -PackageName "My Package"
```

This script will:
- Rename directories and files.
- Replace `YOUR_PACKAGE_ID`, `YOUR_PACKAGE_NAME`, etc. in all files and folder names.

### 4️⃣ Update `package.json`
Open `Unity-Package/Packages/YOUR_PACKAGE_ID_LOWERCASE/package.json` and update:
- `description`
- `author`
- `keywords`
- `unity` (minimum supported Unity version)

2. **Generate Meta Files**
   To ensure all Unity meta files are correctly generated:
   - Open Unity Hub.
   - Add the `Installer` folder as a project.
   - Add the `Unity-Package` folder as a project.
   - Open both projects in Unity Editor. This will generate the necessary `.meta` files.

### 5️⃣ Generate Meta Files

#### Using script
   Open Unity project to generate `.meta` files.
   **On Mac and Linux**:
   ```bash
   ./commands/open-all-projects-unix.sh
   ```
   **On Windows**:
   ```bash
   ./commands/open-all-projects-windows.ps1
   ```
#### OR Manually
   You may open the projects manually to achieve the same result.
   - Open Unity Hub.
   - Add the `Installer` folder as a project.
   - Add the `Unity-Package` folder as a project.
   - Open both projects in Unity Editor. This will generate the necessary `.meta` files.

### 6️⃣ Add MCP Tools

Decide what type of MCP tool you need:

- **MCP tool for Unity Editor**
  - ✔️ Works in Unity Editor (Edit Mode)
  - ✔️ Works in Unity Editor (Play Mode)
  - ✔️ Has access to Editor API
  - ❌ Available in a game build
- **MCP tool for Unity Runtime**
  - ✔️ Works in Unity Editor (Edit Mode)
  - ✔️ Works in Unity Editor (Play Mode)
  - ❌ Has access to Editor API
  - ✔️ Available in a game build

Based on your choice create script at the location

- Editor: `Unity-Package/Packages/YOUR_PACKAGE_ID_LOWERCASE/Editor`
- Runtime: `Unity-Package/Packages/YOUR_PACKAGE_ID_LOWERCASE/Runtime`

> Read detailed instructions about custom tool development [here](https://github.com/IvanMurzak/Unity-MCP?tab=readme-ov-file#add-custom-mcp-tool).

```csharp
[McpPluginToolType]
public static class MyCustomTool
{
    [McpPluginTool("my-custom-feature", Title = "Do my custom feature")]
    [Description("Put here the tool description for LLM.")]
    public static Task DoTurn(
        [Description("Add description to the input property, help LLM better understand it.)]
        int figureId,
        [Description("Add description to the input property, help LLM better understand it.)]
        Vector2Int position)
    {
        // do any logic in background thread here
        return MainThread.Instance.RunAsync(() =>
        {
            // do any logic in main thread here

            return true;
        });
    }
}
```

---

# Optional steps

### 1. Version Management

To update the package version across all files (package.json, Installer.cs, etc.), use the bump version script:

```powershell
.\commands\bump-version.ps1 -NewVersion "1.0.1"
```

### 2. Setup CI/CD

To enable automatic testing and deployment:

1.  **Configure GitHub Secrets**
    Go to `Settings` > `Secrets and variables` > `Actions` > `New repository secret` and add:
    -   `UNITY_EMAIL`: Your Unity account email.
    -   `UNITY_PASSWORD`: Your Unity account password.
    -   `UNITY_LICENSE`: Content of your `Unity_lic.ulf` file.
        -   Windows: `C:/ProgramData/Unity/Unity_lic.ulf`
        -   Mac: `/Library/Application Support/Unity/Unity_lic.ulf`
        -   Linux: `~/.local/share/unity3d/Unity/Unity_lic.ulf`

2.  **Enable Workflows**
    Rename the sample workflow files to enable them:
    -   `.github/workflows/release.yml-sample` ➡️ `.github/workflows/release.yml`
    -   `.github/workflows/test_pull_request.yml-sample` ➡️ `.github/workflows/test_pull_request.yml`

3.  **Update Unity Version**
    Open both `.yml` files and update the `UNITY_VERSION` (or similar variable) to match your project's Unity Editor version.

4.  **Automatic Deployment**
    The release workflow triggers automatically when you push to the `main` branch with an incremented version in `package.json`.

### 3. Add files into `Unity-Package/Packages/YOUR_PACKAGE_ID_LOWERCASE` folder

[Unity guidelines](https://docs.unity3d.com/Manual/cus-layout.html) about organizing files into the package root directory

```text
  
  ├── package.json
  ├── README.md
  ├── CHANGELOG.md
  ├── LICENSE.md
  ├── Third Party Notices.md
  ├── Editor
  │   ├── [company-name].[package-name].Editor.asmdef
  │   └── EditorExample.cs
  ├── Runtime
  │   ├── [company-name].[package-name].asmdef
  │   └── RuntimeExample.cs
  ├── Tests
  │   ├── Editor
  │   │   ├── [company-name].[package-name].Editor.Tests.asmdef
  │   │   └── EditorExampleTest.cs
  │   └── Runtime
  │        ├── [company-name].[package-name].Tests.asmdef
  │        └── RuntimeExampleTest.cs
  ├── Samples~
  │        ├── SampleFolder1
  │        ├── SampleFolder2
  │        └── ...
  └── Documentation~
       └── [package-name].md
```

# Final polishing

- Update the `README.md` file (this file) with information about your package.
- Copy the updated `README.md` to `Packages/YOUR_PACKAGE_ID_LOWERCASE` as well.

> ⚠️ Everything outside of the `root` folder won't be added to your package. But still could be used for testing or showcasing your package at your repository.

### 1. Deploy to any registry you like

- [Deploy to OpenUPM](https://github.com/IvanMurzak/Unity-Package-Template/blob/main/Docs/Deploy-OpenUPM.md) (recommended)
- [Deploy using GitHub](https://github.com/IvanMurzak/Unity-Package-Template/blob/main/Docs/Deploy-GitHub.md)
- [Deploy to npmjs.com](https://github.com/IvanMurzak/Unity-Package-Template/blob/main/Docs/Deploy-npmjs.md)

### 2. Install your package into Unity Project

When your package is distributed, you can install it into any Unity project.

> Don't install into the same Unity project, please use another one.

- [Install OpenUPM-CLI](https://github.com/openupm/openupm-cli#installation)
- Open a command line at the root of Unity project (the folder which contains `Assets`)
- Execute the command (for `OpenUPM` hosted package)

  ```bash
  openupm add YOUR_PACKAGE_NAME
  ```

# Final view in Unity Package Manager

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [IvanMurzak](https://github.com/IvanMurzak)
- **Source:** [IvanMurzak/Unity-AI-Tools-Template](https://github.com/IvanMurzak/Unity-AI-Tools-Template)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-ivanmurzak-unity-ai-tools-template
- Seller: https://agentstack.voostack.com/s/ivanmurzak
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
