Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
ba308da
fix: add bearer token environment variable support for Codex agent co…
IvanMurzak Mar 3, 2026
a247136
Create bump_version.yml
IvanMurzak Mar 3, 2026
b428102
Update bump_version.yml
IvanMurzak Mar 3, 2026
8a46b0a
chore: bump version to 0.51.4
IvanMurzak Mar 3, 2026
b50dd5b
Replace TryPopulate with TryModify
IvanMurzak Mar 3, 2026
89e764f
Update version bump workflow to use force push
IvanMurzak Mar 4, 2026
c87faa7
Add Unity MCP Test Client
IvanMurzak Mar 4, 2026
6ce6269
Create .env.example
IvanMurzak Mar 4, 2026
8be5c61
Refactor GameObject.Component.Get to improve validation logic and add…
IvanMurzak Mar 4, 2026
fc0c01b
Refactor validation logic in GameObject.Component.Add and GameObject.…
IvanMurzak Mar 4, 2026
8216ab5
Remove redundant tests for MCP tools input schema validation
IvanMurzak Mar 4, 2026
42f0523
Update claude.yml
IvanMurzak Mar 4, 2026
7c57e96
Run Unity editor in Docker, remove unity-builder
IvanMurzak Mar 4, 2026
c408e68
Add env/CLI config overrides and docs
IvanMurzak Mar 4, 2026
61b1522
Update claude.yml
IvanMurzak Mar 4, 2026
24937dd
Improve CI workflow: dispatch, Docker robustness
IvanMurzak Mar 5, 2026
f30cd38
Update claude.yml
IvanMurzak Mar 5, 2026
e505b1f
Update README: env/CLI overrides are persistent, not session-only
Copilot Mar 5, 2026
ae5d1b4
CI: Add Unity activation and env logging
IvanMurzak Mar 5, 2026
2b8f44a
Update CLAUDE.md
IvanMurzak Mar 5, 2026
302b3a1
Merge branch 'ci/unity-with-claude' of https://github.com/IvanMurzak/…
IvanMurzak Mar 5, 2026
75c6bbf
Update claude.yml
IvanMurzak Mar 5, 2026
b92fbaa
Enhance MCP Plugin: Add support for ENABLED_TOOLS environment variabl…
IvanMurzak Mar 5, 2026
5e266df
Update Unity MCP Plugin: Refactor environment variable handling and i…
IvanMurzak Mar 5, 2026
d9512c1
Add Copilot setup steps workflow for Unity MCP
IvanMurzak Mar 5, 2026
5c5e0e2
Enhance CI workflows: Setup Node.js, install unity-license-activate, …
IvanMurzak Mar 6, 2026
215956f
Enhance license activation process: Add logging for ULF file search a…
IvanMurzak Mar 6, 2026
2dcd4dc
Fix CI: allow MCP connection when UNITY_MCP_KEEP_CONNECTED=true and f…
IvanMurzak Mar 6, 2026
8a950e5
Enhance CI workflows: Add UNITY_MCP_TOOLS environment variable for im…
IvanMurzak Mar 6, 2026
b4a923d
Enhance CI workflows: Integrate setup action for Unity MCP and update…
IvanMurzak Mar 6, 2026
9fb1ee7
Enhance workflows: Add author and license information to workflow fil…
IvanMurzak Mar 7, 2026
99e3493
Enhance setup action: Add inputs for project path and caching options…
IvanMurzak Mar 7, 2026
4c61f0b
Enhance workflows: Use secret for UNITY_MCP_TOOLS in workflow files f…
IvanMurzak Mar 7, 2026
e798bbb
Enhance workflows: Upgrade actions/checkout from v4 to v5 for improve…
IvanMurzak Mar 7, 2026
6ee8dd2
Enhance setup action: Update Docker image tag for unity-mcp-server to…
IvanMurzak Mar 7, 2026
5a8aadd
Enhance workflows: Update unity-mcp-tools logic for better handling o…
IvanMurzak Mar 7, 2026
de4f587
Refactor tool management: Optimize tool validation and enablement log…
IvanMurzak Mar 7, 2026
31d4816
Merge pull request #525 from IvanMurzak/ci/unity-with-claude
IvanMurzak Mar 7, 2026
3f439d3
Update Claude workflow permissions to allow write access for contents…
IvanMurzak Mar 7, 2026
20bcd5e
Update .gitignore: Add .unity-license and ensure newline at end of file
IvanMurzak Mar 7, 2026
e8d75de
Refactor Claude workflow: Simplify allowedTools syntax and enable ful…
IvanMurzak Mar 7, 2026
fdd1bea
Add mcp-servers configuration and update Claude workflow to use it
IvanMurzak Mar 7, 2026
442f675
Update Claude workflow to use absolute path for mcp-servers configura…
IvanMurzak Mar 7, 2026
02988fb
Add environment specification for copilot-setup-steps job
IvanMurzak Mar 7, 2026
239fa78
fix: replace DateTime stale-check with thread-safe Interlocked versio…
github-actions[bot] Mar 9, 2026
6fd0dd9
refactor: change log level from Warning to Trace for MCP and AI agent…
IvanMurzak Mar 9, 2026
472264b
Merge pull request #537 from IvanMurzak/claude/issue-536-20260309-0628
IvanMurzak Mar 9, 2026
42395f0
feat: add settings.json files for Claude configuration in main and pl…
IvanMurzak Mar 9, 2026
26bc82a
refactor: simplify permissions in settings.json and add enabledPlugin…
IvanMurzak Mar 9, 2026
ab27b12
refactor: restrict permissions in settings.json to specific actions f…
IvanMurzak Mar 9, 2026
8672e1d
chore: bump version to 0.51.5
IvanMurzak Mar 9, 2026
c9efe97
chore: update package version to 0.51.4 and bump dependencies to late…
IvanMurzak Mar 9, 2026
95dd632
Merge branch 'main' into release/0.51.5
IvanMurzak Mar 9, 2026
3bd4345
Merge pull request #538 from IvanMurzak/release/0.51.5
IvanMurzak Mar 9, 2026
fb3088f
fix: handle exceptions when creating metadata references for assemblies
IvanMurzak Mar 11, 2026
2b94885
fix: improve logging for assembly metadata reference loading errors
IvanMurzak Mar 11, 2026
3b133fb
fix: enhance error handling for assembly metadata reference creation
IvanMurzak Mar 11, 2026
11adf9a
Merge pull request #544 from IvanMurzak/fix/script-execution-with-lon…
IvanMurzak Mar 11, 2026
ce80626
fix: remove null filtering from metadata references collection
IvanMurzak Mar 11, 2026
408691f
fix: update Unity workflow configurations for improved security and f…
IvanMurzak Mar 11, 2026
a29b9f3
fix: update pull request trigger settings in workflow configuration
IvanMurzak Mar 11, 2026
dec4043
fix: correct syntax for pull request workflow file checks
IvanMurzak Mar 11, 2026
7fb543a
feat: add Unity license activation action and integrate into workflows
IvanMurzak Mar 11, 2026
1e373e9
fix: update Unity license handling to use base64 encoding and decoding
IvanMurzak Mar 11, 2026
8288714
fix: simplify Unity license decoding and environment variable setup
IvanMurzak Mar 11, 2026
2b59de5
fix: update Unity license decoding to use delimiter for environment v…
IvanMurzak Mar 11, 2026
adcb3f5
fix: improve Unity license decoding and environment variable setup
IvanMurzak Mar 11, 2026
dfa1699
fix: update workflow files to streamline pull request handling and un…
IvanMurzak Mar 11, 2026
3adcfdd
fix: enhance Unity license activation logic and specify unity-license…
IvanMurzak Mar 11, 2026
4d6a7c5
Merge pull request #545 from IvanMurzak/update/fork-pr-tests-run
IvanMurzak Mar 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"permissions": {
"allow": [
"Bash(*)",
"Read(*)",
"WebFetch(*)",
"mcp__ai-game-developer__*"
],
"additionalDirectories": []
},
"enableAllProjectMcpServers": true,
"enabledMcpjsonServers": [
"ai-game-developer"
],
"enabledPlugins": {
"csharp-lsp@claude-plugins-official": true
}
}
159 changes: 159 additions & 0 deletions .github/actions/setup-unity-mcp/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# ┌──────────────────────────────────────────────────────────────────┐
# │ Author: Ivan Murzak (https://github.com/IvanMurzak) │
# │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
# │ Copyright (c) 2025 Ivan Murzak │
# │ Licensed under the Apache License, Version 2.0. │
# │ See the LICENSE file in the project root for more information. │
# └──────────────────────────────────────────────────────────────────┘

name: "Setup Unity MCP"
description: "Start MCP Server and Unity Editor in Docker containers with license activation"

inputs:
unity-email:
description: "Unity account email for license activation"
required: false
default: ""
unity-password:
description: "Unity account password for license activation"
required: false
default: ""
unity-license:
description: "Unity license file content (ULF XML). If provided, skips activation."
required: false
default: ""
unity-project-path:
description: "Relative path to the Unity project folder"
required: false
default: "Unity-MCP-Plugin"
cache-library:
description: "Enable caching of the Unity Library folder"
required: false
default: "true"
unity-mcp-tools:
description: "Comma-separated list of MCP tool IDs to enable (optional)"
required: false
default: ""

runs:
using: "composite"
steps:
- name: Read Unity version
id: unity-version
run: |
UNITY_VERSION=$(grep "^m_EditorVersion:" ${{ inputs.unity-project-path }}/ProjectSettings/ProjectVersion.txt | awk '{print $2}')
echo "unity_version=${UNITY_VERSION}" >> "$GITHUB_OUTPUT"
shell: bash

- name: Cache Unity Library
if: inputs.cache-library == 'true'
uses: actions/cache@v4
with:
path: ${{ inputs.unity-project-path }}/Library
key: unity-library-${{ steps.unity-version.outputs.unity_version }}-ubuntu-base

- name: Start AI-Game-Developer MCP Server
run: |
docker rm -f unity-mcp-server 2>/dev/null || true

docker run -d \
--name unity-mcp-server \
--network host \
-e MCP_PLUGIN_PORT=8080 \
-e MCP_PLUGIN_CLIENT_TRANSPORT=streamableHttp \
-e MCP_AUTHORIZATION=none \
ivanmurzakdev/unity-mcp-server:latest

echo "Waiting for MCP Server to be ready..."
for i in $(seq 1 12); do
sleep 5
if docker logs unity-mcp-server 2>&1 | grep -q "Start listening on port:"; then
echo "MCP Server is ready."; break
fi
echo "Still waiting... ($((i*5))s)"
if [ "$i" -eq 12 ]; then
echo "Timeout waiting for MCP Server"
docker logs unity-mcp-server
exit 1
fi
done
shell: bash

# --------------------------------------------------------------------- #
# License activation: use provided license or activate from credentials
# --------------------------------------------------------------------- #
- name: Activate Unity license (with credentials)
if: inputs.unity-license == '' && inputs.unity-email != '' && inputs.unity-password != ''
id: activate-creds
uses: ./.github/actions/unity/activate-license
with:
unityVersion: ${{ steps.unity-version.outputs.unity_version }}
unity-email: ${{ inputs.unity-email }}
unity-password: ${{ inputs.unity-password }}

- name: Activate Unity license (with defaults)
if: inputs.unity-license == '' && (inputs.unity-email == '' || inputs.unity-password == '')
id: activate-defaults
uses: ./.github/actions/unity/activate-license
with:
unityVersion: ${{ steps.unity-version.outputs.unity_version }}

Comment on lines +94 to +100
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This composite action will activate a Unity license using the embedded default credentials when unity-email/unity-password are not provided (Activate Unity license (with defaults) step). This creates an implicit privileged path for any workflow using the action and keeps credentials in-repo. Prefer requiring unity-license or explicit secrets and fail fast if neither is provided.

Copilot uses AI. Check for mistakes.
- name: Write Unity license file
run: |
mkdir -p "${GITHUB_WORKSPACE}/.unity-license"
if [ -n "$LICENSE_FROM_INPUT" ]; then
echo "$LICENSE_FROM_INPUT" > "${GITHUB_WORKSPACE}/.unity-license/Unity_lic.ulf"
echo "Unity license written from input"
else
echo "$LICENSE_B64" | base64 -d > "${GITHUB_WORKSPACE}/.unity-license/Unity_lic.ulf"
echo "Unity license written from activation"
fi
env:
LICENSE_FROM_INPUT: ${{ inputs.unity-license }}
LICENSE_B64: ${{ steps.activate-creds.outputs.license || steps.activate-defaults.outputs.license }}
shell: bash

- name: Start Unity Editor in background
env:
UNITY_VERSION: ${{ steps.unity-version.outputs.unity_version }}
UNITY_MCP_TOOLS: ${{ inputs.unity-mcp-tools }}
run: |
docker rm -f unity-editor 2>/dev/null || true

TOOLS_ENV=""
if [ -n "$UNITY_MCP_TOOLS" ]; then
TOOLS_ENV="-e UNITY_MCP_TOOLS=${UNITY_MCP_TOOLS}"
fi

docker run -d \
--name unity-editor \
--network host \
-e UNITY_MCP_HOST=http://localhost:8080 \
-e UNITY_MCP_KEEP_CONNECTED=true \
-e UNITY_MCP_AUTH_OPTION=none \
${TOOLS_ENV} \
-v "${GITHUB_WORKSPACE}:/workspace" \
-v "${GITHUB_WORKSPACE}/.unity-license:/root/.local/share/unity3d/Unity/" \
unityci/editor:ubuntu-${UNITY_VERSION}-base-3 \
unity-editor -batchmode -projectPath /workspace/${{ inputs.unity-project-path }} -logFile /dev/stdout

echo "Waiting for Unity project to load..."
for i in $(seq 1 48); do
sleep 5
# Fail fast if the container already exited
if [ "$(docker inspect -f '{{.State.Status}}' unity-editor 2>/dev/null)" = "exited" ]; then
echo "Unity Editor container exited early!"
docker logs unity-editor
exit 1
fi
if docker logs unity-editor 2>&1 | grep -q "Loading completed\|Compilation finished\|All assemblies built"; then
echo "Unity is ready."; break
fi
echo "Still waiting... ($((i*5))s)"
if [ "$i" -eq 48 ]; then
echo "Timeout waiting for Unity Editor"
docker logs unity-editor 2>&1 | tail -50
exit 1
fi
done
shell: bash
102 changes: 102 additions & 0 deletions .github/actions/unity/activate-license/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# ┌──────────────────────────────────────────────────────────────────┐
# │ Author: Ivan Murzak (https://github.com/IvanMurzak) │
# │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
# │ Copyright (c) 2025 Ivan Murzak │
# │ Licensed under the Apache License, Version 2.0. │
# │ See the LICENSE file in the project root for more information. │
# └──────────────────────────────────────────────────────────────────┘

name: "Unity Activate License"
description: "Activate a Unity Personal license via unity-license-activate and output the ULF content"

inputs:
unityVersion:
description: "Unity version to activate (e.g. 2022.3.62f3)"
required: true
unity-email:
description: "Unity account email"
required: false
default: "UnityEngineTester@gmail.com"
unity-password:
description: "Unity account password"
required: false
default: "ZUq3YR6qM1"
Comment on lines +16 to +23
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The composite action hard-codes default Unity account credentials (email/password). This is effectively committing credentials to the repository and makes it easy to run license activation with shared credentials unintentionally. Make these inputs required (or require unity-license to be provided) and remove the defaults; fail the action when credentials/license are not supplied via GitHub Secrets.

Copilot uses AI. Check for mistakes.

outputs:
license:
description: "Unity license file content (ULF XML, base64-encoded)"
value: ${{ steps.ulf.outputs.content }}

runs:
using: "composite"
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install unity-license-activate
run: npm install --global unity-license-activate@0.3.9
shell: bash

- name: Generate Unity activation file (.alf)
id: alf
env:
UNITY_VERSION: ${{ inputs.unityVersion }}
run: |
mkdir -p unity-license

docker run --rm \
-v "$(pwd)/unity-license:/output" \
-w /output \
unityci/editor:ubuntu-${UNITY_VERSION}-base-3 \
unity-editor -batchmode -createManualActivationFile -logFile /dev/stdout || true

ALF_FILE=$(find unity-license -name "*.alf" | head -1)
if [ -z "$ALF_FILE" ]; then
echo "Failed to generate .alf file"
exit 1
fi
echo "Generated ALF file: $ALF_FILE"
echo "alf_path=${ALF_FILE}" >> "$GITHUB_OUTPUT"
shell: bash

- name: Activate Unity license
id: ulf
env:
UNITY_EMAIL: ${{ inputs.unity-email }}
UNITY_PASSWORD: ${{ inputs.unity-password }}
run: |
MAX_RETRIES=5
for attempt in $(seq 1 $MAX_RETRIES); do
echo "=== License activation attempt $attempt of $MAX_RETRIES ==="
if unity-license-activate "$UNITY_EMAIL" "$UNITY_PASSWORD" "${{ steps.alf.outputs.alf_path }}"; then
echo "unity-license-activate succeeded on attempt $attempt"
break
fi
if [ "$attempt" -eq "$MAX_RETRIES" ]; then
echo "All $MAX_RETRIES license activation attempts failed"
exit 1
fi
echo "Attempt $attempt failed, retrying in 10s..."
sleep 10
done

ULF_FILE=$(find . -maxdepth 2 -name "*.ulf" | head -1)
if [ -z "$ULF_FILE" ]; then
echo "Failed to obtain .ulf license file"
exit 1
fi
echo "Found ULF file: $ULF_FILE"

encoded=$(base64 -w 0 "$ULF_FILE")
echo "content=$encoded" >> "$GITHUB_OUTPUT"
shell: bash

- name: Upload error screenshot
if: failure()
uses: actions/upload-artifact@v4
with:
name: unity-license-error-${{ inputs.unityVersion }}
path: error.png
if-no-files-found: ignore
8 changes: 8 additions & 0 deletions .github/configs/mcp-servers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mcpServers": {
"ai-game-developer": {
"type": "streamableHttp",
"url": "http://localhost:8080"
}
}
}
60 changes: 60 additions & 0 deletions .github/workflows/bump_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# ┌──────────────────────────────────────────────────────────────────┐
# │ Author: Ivan Murzak (https://github.com/IvanMurzak) │
# │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
# │ Copyright (c) 2025 Ivan Murzak │
# │ Licensed under the Apache License, Version 2.0. │
# │ See the LICENSE file in the project root for more information. │
# └──────────────────────────────────────────────────────────────────┘

name: bump version

on:
workflow_dispatch:
inputs:
version:
description: "New version number (e.g. 1.2.3)"
required: true
type: string

jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Validate version format
run: |
if ! [[ "${{ github.event.inputs.version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: version must be in X.X.X format (got: ${{ github.event.inputs.version }})"
exit 1
fi

- name: Checkout repository
uses: actions/checkout@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Create release branch
run: |
git config user.name "IvanMurzak"
git config user.email "Ivan.D.Murzak@gmail.com"
git fetch origin
git checkout -B release/${{ github.event.inputs.version }}

- name: Run bump-version script
shell: pwsh
run: ./commands/bump-version.ps1 -NewVersion "${{ github.event.inputs.version }}"

- name: Commit and push version bump
run: |
git add -A
git commit -m "chore: bump version to ${{ github.event.inputs.version }}"
git push --force-with-lease origin release/${{ github.event.inputs.version }}

- name: Create pull request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create \
--base ${{ github.ref_name }} \
--head release/${{ github.event.inputs.version }} \
--title "chore: bump version to ${{ github.event.inputs.version }}" \
--body "Automated version bump to \`${{ github.event.inputs.version }}\` triggered via workflow dispatch."
Loading
Loading