Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ jobs:
jq ".version = \"${NEW_VERSION}\"" MCPForUnity/package.json > MCPForUnity/package.json.tmp
mv MCPForUnity/package.json.tmp MCPForUnity/package.json

echo "Updating Server/pyproject.toml to $NEW_VERSION"
sed -i '0,/^version = ".*"/s//version = "'"$NEW_VERSION"'"/' "Server/pyproject.toml"
echo "Updating MCPForUnity/Server~/pyproject.toml to $NEW_VERSION"
sed -i '0,/^version = ".*"/s//version = "'"$NEW_VERSION"'"/' "MCPForUnity/Server~/pyproject.toml"

echo "Updating Server/README.md version references to v$NEW_VERSION"
sed -i 's|git+https://github.com/CoplayDev/unity-mcp@v[0-9]\+\.[0-9]\+\.[0-9]\+#subdirectory=Server|git+https://github.com/CoplayDev/unity-mcp@v'"$NEW_VERSION"'#subdirectory=Server|g' Server/README.md
echo "Updating MCPForUnity/Server~/README.md version references to v$NEW_VERSION"
sed -i 's|git+https://github.com/CoplayDev/unity-mcp@v[0-9]\+\.[0-9]\+\.[0-9]\+#subdirectory=MCPForUnity/Server~|git+https://github.com/CoplayDev/unity-mcp@v'"$NEW_VERSION"'#subdirectory=MCPForUnity/Server~|g' "MCPForUnity/Server~/README.md"

- name: Commit and push changes
env:
Expand All @@ -81,7 +81,7 @@ jobs:
set -euo pipefail
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add MCPForUnity/package.json "Server/pyproject.toml" Server/README.md
git add MCPForUnity/package.json "MCPForUnity/Server~/pyproject.toml" "MCPForUnity/Server~/README.md"
if git diff --cached --quiet; then
echo "No version changes to commit."
else
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/claude-mcp-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
uv venv
echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> "$GITHUB_ENV"
echo "$GITHUB_WORKSPACE/.venv/bin" >> "$GITHUB_PATH"
if [ -f Server/pyproject.toml ]; then
uv pip install -e Server
elif [ -f Server/requirements.txt ]; then
uv pip install -r Server/requirements.txt
if [ -f MCPForUnity/Server~/pyproject.toml ]; then
uv pip install -e "MCPForUnity/Server~"
elif [ -f MCPForUnity/Server~/requirements.txt ]; then
uv pip install -r MCPForUnity/Server~/requirements.txt
else
echo "No MCP Python deps found" >&2
exit 1
Expand All @@ -48,8 +48,6 @@ jobs:
cat > "$UNITY_MCP_STATUS_DIR/unity-mcp-status-dummy.json" <<JSON
{ "unity_port": 0, "reason": "dummy", "reloading": false, "project_path": "$UNITY_PROJECT_ROOT/Assets" }
JSON
uv run --active --directory Server mcp-for-unity --transport stdio --help \
uv run --active --directory "MCPForUnity/Server~" mcp-for-unity --transport stdio --help \
> /tmp/mcp-preflight.log 2>&1 || { cat /tmp/mcp-preflight.log; exit 1; }
cat /tmp/mcp-preflight.log


24 changes: 12 additions & 12 deletions .github/workflows/claude-nl-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ jobs:
uv venv
echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> "$GITHUB_ENV"
echo "$GITHUB_WORKSPACE/.venv/bin" >> "$GITHUB_PATH"
if [ -f Server/pyproject.toml ]; then
uv pip install -e Server
elif [ -f Server/requirements.txt ]; then
uv pip install -r Server/requirements.txt
if [ -f MCPForUnity/Server~/pyproject.toml ]; then
uv pip install -e "MCPForUnity/Server~"
elif [ -f MCPForUnity/Server~/requirements.txt ]; then
uv pip install -r MCPForUnity/Server~/requirements.txt
else
echo "No MCP Python deps found (skipping)"
fi
Expand Down Expand Up @@ -409,7 +409,7 @@ jobs:
"run",
"--active",
"--directory",
"Server",
"MCPForUnity/Server~",
"mcp-for-unity",
"--transport",
"stdio",
Expand Down Expand Up @@ -512,7 +512,7 @@ jobs:
attempt=0
while true; do
attempt=$((attempt+1))
if uv run --active --directory Server mcp-for-unity --transport stdio --help > /tmp/mcp-preflight.log 2>&1; then
if uv run --active --directory "MCPForUnity/Server~" mcp-for-unity --transport stdio --help > /tmp/mcp-preflight.log 2>&1; then
cat /tmp/mcp-preflight.log
break
fi
Expand Down Expand Up @@ -541,7 +541,7 @@ jobs:
echo "--- PortDiscovery debug ---"
python3 - <<'PY'
import sys
sys.path.insert(0, "Server/src")
sys.path.insert(0, "MCPForUnity/Server~/src")
from transport.legacy.port_discovery import PortDiscovery
import json

Expand All @@ -556,7 +556,7 @@ jobs:
import json
import subprocess
cmd = [
"uv", "run", "--active", "--directory", "Server", "python", "-c",
"uv", "run", "--active", "--directory", "MCPForUnity/Server~", "python", "-c",
"from transport.legacy.stdio_port_registry import stdio_port_registry; "
"inst = stdio_port_registry.get_instances(force_refresh=True); "
"import json; print(json.dumps([{'id':i.id,'port':i.port} for i in inst]))"
Expand All @@ -577,7 +577,7 @@ jobs:
PY

echo "=== Testing MCP server startup with --status-dir flag ==="
uv run --active --directory Server python <<'PYTEST'
uv run --active --directory "MCPForUnity/Server~" python <<'PYTEST'
import os
import sys
import glob
Expand All @@ -602,7 +602,7 @@ jobs:
set -euxo pipefail
echo "=== Unity container status ==="
docker inspect -f '{{.State.Status}} {{.State.Running}}' unity-mcp || echo "Container not found!"

echo "=== Raw socket probe to Unity ==="
# Try raw TCP connect without Python overhead
for host in 127.0.0.1 localhost; do
Expand All @@ -613,10 +613,10 @@ jobs:
echo "$host:6400 - FAILED"
fi
done

echo "=== Netstat for port 6400 ==="
docker exec unity-mcp netstat -tlnp 2>/dev/null | grep 6400 || ss -tlnp | grep 6400 || echo "No listener found on 6400"

echo "=== Python probe with timing ==="
python3 <<'PY'
import socket, time
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: ["**"]
paths:
- Server/**
- MCPForUnity/Server~/**
- .github/workflows/python-tests.yml
workflow_dispatch: {}

Expand All @@ -22,17 +22,17 @@ jobs:
version: "latest"

- name: Set up Python
run: uv python install 3.10
run: uv python install 3.11

- name: Install dependencies
run: |
cd Server
cd MCPForUnity/Server~
uv sync
uv pip install -e ".[dev]"

- name: Run tests
run: |
cd Server
cd MCPForUnity/Server~
uv run pytest tests/ -v --tb=short

- name: Upload test results
Expand All @@ -41,5 +41,5 @@ jobs:
with:
name: pytest-results
path: |
Server/.pytest_cache/
Server/tests/
MCPForUnity/Server~/.pytest_cache/
MCPForUnity/Server~/tests/
Loading