Curated Claude Code catalog
Updated 07.05.2026 · 19:39 CET
01 / Skill
IvanMurzak

Unity-MCP

Quality
9.0

This plugin integrates AI models like Claude, Cursor, and Windsurf directly into Unity, enabling automated workflows, code generation, and AI capabilities within your games. It is ideal for game developers who want to leverage large language models for dynamic NPC behaviors, real-time debugging, and accelerated development cycles.

USP

Unlike other tools, this plugin works inside your compiled game, allowing for unique real-time AI debugging and direct player-AI interaction within the game environment.

Use cases

  • 01Automate game development tasks
  • 02Generate game code and mechanics
  • 03Enable dynamic NPC behavior in-game
  • 04AI-assisted debugging and problem-solving
  • 05Review and fix GitHub PR comments

Detected files (8)

  • .claude/skills/github-pr-review-fix/SKILL.mdskill
    Show content (7673 bytes)
    ---
    name: github-pr-review-fix
    description: "Review and resolve PR comments from GitHub. Validates each comment, fixes legitimate issues."
    disable-model-invocation: true
    argument-hint: "[optional: PR number, defaults to current branch's PR]"
    ---
    
    # Review PR Comments
    
    Review unresolved comments on the GitHub pull request associated with the current branch. Validate each comment, then fix legitimate issues.
    
    ## Step 1 — Identify the Pull Request
    
    1. If `$ARGUMENTS` contains a PR number, use it.
    2. Otherwise, detect the current git branch and find its open PR:
       ```bash
       gh pr view --json number,url,headRefName,baseRefName
       ```
    3. If no PR is found, stop and tell the user.
    
    ## Step 2 — Fetch All Unresolved Review Comments
    
    Fetch PR review comments (not issue-level comments) using the GitHub CLI:
    
    ```bash
    gh api repos/{owner}/{repo}/pulls/{number}/comments --paginate
    ```
    
    Filter to comments where the thread is **not resolved**. Group comments by thread (same `in_reply_to_id` or same `path` + `line`/`original_line`). For each thread, treat the **first comment** as the review request and subsequent comments as discussion.
    
    Also fetch general PR comments (issue-level):
    ```bash
    gh api repos/{owner}/{repo}/issues/{number}/comments --paginate
    ```
    
    If there are zero unresolved comments, report that and stop.
    
    ## Step 3 — Validate and Fix Comments in Parallel (Sub-agents)
    
    For **each** unresolved comment or comment thread, spawn a **sub-agent** in parallel. Use `model: "sonnet"` for cost efficiency. Each agent validates the comment and, if legitimate, fixes it immediately in place.
    
    **Conflict avoidance**: If multiple comments target the **same file**, run those agents **sequentially** (not in parallel) to avoid edit conflicts. Comments on **different files** run in parallel.
    
    ### Sub-agent Prompt Template
    
    ```
    You are a code review comment validator and fixer. Your job is to determine whether a PR review comment identifies a real issue, and if so, fix it immediately.
    
    ## Comment Details
    - **Author**: {comment_author}
    - **File**: {file_path}
    - **Line(s)**: {line_range}
    - **Comment**: {comment_body}
    - **Thread context** (if any): {thread_replies}
    - **Comment ID**: {comment_id}
    
    ## Phase 1 — Validate
    
    1. Read the file referenced in the comment. Focus on the specific lines mentioned.
    2. Read surrounding context (50 lines above and below) to understand the code fully.
    3. Analyze whether the comment identifies a legitimate issue:
       - Is the described problem actually present in the code?
       - Is the suggestion an improvement or just a style preference?
       - Does the comment apply to the current state of the code (it may already be fixed)?
       - Is this a nitpick / optional suggestion vs. a real bug, logic error, or missing handling?
    
    4. Decide: FIX or IGNORE.
       - If IGNORE, skip to the report below.
       - If FIX, proceed to Phase 2.
    
    ## Phase 2 — Fix (only if verdict is FIX)
    
    1. Apply the minimal fix that addresses the comment. Do not refactor unrelated code.
    2. Ensure the fix:
       - Does not break surrounding logic
       - Follows the existing code style and conventions
       - Preserves all existing functionality
    3. If the fix requires changes in multiple locations within the same file, make all changes.
    4. If you are unsure whether a fix is safe, do NOT apply it — set verdict to NEEDS_MANUAL_REVIEW instead.
    
    HARD CONSTRAINTS:
    - Only modify the file(s) specified. Do not touch other files.
    - Do not add comments explaining the fix in the code.
    - Do not refactor or "improve" code beyond what the comment asks for.
    - Keep changes minimal and surgical.
    
    ## Report
    
    Return your result in this exact format:
    
    VERDICT: FIX | IGNORE | NEEDS_MANUAL_REVIEW
    CONFIDENCE: HIGH | MEDIUM | LOW
    REASON: <1-2 sentence explanation>
    SUMMARY: <1 sentence describing what was changed, only if VERDICT is FIX>
    FILE: {file_path}
    LINES: {line_range}
    COMMENT_ID: {comment_id}
    FIXED: YES | NO
    ```
    
    ## Step 4 — Resolve Fixed Comments on GitHub
    
    After a fix sub-agent successfully fixes an issue, **resolve the corresponding review thread on GitHub** using the GraphQL API.
    
    1. First, find the thread ID for the comment. Use the `node_id` from the comment (fetched in Step 2) to query the thread:
       ```bash
       gh api graphql -f query='
         query {
           node(id: "{comment_node_id}") {
             ... on PullRequestReviewComment {
               pullRequestReview {
                 id
               }
               id
               isMinimized
             }
           }
         }
       '
       ```
    
    2. Resolve the review thread using the `resolveReviewThread` mutation. The thread ID can be obtained from the pull request's review threads:
       ```bash
       gh api graphql -f query='
         query {
           repository(owner: "{owner}", name: "{repo}") {
             pullRequest(number: {number}) {
               reviewThreads(first: 100) {
                 nodes {
                   id
                   isResolved
                   comments(first: 1) {
                     nodes {
                       id
                       body
                       path
                       line
                     }
                   }
                 }
               }
             }
           }
         }
       '
       ```
       Match the thread by comparing `path` and `line` (or `body`) to the fixed comment, then resolve it:
       ```bash
       gh api graphql -f query='
         mutation {
           resolveReviewThread(input: {threadId: "{thread_id}"}) {
             thread {
               id
               isResolved
             }
           }
         }
       '
       ```
    
    3. For every successfully fixed comment, reply to the thread before resolving it:
       ```bash
       gh api repos/{owner}/{repo}/pulls/{number}/comments/{comment_id}/replies \
         -f body="## Agentic reply (github-pr-review-fix)
    
    Fixed. {summary}
    
    _If you disagree with the fix, please reopen this thread._"
       ```
       Then resolve the thread. If the resolve call fails, note it in the report but do not block on it.
    
    4. For **IGNORE** verdicts, reply to the comment thread with an explanation of why it was ignored, then resolve the thread:
       ```bash
       gh api repos/{owner}/{repo}/pulls/{number}/comments/{comment_id}/replies \
         -f body="## Agentic reply (github-pr-review-fix)
    
    This comment was reviewed and determined to not require a code change.
    
    **Reason**: {reason}
    
    _If you disagree, please reopen this thread._"
       ```
       Then resolve the thread using the same `resolveReviewThread` mutation as above.
    
    5. For **NEEDS_MANUAL_REVIEW** verdicts, reply to the thread but do **not** resolve it:
       ```bash
       gh api repos/{owner}/{repo}/pulls/{number}/comments/{comment_id}/replies \
         -f body="## Agentic reply (github-pr-review-fix)
    
    This comment requires manual review — the agent could not safely apply an automated fix.
    
    **Reason**: {reason}
    
    _Leaving this thread unresolved for human attention._"
       ```
    
    ## Step 5 — Report Results
    
    After all agents complete, provide a summary table:
    
    ```
    | # | File | Comment | Verdict | Reason | Resolved |
    |---|------|---------|---------|--------|----------|
    | 1 | path/to/file.cs:42 | "Missing null check" | FIX | Added null guard | Yes |
    | 2 | path/to/other.cs:10 | "Consider renaming" | IGNORE | Style preference, no bug | Yes (replied) |
    | 3 | path/to/util.cs:77 | "Race condition" | NEEDS_MANUAL_REVIEW | Unsafe to auto-fix, needs human judgment | — |
    ```
    
    For **IGNORE** verdicts, the reason is posted as a reply in the thread and the thread is resolved. The user can reopen if they disagree.
    
    For **NEEDS_MANUAL_REVIEW** verdicts, explain why the agent couldn't safely apply a fix. These threads are left **unresolved** for human attention.
    
    End with a count: `X comments fixed and resolved, Y ignored and resolved, Z need manual review.`
    
  • .claude/skills/build-cli/SKILL.mdskill
    Show content (1050 bytes)
    ---
    name: build-cli
    description: "Build the unity-mcp-cli TypeScript CLI tool and link it globally for terminal use."
    disable-model-invocation: true
    argument-hint: "[optional: --link to also run npm link]"
    ---
    
    # Build CLI
    
    Build the `unity-mcp-cli` TypeScript project and optionally link it globally.
    
    ## Step 1 — Install Dependencies
    
    ```bash
    cd cli && npm install
    ```
    
    Only needed if `node_modules/` is missing or `package.json` changed.
    
    ## Step 2 — Build TypeScript
    
    ```bash
    cd cli && npm run build
    ```
    
    This compiles `src/**/*.ts` → `dist/**/*.js` via `tsc`.
    
    ## Step 3 — Link Globally (if `$ARGUMENTS` contains `--link` or first time)
    
    ```bash
    cd cli && npm link
    ```
    
    This creates a global symlink so `unity-mcp-cli` is available from any terminal. Only needed once — after that, `npm run build` alone is sufficient.
    
    ## Step 4 — Verify
    
    ```bash
    unity-mcp-cli --version
    ```
    
    Confirm the CLI is accessible and shows the expected version.
    
    ## Report
    
    Print the version and confirm success. If any step failed, show the error output.
    
  • Unity-MCP-Plugin/.claude/skills/assets-find/SKILL.mdskill
    Show content (4128 bytes)
    ---
    name: assets-find
    description: Search the asset database using the search filter string. Allows you to search for Assets. The string argument can provide names, labels or types (classnames).
    ---
    
    # Assets / Find
    
    ## How to Call
    
    ```bash
    unity-mcp-cli run-tool assets-find --input '{
      "filter": "string_value",
      "searchInFolders": "string_value",
      "maxResults": 0
    }'
    ```
    
    > For complex input (multi-line strings, code), save the JSON to a file and use:
    > ```bash
    > unity-mcp-cli run-tool assets-find --input-file args.json
    > ```
    >
    > Or pipe via stdin (recommended):
    > ```bash
    > unity-mcp-cli run-tool assets-find --input-file - <<'EOF'
    > {"param": "value"}
    > EOF
    > ```
    
    
    ### Troubleshooting
    
    If `unity-mcp-cli` is not found, either install it globally (`npm install -g unity-mcp-cli`) or use `npx unity-mcp-cli` instead.
    Read the /unity-initial-setup skill for detailed installation instructions.
    
    ## Input
    
    | Name | Type | Required | Description |
    |------|------|----------|-------------|
    | `filter` | `string` | No | The filter string can contain search data. Could be empty. Name: Filter assets by their filename (without extension). Words separated by whitespace are treated as separate name searches. Labels (l:): Assets can have labels attached to them. Use 'l:' before each label. Types (t:): Find assets based on explicitly identified types. Use 't:' keyword. Available types: AnimationClip, AudioClip, AudioMixer, ComputeShader, Font, GUISkin, Material, Mesh, Model, PhysicMaterial, Prefab, Scene, Script, Shader, Sprite, Texture, VideoClip, VisualEffectAsset, VisualEffectSubgraph. AssetBundles (b:): Find assets which are part of an Asset bundle. Area (a:): Find assets in a specific area. Valid values are 'all', 'assets', and 'packages'. Globbing (glob:): Use globbing to match specific rules. Note: Searching is case insensitive. |
    | `searchInFolders` | `any` | No | The folders where the search will start. If null, the search will be performed in all folders. |
    | `maxResults` | `integer` | No | Maximum number of assets to return. If the number of found assets exceeds this limit, the result will be truncated. |
    
    ### Input JSON Schema
    
    ```json
    {
      "type": "object",
      "properties": {
        "filter": {
          "type": "string"
        },
        "searchInFolders": {
          "$ref": "#/$defs/System.String[]"
        },
        "maxResults": {
          "type": "integer"
        }
      },
      "$defs": {
        "System.String[]": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
    ```
    
    ## Output
    
    ### Output JSON Schema
    
    ```json
    {
      "type": "object",
      "properties": {
        "result": {
          "$ref": "#/$defs/System.Collections.Generic.List<AIGD.AssetObjectRef>"
        }
      },
      "$defs": {
        "AIGD.AssetObjectRef": {
          "type": "object",
          "properties": {
            "instanceID": {
              "type": "integer",
              "description": "instanceID of the UnityEngine.Object. If this is '0' and 'assetPath' and 'assetGuid' is not provided, empty or null, then it will be used as 'null'."
            },
            "assetType": {
              "$ref": "#/$defs/System.Type",
              "description": "Type of the asset."
            },
            "assetPath": {
              "type": "string",
              "description": "Path to the asset within the project. Starts with 'Assets/'"
            },
            "assetGuid": {
              "type": "string",
              "description": "Unique identifier for the asset."
            }
          },
          "required": [
            "instanceID"
          ],
          "description": "Reference to UnityEngine.Object asset instance. It could be Material, ScriptableObject, Prefab, and any other Asset. Anything located in the Assets and Packages folders."
        },
        "System.Type": {
          "type": "string"
        },
        "System.Collections.Generic.List<AIGD.AssetObjectRef>": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AIGD.AssetObjectRef",
            "description": "Reference to UnityEngine.Object asset instance. It could be Material, ScriptableObject, Prefab, and any other Asset. Anything located in the Assets and Packages folders."
          }
        }
      },
      "required": [
        "result"
      ]
    }
    ```
    
    
  • Unity-MCP-Plugin/.claude/skills/assets-get-data/SKILL.mdskill
    Show content (7326 bytes)
    ---
    name: assets-get-data
    description: |-
      Get asset data from the asset file in the Unity project. It includes all serializable fields and properties of the asset. Use 'assets-find' tool to find asset before using this tool.
      
      Path-scoped reads (token-saving): supply 'paths' (a list of paths) to read only the listed fields/elements via Reflector.TryReadAt, or 'viewQuery' (a ViewQuery) to navigate to a subtree and/or filter by name regex / max depth / type via Reflector.View. These two parameters are mutually exclusive — supply at most one. When neither is supplied the full asset is serialized as before (backwards compatible).
      Path syntax: 'fieldName', 'nested/field', 'arrayField/[i]', 'dictField/[key]'. Leading '#/' is stripped.
    ---
    
    # Assets / Get Data
    
    ## How to Call
    
    ```bash
    unity-mcp-cli run-tool assets-get-data --input '{
      "assetRef": "string_value",
      "paths": "string_value",
      "viewQuery": "string_value"
    }'
    ```
    
    > For complex input (multi-line strings, code), save the JSON to a file and use:
    > ```bash
    > unity-mcp-cli run-tool assets-get-data --input-file args.json
    > ```
    >
    > Or pipe via stdin (recommended):
    > ```bash
    > unity-mcp-cli run-tool assets-get-data --input-file - <<'EOF'
    > {"param": "value"}
    > EOF
    > ```
    
    
    ### Troubleshooting
    
    If `unity-mcp-cli` is not found, either install it globally (`npm install -g unity-mcp-cli`) or use `npx unity-mcp-cli` instead.
    Read the /unity-initial-setup skill for detailed installation instructions.
    
    ## Input
    
    | Name | Type | Required | Description |
    |------|------|----------|-------------|
    | `assetRef` | `any` | Yes | Reference to UnityEngine.Object asset instance. It could be Material, ScriptableObject, Prefab, and any other Asset. Anything located in the Assets and Packages folders. |
    | `paths` | `any` | No | Optional. List of paths to read individually via Reflector.TryReadAt. Path syntax: 'fieldName', 'nested/field', 'arrayField/[i]', 'dictField/[key]'. Mutually exclusive with 'viewQuery'. |
    | `viewQuery` | `any` | No | Optional. View-query filter routed through Reflector.View — combines a starting Path, a case-insensitive NamePattern regex, MaxDepth, and an optional TypeFilter. Mutually exclusive with 'paths'. |
    
    ### Input JSON Schema
    
    ```json
    {
      "type": "object",
      "properties": {
        "assetRef": {
          "$ref": "#/$defs/AIGD.AssetObjectRef"
        },
        "paths": {
          "$ref": "#/$defs/System.Collections.Generic.List<System.String>"
        },
        "viewQuery": {
          "$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.ViewQuery"
        }
      },
      "$defs": {
        "System.Type": {
          "type": "string"
        },
        "AIGD.AssetObjectRef": {
          "type": "object",
          "properties": {
            "instanceID": {
              "type": "integer",
              "description": "instanceID of the UnityEngine.Object. If this is '0' and 'assetPath' and 'assetGuid' is not provided, empty or null, then it will be used as 'null'."
            },
            "assetType": {
              "$ref": "#/$defs/System.Type",
              "description": "Type of the asset."
            },
            "assetPath": {
              "type": "string",
              "description": "Path to the asset within the project. Starts with 'Assets/'"
            },
            "assetGuid": {
              "type": "string",
              "description": "Unique identifier for the asset."
            }
          },
          "required": [
            "instanceID"
          ],
          "description": "Reference to UnityEngine.Object asset instance. It could be Material, ScriptableObject, Prefab, and any other Asset. Anything located in the Assets and Packages folders."
        },
        "System.Collections.Generic.List<System.String>": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "com.IvanMurzak.ReflectorNet.Model.ViewQuery": {
          "type": "object",
          "properties": {
            "Path": {
              "type": "string",
              "description": "Navigate to this path first, then serialize only that subtree. Path segments are separated by '/'. Use '[i]' for array/list index (e.g. 'users/[2]/name') and '[key]' for dictionary entry (e.g. 'config/[timeout]'). A leading '#/' is stripped automatically. Examples: 'admin/name', 'users/[0]/email', 'config/[timeout]'. Leave null to start from the root object."
            },
            "NamePattern": {
              "type": "string",
              "description": "Case-insensitive .NET regex pattern matched against field and property names. Only branches containing at least one match are kept in the result tree. Examples: 'orbitRadius' (exact name), 'orbit.*' (prefix match), 'radius|speed' (either name). When nothing matches, the root envelope is returned with empty fields/props. Leave null to return all fields and properties without filtering."
            },
            "MaxDepth": {
              "type": "integer",
              "description": "Maximum nesting depth of the returned serialized tree. 0 = root type name and value only — no nested fields or properties. 1 = one level of fields/props visible, their children stripped. 2 = two levels visible, and so on. Leave null (default) for unlimited depth."
            },
            "TypeFilter": {
              "$ref": "#/$defs/System.Type",
              "description": "When set, prunes the result tree to members whose runtime type is assignable to this type. Non-matching branches are removed; the root envelope is always preserved. Examples: typeof(float) keeps only float fields, typeof(IEnumerable) keeps only collections. Leave null to include members of any type."
            }
          }
        }
      },
      "required": [
        "assetRef"
      ]
    }
    ```
    
    ## Output
    
    ### Output JSON Schema
    
    ```json
    {
      "type": "object",
      "properties": {
        "result": {
          "$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.SerializedMember"
        }
      },
      "$defs": {
        "com.IvanMurzak.ReflectorNet.Model.SerializedMemberList": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.SerializedMember"
          }
        },
        "com.IvanMurzak.ReflectorNet.Model.SerializedMember": {
          "type": "object",
          "properties": {
            "typeName": {
              "type": "string",
              "description": "Full type name. Eg: 'System.String', 'System.Int32', 'UnityEngine.Vector3', etc."
            },
            "name": {
              "type": "string",
              "description": "Object name."
            },
            "value": {
              "description": "Value of the object, serialized as a non stringified JSON element. Can be null if the value is not set. Can be default value if the value is an empty object or array json."
            },
            "fields": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.SerializedMember",
                "description": "Nested field value."
              },
              "description": "Fields of the object, serialized as a list of 'SerializedMember'."
            },
            "props": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.SerializedMember",
                "description": "Nested property value."
              },
              "description": "Properties of the object, serialized as a list of 'SerializedMember'."
            }
          },
          "required": [
            "typeName"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "result"
      ]
    }
    ```
    
    
  • Unity-MCP-Plugin/.claude/skills/assets-copy/SKILL.mdskill
    Show content (3699 bytes)
    ---
    name: assets-copy
    description: Copy assets at given paths and store them at new paths. Does AssetDatabase.Refresh() at the end. Use 'assets-find' tool to find assets before copying.
    ---
    
    # Assets / Copy
    
    ## How to Call
    
    ```bash
    unity-mcp-cli run-tool assets-copy --input '{
      "sourcePaths": "string_value",
      "destinationPaths": "string_value"
    }'
    ```
    
    > For complex input (multi-line strings, code), save the JSON to a file and use:
    > ```bash
    > unity-mcp-cli run-tool assets-copy --input-file args.json
    > ```
    >
    > Or pipe via stdin (recommended):
    > ```bash
    > unity-mcp-cli run-tool assets-copy --input-file - <<'EOF'
    > {"param": "value"}
    > EOF
    > ```
    
    
    ### Troubleshooting
    
    If `unity-mcp-cli` is not found, either install it globally (`npm install -g unity-mcp-cli`) or use `npx unity-mcp-cli` instead.
    Read the /unity-initial-setup skill for detailed installation instructions.
    
    ## Input
    
    | Name | Type | Required | Description |
    |------|------|----------|-------------|
    | `sourcePaths` | `any` | Yes | The paths of the assets to copy. |
    | `destinationPaths` | `any` | Yes | The paths to store the copied assets. |
    
    ### Input JSON Schema
    
    ```json
    {
      "type": "object",
      "properties": {
        "sourcePaths": {
          "$ref": "#/$defs/System.String[]"
        },
        "destinationPaths": {
          "$ref": "#/$defs/System.String[]"
        }
      },
      "$defs": {
        "System.String[]": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "sourcePaths",
        "destinationPaths"
      ]
    }
    ```
    
    ## Output
    
    ### Output JSON Schema
    
    ```json
    {
      "type": "object",
      "properties": {
        "result": {
          "$ref": "#/$defs/AIGD.CopyAssetsResponse"
        }
      },
      "$defs": {
        "System.Collections.Generic.List<AIGD.AssetObjectRef>": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AIGD.AssetObjectRef",
            "description": "Reference to UnityEngine.Object asset instance. It could be Material, ScriptableObject, Prefab, and any other Asset. Anything located in the Assets and Packages folders."
          }
        },
        "AIGD.AssetObjectRef": {
          "type": "object",
          "properties": {
            "instanceID": {
              "type": "integer",
              "description": "instanceID of the UnityEngine.Object. If this is '0' and 'assetPath' and 'assetGuid' is not provided, empty or null, then it will be used as 'null'."
            },
            "assetType": {
              "$ref": "#/$defs/System.Type",
              "description": "Type of the asset."
            },
            "assetPath": {
              "type": "string",
              "description": "Path to the asset within the project. Starts with 'Assets/'"
            },
            "assetGuid": {
              "type": "string",
              "description": "Unique identifier for the asset."
            }
          },
          "required": [
            "instanceID"
          ],
          "description": "Reference to UnityEngine.Object asset instance. It could be Material, ScriptableObject, Prefab, and any other Asset. Anything located in the Assets and Packages folders."
        },
        "System.Type": {
          "type": "string"
        },
        "System.Collections.Generic.List<System.String>": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "AIGD.CopyAssetsResponse": {
          "type": "object",
          "properties": {
            "CopiedAssets": {
              "$ref": "#/$defs/System.Collections.Generic.List<AIGD.AssetObjectRef>",
              "description": "List of copied assets."
            },
            "Errors": {
              "$ref": "#/$defs/System.Collections.Generic.List<System.String>",
              "description": "List of errors encountered during copy operations."
            }
          }
        }
      },
      "required": [
        "result"
      ]
    }
    ```
    
    
  • Unity-MCP-Plugin/.claude/skills/assets-create-folder/SKILL.mdskill
    Show content (2939 bytes)
    ---
    name: assets-create-folder
    description: Creates a new folder in the specified parent folder. The parent folder string must start with the 'Assets' folder, and all folders within the parent folder string must already exist. For example, when specifying 'Assets/ParentFolder1/ParentFolder2/', the new folder will be created in 'ParentFolder2' only if ParentFolder1 and ParentFolder2 already exist. Use it to organize scripts and assets in the project. Does AssetDatabase.Refresh() at the end. Returns the GUID of the newly created folder, if successful.
    ---
    
    # Assets / Create Folder
    
    ## How to Call
    
    ```bash
    unity-mcp-cli run-tool assets-create-folder --input '{
      "inputs": "string_value"
    }'
    ```
    
    > For complex input (multi-line strings, code), save the JSON to a file and use:
    > ```bash
    > unity-mcp-cli run-tool assets-create-folder --input-file args.json
    > ```
    >
    > Or pipe via stdin (recommended):
    > ```bash
    > unity-mcp-cli run-tool assets-create-folder --input-file - <<'EOF'
    > {"param": "value"}
    > EOF
    > ```
    
    
    ### Troubleshooting
    
    If `unity-mcp-cli` is not found, either install it globally (`npm install -g unity-mcp-cli`) or use `npx unity-mcp-cli` instead.
    Read the /unity-initial-setup skill for detailed installation instructions.
    
    ## Input
    
    | Name | Type | Required | Description |
    |------|------|----------|-------------|
    | `inputs` | `any` | Yes | The paths for the folders to create. |
    
    ### Input JSON Schema
    
    ```json
    {
      "type": "object",
      "properties": {
        "inputs": {
          "$ref": "#/$defs/AIGD.CreateFolderInput[]"
        }
      },
      "$defs": {
        "AIGD.CreateFolderInput": {
          "type": "object",
          "properties": {
            "ParentFolderPath": {
              "type": "string",
              "description": "The parent folder path where the new folder will be created."
            },
            "NewFolderName": {
              "type": "string",
              "description": "The name of the new folder to create."
            }
          }
        },
        "AIGD.CreateFolderInput[]": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AIGD.CreateFolderInput"
          }
        }
      },
      "required": [
        "inputs"
      ]
    }
    ```
    
    ## Output
    
    ### Output JSON Schema
    
    ```json
    {
      "type": "object",
      "properties": {
        "result": {
          "$ref": "#/$defs/AIGD.CreateFolderResponse"
        }
      },
      "$defs": {
        "System.Collections.Generic.List<System.String>": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "AIGD.CreateFolderResponse": {
          "type": "object",
          "properties": {
            "CreatedFolderGuids": {
              "$ref": "#/$defs/System.Collections.Generic.List<System.String>",
              "description": "List of GUIDs of created folders."
            },
            "Errors": {
              "$ref": "#/$defs/System.Collections.Generic.List<System.String>",
              "description": "List of errors encountered during folder creation."
            }
          }
        }
      },
      "required": [
        "result"
      ]
    }
    ```
    
    
  • Unity-MCP-Plugin/.claude/skills/assets-delete/SKILL.mdskill
    Show content (2089 bytes)
    ---
    name: assets-delete
    description: Delete the assets at paths from the project. Does AssetDatabase.Refresh() at the end. Use 'assets-find' tool to find assets before deleting.
    ---
    
    # Assets / Delete
    
    ## How to Call
    
    ```bash
    unity-mcp-cli run-tool assets-delete --input '{
      "paths": "string_value"
    }'
    ```
    
    > For complex input (multi-line strings, code), save the JSON to a file and use:
    > ```bash
    > unity-mcp-cli run-tool assets-delete --input-file args.json
    > ```
    >
    > Or pipe via stdin (recommended):
    > ```bash
    > unity-mcp-cli run-tool assets-delete --input-file - <<'EOF'
    > {"param": "value"}
    > EOF
    > ```
    
    
    ### Troubleshooting
    
    If `unity-mcp-cli` is not found, either install it globally (`npm install -g unity-mcp-cli`) or use `npx unity-mcp-cli` instead.
    Read the /unity-initial-setup skill for detailed installation instructions.
    
    ## Input
    
    | Name | Type | Required | Description |
    |------|------|----------|-------------|
    | `paths` | `any` | Yes | The paths of the assets |
    
    ### Input JSON Schema
    
    ```json
    {
      "type": "object",
      "properties": {
        "paths": {
          "$ref": "#/$defs/System.String[]"
        }
      },
      "$defs": {
        "System.String[]": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "paths"
      ]
    }
    ```
    
    ## Output
    
    ### Output JSON Schema
    
    ```json
    {
      "type": "object",
      "properties": {
        "result": {
          "$ref": "#/$defs/AIGD.DeleteAssetsResponse"
        }
      },
      "$defs": {
        "System.Collections.Generic.List<System.String>": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "AIGD.DeleteAssetsResponse": {
          "type": "object",
          "properties": {
            "DeletedPaths": {
              "$ref": "#/$defs/System.Collections.Generic.List<System.String>",
              "description": "List of paths of deleted assets."
            },
            "Errors": {
              "$ref": "#/$defs/System.Collections.Generic.List<System.String>",
              "description": "List of errors encountered during delete operations."
            }
          }
        }
      },
      "required": [
        "result"
      ]
    }
    ```
    
    
  • Unity-MCP-Plugin/.claude/skills/assets-find-built-in/SKILL.mdskill
    Show content (3247 bytes)
    ---
    name: assets-find-built-in
    description: "Search the built-in assets of the Unity Editor located in the built-in resources: Resources/unity_builtin_extra. Doesn't support GUIDs since built-in assets do not have them."
    ---
    
    # Assets / Find (Built-in)
    
    ## How to Call
    
    ```bash
    unity-mcp-cli run-tool assets-find-built-in --input '{
      "name": "string_value",
      "type": "string_value",
      "maxResults": 0
    }'
    ```
    
    > For complex input (multi-line strings, code), save the JSON to a file and use:
    > ```bash
    > unity-mcp-cli run-tool assets-find-built-in --input-file args.json
    > ```
    >
    > Or pipe via stdin (recommended):
    > ```bash
    > unity-mcp-cli run-tool assets-find-built-in --input-file - <<'EOF'
    > {"param": "value"}
    > EOF
    > ```
    
    
    ### Troubleshooting
    
    If `unity-mcp-cli` is not found, either install it globally (`npm install -g unity-mcp-cli`) or use `npx unity-mcp-cli` instead.
    Read the /unity-initial-setup skill for detailed installation instructions.
    
    ## Input
    
    | Name | Type | Required | Description |
    |------|------|----------|-------------|
    | `name` | `string` | No | The name of the asset to filter by. |
    | `type` | `any` | No | The type of the asset to filter by. |
    | `maxResults` | `integer` | No | Maximum number of assets to return. If the number of found assets exceeds this limit, the result will be truncated. |
    
    ### Input JSON Schema
    
    ```json
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/System.Type"
        },
        "maxResults": {
          "type": "integer"
        }
      },
      "$defs": {
        "System.Type": {
          "type": "string"
        }
      }
    }
    ```
    
    ## Output
    
    ### Output JSON Schema
    
    ```json
    {
      "type": "object",
      "properties": {
        "result": {
          "$ref": "#/$defs/System.Collections.Generic.List<AIGD.AssetObjectRef>"
        }
      },
      "$defs": {
        "AIGD.AssetObjectRef": {
          "type": "object",
          "properties": {
            "instanceID": {
              "type": "integer",
              "description": "instanceID of the UnityEngine.Object. If this is '0' and 'assetPath' and 'assetGuid' is not provided, empty or null, then it will be used as 'null'."
            },
            "assetType": {
              "$ref": "#/$defs/System.Type",
              "description": "Type of the asset."
            },
            "assetPath": {
              "type": "string",
              "description": "Path to the asset within the project. Starts with 'Assets/'"
            },
            "assetGuid": {
              "type": "string",
              "description": "Unique identifier for the asset."
            }
          },
          "required": [
            "instanceID"
          ],
          "description": "Reference to UnityEngine.Object asset instance. It could be Material, ScriptableObject, Prefab, and any other Asset. Anything located in the Assets and Packages folders."
        },
        "System.Type": {
          "type": "string"
        },
        "System.Collections.Generic.List<AIGD.AssetObjectRef>": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AIGD.AssetObjectRef",
            "description": "Reference to UnityEngine.Object asset instance. It could be Material, ScriptableObject, Prefab, and any other Asset. Anything located in the Assets and Packages folders."
          }
        }
      },
      "required": [
        "result"
      ]
    }
    ```
    
    

README

✨ AI Game Developer — Unity SKILLS, MCP

MCP OpenUPM Docker Image Unity Editor Unity Runtime r
Discord OpenUPM Stars License Stand With Ukraine

AI work

Claude   Codex   Cursor   GitHub Copilot   Gemini   Antigravity   VS Code   Rider   Visual Studio   Open Code   Cline   Kilo Code

中文 | 日本語 | Español

Unity MCP is an AI-powered game development assistant for Editor & Runtime. Connect Claude, Cursor, & Windsurf to Unity via MCP. Automate workflows, generate code, and enable AI within your games.

Unlike other tools, this plugin works inside your compiled game, allowing for real-time AI debugging and player-AI interaction.

💬 Join our Discord Server - Ask questions, showcase your work, and connect with other developers!

AI Game Developer — Unity MCP

  • ✔️ AI agents - Use the best agents from Anthropic, OpenAI, Microsoft, or any other provider with no vendor lock-in
  • ✔️ Tools - A wide range of default MCP Tools for operating in Unity Editor
  • ✔️ Skills - Generate skills for AI based on operating system, Unity version, plugins in the project
  • ✔️ Code and Tests - Develop game mechanics and test them with AI agents
  • ✔️ Runtime (in-game) - Use LLMs directly inside your compiled game for dynamic NPC behavior or debugging
  • ✔️ Debug support - Let AI debug and fix the problems in a project
  • ✔️ Natural conversation - Chat with AI like you would with a human
  • ✔️ Flexible deployment - Works locally (stdio) and remotely (http) via configuration
  • ✔️ Extensible - Create custom Tools in your project code

DOWNLOAD INSTALLER

https://github.com/user-attachments/assets/228baf4d-4f00-4dce-939d-fb985ebdd8dd

OR use cli

# 1. Install unity-mcp-cli
npm install -g unity-mcp-cli

# 2. Install "AI Game Developer" in Unity project
unity-mcp-cli install-plugin ./MyUnityProject

# 3. Login to cloud server
unity-mcp-cli login ./MyUnityProject

# 4. Open Unity project (auto-connects and generates skills)
unity-mcp-cli open ./MyUnityProject

AI Game Developer Windows

AI Game Developer — Unity SKILLS and MCP

Quick Start

Get up and running in three steps:

  1. Install plugin — download the .unitypackage installer or run openupm add com.ivanmurzak.unity.mcp

    Alternative: npx unity-mcp-cli install-plugin ./MyUnityProject — see CLI documentation

  2. Pick an AI agent — Claude Code, Claude Desktop, GitHub Copilot, Cursor, or any other
  3. Setup AI agent — open Window/AI Game Developer in Unity and click Auto-generate skills (recommended) or Configure MCP Setup AI Skills

    Alternative: npx unity-mcp-cli setup-skills claude-code ./MyUnityProject — see CLI documentation

That's it. Ask your AI "Create 3 cubes in a circle with radius 2" and watch it happen. ✨


Skills and Tools Reference

The plugin ships with 100+ built-in tools across three categories. Each tool brings AI skill. All tools are available immediately after installation — no extra configuration required. See docs/default-mcp-tools.md for the full reference with detailed descriptions.

Project & Assets
  • assets-copy - Copy the asset at path and stores it at newPath
  • assets-create-folder - Creates a new folder in the specified parent folder
  • assets-delete - Delete the assets at paths from the project
  • assets-find - Search the asset database using the search filter string
  • assets-find-built-in - Search the built-in assets of the Unity Editor
  • assets-get-data - Get asset data from the asset file including all serializable fields and properties
  • assets-material-create - Create new material asset with default parameters
  • assets-modify - Modify asset file in the project
  • assets-move - Move the assets at paths in the project (also used for rename)
  • assets-prefab-close - Close currently opened prefab
  • assets-prefab-create - Create a prefab from a GameObject in the current active scene
  • assets-prefab-instantiate - Instantiates prefab in the current active scene
  • assets-prefab-open - Open prefab edit mode for a specific GameObject
  • assets-prefab-save - Save a prefab in prefab editing mode
  • assets-refresh - Refreshes the AssetDatabase
  • assets-shader-list-all - List all available shaders in the project assets and packages
  • package-add - Install a package from the Unity Package Manager registry, Git URL, or local path
  • package-list - List all packages installed in the Unity project (UPM packages)
  • package-remove - Remove (uninstall) a package from the Unity project
  • package-search - Search for packages in both Unity Package Manager registry and installed packages
Scene & Hierarchy
  • gameobject-component-add - Add Component to GameObject
  • gameobject-component-destroy - Destroy one or many components from target GameObject
  • gameobject-component-get - Get detailed information about a specific Component on a GameObject
  • gameobject-component-list-all - List C# class names extended from UnityEngine.Component
  • gameobject-component-modify - Modify a specific Component on a GameObject
  • gameobject-create - Create a new GameObject in opened Prefab or in a Scene
  • gameobject-destroy - Destroy GameObject and all nested GameObjects recursively
  • gameobject-duplicate - Duplicate GameObjects in opened Prefab or in a Scene
  • gameobject-find - Finds specific GameObject by provided information
  • gameobject-modify - Modify GameObjects and/or attached component's fields and properties
  • gameobject-set-parent - Set parent GameObject to list of GameObjects
  • object-get-data - Get data of the specified Unity Object
  • object-modify - Modify the specified Unity Object
  • scene-create - Create new scene in the project assets
  • scene-get-data - Retrieves the list of root GameObjects in the specified scene
  • scene-list-opened - Returns the list of currently opened scenes in Unity Editor
  • scene-open - Open scene from the project asset file
  • scene-save - Save opened scene to the asset file
  • scene-set-active - Set the specified opened scene as the active scene
  • scene-unload - Unload scene from the opened scenes in Unity Editor
  • screenshot-camera - Captures a screenshot from a camera and returns it as an image
  • screenshot-game-view - Captures a screenshot from the Unity Editor Game View
  • screenshot-scene-view - Captures a screenshot from the Unity Editor Scene View
Scripting & Editor
  • console-get-logs - Retrieves Unity Editor logs with filtering options
  • editor-application-get-state - Returns information about the Unity Editor application state (playmode, paused, compilation)
  • editor-application-set-state - Control the Unity Editor application state (start/stop/pause playmode)
  • editor-selection-get - Get information about the current Selection in the Unity Editor
  • editor-selection-set - Set the current Selection in the Unity Editor
  • reflection-method-call - Call any C# method with input parameters and return results
  • reflection-method-find - Find method in the project using C# Reflection (even private methods)
  • script-delete - Delete the script file(s)
  • script-execute - Compiles and executes C# code dynamically using Roslyn
  • script-read - Reads the content of a script file
  • script-update-or-create - Updates or creates script file with the provided C# code
  • tests-run - Execute Unity tests (EditMode/PlayMode) with filtering and detailed results

Install Additional Skills and Tools

Install extensions when need more tools or create your own tools.

ExtensionDescription
AI AnimationSet of additional tools for Unity Animations
AI ParticleSystemSet of additional tools for Unity Particle System
AI ProBuilderSet of additional tools for Unity ProBuilder

AI Game Developer — Unity SKILLS and MCP

Contents

More Documentation

DocumentDescription
Default MCP ToolsFull reference of all built-in tools with descriptions
MCP Server SetupServer configuration, environment variables, remote hosting
Docker DeploymentStep-by-step Docker deployment guide
Development GuideArchitecture, code style, CI/CD — for contributors
WikiGetting started, tutorials, API reference, FAQ
CLI ToolInstall plugins, configure, and connect via command line

AI Game Developer — Unity SKILLS and MCP

Installation

Step 1: Install Unity MCP Plugin

⚠️ Requirements (click)

[!IMPORTANT] Project path cannot contain spaces

  • C:/MyProjects/MyProject
  • C:/My Projects/MyProject
  • C:/My Projects/My Project
  • C:/MyProjects/My Project

Option 1 - Installer

  • ⬇️ Download Installer
  • 📂 Import installer into Unity project
    • You can double-click on the file - Unity will open it automatically
    • OR: Open Unity Editor first, then click on Assets/Import Package/Custom Package, and choose the file

Option 2 - CLI (recommended)

Install the plugin via unity-mcp-cli — no Unity Editor needed:

# 1.1 Install unity-mcp-cli                                #  ┌────────────────────┐
npm install -g unity-mcp-cli                               #  │ Available AI agent │
                                                           #  ├────────────────────┤
# 1.2 (Optional) Install Unity                             #  │ antigravity        │
unity-mcp-cli install-unity                                #  │ claude-code        │
                                                           #  │ claude-desktop     │
# 1.3 (Optional) Create Unity project                      #  │ cline              │
unity-mcp-cli create-project ./MyUnityProject              #  │ codex              │
                                                           #  │ cursor             │
# 2. Install "AI Game Developer" in Unity project          #  │ gemini             │
unity-mcp-cli install-plugin ./MyUnityProject              #  │ github-copilot-cli │
                                                           #  │ kilo-code          │
# 3. Login to cloud server                                 #  │ open-code          │
unity-mcp-cli login ./MyUnityProject                       #  │ rider-junie        │
                                                           #  │ unity-ai           │
# 4. Open Unity project (auto-connects and generates skills)  │ vs-copilot         │
unity-mcp-cli open ./MyUnityProject                        #  │ vscode-copilot     │
                                                           #  └────────────────────┘
# 5. Wait for Unity Editor to be ready
unity-mcp-cli wait-for-ready ./MyUnityProject

See full CLI documentation for all available commands.

Step 2: Install AI agent

Choose a single AI agent you prefer - you don't need to install all of them. This will be your main chat window to communicate with the LLM.

The AI Game Developer is quite universal, which is why you may use any AI agent you prefer - it will work as smoothly as any other. The only important requirement is that the AI agent must support Skills or dynamic MCP Tool updates.

Step 3: Configure AI agent

Automatic configuration

  • Open Unity project
  • Open Window/AI Game Developer
  • Option 1: Click Auto-generate Skills (recommended)
  • Option 2: Click Configure Model Context Protocol (MCP)

Unity_AI

If your MCP client is not in the list, use the raw JSON shown in the window to inject it into your MCP client. Read the instructions for your specific MCP client on how to do this.

Manual configuration

If automatic configuration doesn't work for you for any reason, use the JSON from the AI Game Developer (Unity-MCP) window to configure any MCP Client manually.

Command line configuration

Create command

1. Choose your <command> for your environment

Platform<command>
Windows x64"<unityProjectPath>/Library/mcp-server/win-x64/unity-mcp-server.exe" port=<port> client-transport=stdio
Windows x86"<unityProjectPath>/Library/mcp-server/win-x86/unity-mcp-server.exe" port=<port> client-transport=stdio
Windows arm64"<unityProjectPath>/Library/mcp-server/win-arm64/unity-mcp-server.exe" port=<port> client-transport=stdio
MacOS Apple-Silicon"<unityProjectPath>/Library/mcp-server/osx-arm64/unity-mcp-server" port=<port> client-transport=stdio
MacOS Apple-Intel"<unityProjectPath>/Library/mcp-server/osx-x64/unity-mcp-server" port=<port> client-transport=stdio
Linux x64"<unityProjectPath>/Library/mcp-server/linux-x64/unity-mcp-server" port=<port> client-transport=stdio
Linux arm64"<unityProjectPath>/Library/mcp-server/linux-arm64/unity-mcp-server" port=<port> client-transport=stdio

2. Replace <unityProjectPath> with the full path to Unity project

3. Replace <port> with your port from AI Game Developer configuration

4. Add MCP server using command line

Gemini CLI Gemini CLI
gemini mcp add ai-game-developer <command>

Replace <command> from the table above

Claude Code CLI Claude Code CLI
claude mcp add ai-game-developer <command>

Replace <command> from the table above

GitHub Copilot CLI GitHub Copilot CLI
copilot
/mcp add

Server name: ai-game-developer Server type: local Command: <command>

Replace <command> from the table above

AI Game Developer — Unity SKILLS and MCP

AI Workflow Examples

Communicate with the AI (LLM) in your AI agent. Ask it to do anything you want. The better you describe your task or idea, the better it will perform the job.

Some AI agents allow you to choose different LLM models. Pay attention to this feature, as some models may work much better than others.

Example prompts:

Explain my scene hierarchy
Create 3 spheres on top of each other
Create metallic golden material and attach it to a new sphere gameObject

Make sure Agent mode is enabled if using VS Code with Copilot

Advanced Features for LLM

Unity MCP provides advanced tools that enable the LLM to work faster and more effectively, avoiding mistakes and self-correcting when errors occur. Everything is designed to achieve your goals efficiently.

Core Capabilities

  • ✔️ Agent-ready tools - Find anything you need in 1-2 steps
  • ✔️ Instant compilation - C# code compilation & execution using Roslyn for faster iteration
  • ✔️ Full asset access - Read/write access to assets and C# scripts
  • ✔️ Intelligent feedback - Well-described positive and negative feedback for proper issue understanding

Reflection-Powered Features

  • ✔️ Object references - Provide references to existing objects for instant C# code
  • ✔️ Project data access - Get full access to entire project data in a readable format
  • ✔️ Granular modifications - Populate & modify any piece of data in the project
  • ✔️ Method discovery - Find any method in the entire codebase, including compiled DLL files
  • ✔️ Method execution - Call any method in the entire codebase
  • ✔️ Advanced parameters - Provide any property for method calls, even references to existing objects in memory
  • ✔️ Live Unity API - Unity API instantly available - even when Unity changes, you get the fresh API
  • ✔️ Self-documenting - Access human-readable descriptions of any class, method, or property via Description attributes

AI Game Developer — Unity SKILLS and MCP

Customize Tools

Unity MCP supports custom MCP Tool, MCP Resource, and MCP Prompt development by project owners. The MCP server takes data from the Unity MCP Plugin and exposes it to a client. Anyone in the MCP communication chain will receive information about new MCP features, which the LLM may decide to use at some point.

Add custom Tool

To add a custom Tool, you need:

  1. A class with the McpPluginToolType attribute
  2. A method in the class with the McpPluginTool attribute
  3. Optional: Add a Description attribute to each method argument to help the LLM understand it
  4. Optional: Use string? optional = null properties with ? and default values to mark them as optional for the LLM

Note that the line MainThread.Instance.Run(() => allows you to run code on the main thread, which is required for interacting with Unity's API. If you don't need this and running the tool in a background thread is acceptable, avoid using the main thread for efficiency purposes.

[McpPluginToolType]
public class Tool_GameObject
{
    [McpPluginTool
    (
        "MyCustomTask",
        Title = "Create a new GameObject"
    )]
    [Description("Explain here to LLM what is this, when it should be called.")]
    public string CustomTask
    (
        [Description("Explain to LLM what is this.")]
        string inputData
    )
    {
        // do anything in background thread

        return MainThread.Instance.Run(() =>
        {
            // do something in main thread if needed

            return $"[Success] Operation completed.";
        });
    }
}

Add custom MCP Prompt

MCP Prompt allows you to inject custom prompts into the conversation with the LLM. It supports two sender roles: User and Assistant. This is a quick way to instruct the LLM to perform specific tasks. You can generate prompts using custom data, providing lists or any other relevant information.

[McpPluginPromptType]
public static class Prompt_ScriptingCode
{
    [McpPluginPrompt(Name = "add-event-system", Role = Role.User)]
    [Description("Implement UnityEvent-based communication system between GameObjects.")]
    public string AddEventSystem()
    {
        return "Create event system using UnityEvents, UnityActions, or custom event delegates for decoupled communication between game systems and components.";
    }
}

AI Game Developer — Unity SKILLS and MCP

Runtime usage (in-game)

Use Unity MCP in your game/app. Use Tools, Resources or Prompts. By default there are no tools, you would need to implement your custom.

// Build MCP plugin
var mcpPlugin = UnityMcpPluginRuntime.Initialize(builder =>
    {
        builder.WithConfig(config =>
        {
            config.Host = "http://localhost:8080";
            config.Token = "your-token";
        });
        // Automatically register all tools from the current assembly
        builder.WithToolsFromAssembly(Assembly.GetExecutingAssembly());
    })
    .Build();

await mcpPlugin.Connect(); // Start active connection with retry to Unity-MCP-Server

await mcpPlugin.Disconnect(); // Stop active connection and close existed connection

Sample: AI powered Chess game bot

There is a classic Chess game. Lets outsource to LLM the bot logic. Bot should do the turn using game rules.

[McpPluginToolType]
public static class ChessGameAI
{
    [McpPluginTool("chess-do-turn", Title = "Do the turn")]
    [Description("Do the turn in the chess game. Returns true if the turn was accepted, false otherwise.")]
    public static Task<bool> DoTurn(int figureId, Vector2Int position)
    {
        return MainThread.Instance.RunAsync(() => ChessGameController.Instance.DoTurn(figureId, position));
    }

    [McpPluginTool("chess-get-board", Title = "Get the board")]
    [Description("Get the current state of the chess board.")]
    public static Task<BoardData> GetBoard()
    {
        return MainThread.Instance.RunAsync(() => ChessGameController.Instance.GetBoardData());
    }
}

Why runtime usage is needed?

There are many use cases, lets imagine you are working on a Chess game with bot. You may outsource the bot decision making to LLM by writing few lines of code.

AI Game Developer — Unity SKILLS and MCP

Unity MCP Server setup

Unity MCP Server supports many different launch options and Docker deployment. Both transport protocols are supported: streamableHttp and stdio. If you need to customize or deploy Unity MCP Server to a cloud, this section is for you. Read more...

Variables

Doesn't matter what launch option you choose, all of them support custom configuration using both Environment Variables and Command Line Arguments. It would work with default values, if you just need to launch it, don't waste your time for the variables. Just make sure Unity Plugin also has default values, especially the --port, they should be equal.

Environment VariableCommand Line ArgsDescription
MCP_PLUGIN_PORT--portClient -> Server <- Plugin connection port (default: 8080)
MCP_PLUGIN_CLIENT_TIMEOUT--plugin-timeoutPlugin -> Server connection timeout (ms) (default: 10000)
MCP_PLUGIN_CLIENT_TRANSPORT--client-transportClient -> Server transport type: stdio or streamableHttp (default: streamableHttp)

Command line args support also the option with a single - prefix (-port) and an option without prefix at all (port).

Choosing a transport: Use stdio when the MCP client launches the server binary directly (local use — this is the most common setup). Use streamableHttp when running the server as a standalone process or in Docker/cloud, and connecting over HTTP.

Plugin Variables

The Unity MCP Plugin reads the following environment variables (and command-line arguments) on startup to override values from the saved config file. Overrides are applied at runtime; on first run or when a new authentication token is generated, the overridden values are written to the config file. On subsequent runs, overrides are applied in memory but are not automatically saved. The exception is UNITY_MCP_TOOLS, which uses [JsonIgnore] and is never persisted — it is runtime-only.

Environment VariableCommand Line ArgValuesDescription
UNITY_MCP_HOST-UNITY_MCP_HOSTURL stringOverride the MCP Server host URL
UNITY_MCP_KEEP_CONNECTED-UNITY_MCP_KEEP_CONNECTEDtrue / falseForce enable or disable the active connection
UNITY_MCP_AUTH_OPTION-UNITY_MCP_AUTH_OPTIONnone / requiredForce set the authentication mode
UNITY_MCP_TOKEN-UNITY_MCP_TOKENstringForce set the authentication token
UNITY_MCP_TOOLS-UNITY_MCP_TOOLScomma-separated tool IDsEnable only the listed tools; all others are disabled. Unknown IDs are logged as errors.

Command-line args take precedence over environment variables. Both override the saved config file value.

Example (CI/CD batch mode):

Unity.exe -batchmode -nographics \
  -UNITY_MCP_HOST=http://localhost:8080 \
  -UNITY_MCP_KEEP_CONNECTED=true \
  -UNITY_MCP_AUTH_OPTION=required \
  -UNITY_MCP_TOKEN=my-secret-token

Docker 📦

Docker Image

Make sure Docker is installed. And please make sure Docker Desktop is launched if you are at Windows operation system.

Read advanced Docker configuration instructions.

streamableHttp Transport

docker run -p 8080:8080 ivanmurzakdev/unity-mcp-server
MCP Client config:
{
  "mcpServers": {
    "ai-game-developer": {
      "url": "http://localhost:8080"
    }
  }
}

Replace url with your real endpoint if it is hosted in cloud.

stdio Transport

For using this variant, MCP Client should launch the MCP Server in the docker. It is achievable through the modified MCP Client configuration.

docker run -t -e MCP_PLUGIN_CLIENT_TRANSPORT=stdio -p 8080:8080 ivanmurzakdev/unity-mcp-server
MCP Client config:
{
  "mcpServers": {
    "ai-game-developer": {
      "command": "docker",
      "args": [
        "run",
        "-t",
        "-e",
        "MCP_PLUGIN_CLIENT_TRANSPORT=stdio",
        "-p",
        "8080:8080",
        "ivanmurzakdev/unity-mcp-server"
      ]
    }
  }
}

Custom port

docker run -e MCP_PLUGIN_PORT=123 -p 123:123 ivanmurzakdev/unity-mcp-server
MCP Client config:
{
  "mcpServers": {
    "ai-game-developer": {
      "url": "http://localhost:123"
    }
  }
}

Replace url with your real endpoint if it is hosted in cloud

Binary executable

You may launch Unity MCP Server directly from a binary file. You would need to have a binary compiled specifically for your CPU architecture. Check GitHub Release Page, it contains pre-compiled binaries for all CPU architectures.

./unity-mcp-server --port 8080 --plugin-timeout 10000 --client-transport stdio
MCP Client config:

Replace <project> with your Unity project path.

{
  "mcpServers": {
    "ai-game-developer": {
      "command": "<project>/Library/mcp-server/win-x64/unity-mcp-server.exe",
      "args": [
        "--port=8080",
        "--plugin-timeout=10000",
        "--client-transport=stdio"
      ]
    }
  }
}

AI Game Developer — Unity SKILLS and MCP

How Unity MCP Architecture Works

Unity MCP serves as a bridge between LLMs and Unity. It exposes and explains Unity's tools to the LLM, which then understands the interface and utilizes the tools according to user requests.

Connect Unity MCP to LLM clients such as Claude or Cursor using the integrated AI Connector window. Custom clients are also supported.

The system is highly extensible - you can define custom MCP Tools, MCP Resource or MCP Prompt directly in your Unity project codebase, exposing new capabilities to AI or automation clients. This makes Unity MCP a flexible foundation for building advanced workflows, rapid prototyping, and integrating AI-driven features into your development process.

What is MCP

MCP - Model Context Protocol. In a few words, that is USB Type-C for AI, specifically for LLM (Large Language Model). It teaches LLM how to use external features. Such as Unity Engine in this case, or even your custom C# method in your code. Official documentation.

What is AI agent

It is an application with a chat window. It may have smart agents to operate better, it may have embedded advanced MCP Tools. In general well done MCP Client is 50% of the AI success of executing a task. That is why it is very important to choose the best one for usage.

What is MCP Server

It is a bridge between MCP Client and "something else", in this particular case it is Unity Engine. This project includes MCP Server.

What is MCP Tool

MCP Tool is a function or method that the LLM can call to interact with Unity. These tools act as the bridge between natural language requests and actual Unity operations. When you ask the AI to "create a cube" or "change material color," it uses MCP Tools to execute these actions.

Key characteristics:

  • Executable functions that perform specific operations
  • Typed parameters with descriptions to help the LLM understand what data to provide
  • Return values that give feedback about the operation's success or failure
  • Thread-aware - can run on main thread for Unity API calls or background thread for heavy processing

When to use Tool

  • Automate repetitive tasks - Create tools for common operations you do frequently
  • Complex operations - Bundle multiple Unity API calls into a single, easy-to-use tool
  • Project-specific workflows - Build tools that understand your project's specific structure and conventions
  • Error-prone tasks - Create tools that include validation and error handling
  • Custom game logic - Expose your game's systems to AI for dynamic content creation

Examples:

  • Creating and configuring GameObjects with specific components
  • Batch processing assets (textures, materials, prefabs)
  • Setting up lighting and post-processing effects
  • Generating level geometry or placing objects procedurally
  • Configuring physics settings or collision layers

What is MCP Resource

MCP Resource provides read-only access to data within your Unity project. Unlike MCP Tools that perform actions, Resources allow the LLM to inspect and understand your project's current state, assets, and configuration. Think of them as "sensors" that give the AI context about your project.

Key characteristics:

  • Read-only access to project data and Unity objects
  • Structured information presented in a format the LLM can understand
  • Real-time data that reflects the current state of your project
  • Contextual awareness helping the AI make informed decisions

When to use MCP Resource

  • Project analysis - Let AI understand your project structure, assets, and organization
  • Debugging assistance - Provide current state information for troubleshooting
  • Intelligent suggestions - Give AI context to make better recommendations
  • Documentation generation - Automatically create documentation based on project state
  • Asset management - Help AI understand what assets are available and their properties

Examples:

  • Exposing scene hierarchy and GameObject properties
  • Listing available materials, textures, and their settings
  • Showing script dependencies and component relationships
  • Displaying current lighting setup and render pipeline configuration
  • Providing information about audio sources, animations, and particle systems

What is MCP Prompt

MCP Prompt allows you to inject pre-defined prompts into the conversation with the LLM. These are smart templates that can provide context, instructions, or knowledge to guide the AI's behavior. Prompts can be static text or dynamically generated based on your project's current state.

Key characteristics:

  • Contextual guidance that influences how the AI responds
  • Role-based - can simulate different personas (User requests or Assistant knowledge)
  • Dynamic content - can include real-time project data
  • Reusable templates for common scenarios and workflows

When to use MCP Prompt

  • Provide domain knowledge - Share best practices and coding standards specific to your project
  • Set coding conventions - Establish naming conventions, architecture patterns, and code style
  • Give context about project structure - Explain how your project is organized and why
  • Share workflow instructions - Provide step-by-step procedures for common tasks
  • Inject specialized knowledge - Add information about specific Unity features, third-party assets, or custom systems

Examples:

  • "Always use PascalCase for public methods and camelCase for private fields"
  • "This project uses a custom event system located in Scripts/Events/"
  • "When creating UI elements, always add them to the Canvas in Scene/UI/MainCanvas"
  • "Performance is critical - prefer object pooling for frequently instantiated objects"
  • "This project follows SOLID principles - explain any architecture decisions"

AI Game Developer — Unity SKILLS and MCP

Contribution 💙💛

Contributions are highly appreciated. Bring your ideas and let's make game development simpler than ever before! Do you have an idea for a new Tool or feature, or did you spot a bug and know how to fix it?

Please give this project a star 🌟 if you find it useful!

  1. 👉 Read Development documentation
  2. 👉 Fork the project
  3. Clone the fork and open the ./Unity-MCP-Plugin folder in Unity
  4. Implement new things in the project, commit, push it to GitHub
  5. Create Pull Request targeting original Unity-MCP repository, main branch.

AI Game Developer — Unity SKILLS and MCP