-
Notifications
You must be signed in to change notification settings - Fork 0
CI: add Unity MCP smoke workflow (single tool call to verify server) #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds a new GitHub Actions workflow (unity-mcp-smoke.yml) to run a Unity MCP smoke test via a Claude-based action. It conditionally installs UnityMcpServer, generates a one-shot prompt, launches the MCP server in stdio mode with uv, restricts tool access to mcp__unity__list_resources, and reports results within a 5-minute job timeout. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant GH as GitHub Actions
participant Runner as ubuntu-latest Runner
participant uv as uv (Python Env)
participant MCP as Unity MCP Server (server.py)
participant Claude as Claude Code Action
GH->>Runner: Start workflow_dispatch job
Runner->>Runner: Checkout repository
Runner->>uv: Setup Python 3.11 via astral-sh/setup-uv
alt UnityMcpServer present
Runner->>uv: uv venv && expose VIRTUAL_ENV/PATH
Runner->>uv: Install UnityMcpServer (editable)
else Not present
Note over Runner: Skip editable install
end
Runner->>Runner: Write .claude/prompts/mcp-smoke.md
Runner->>Claude: Run anthropics/claude-code-base-action@beta
Claude->>MCP: Launch via uv, stdio (PYTHONUNBUFFERED=1, MCP_LOG_LEVEL=debug)
Claude->>MCP: Call tool mcp__unity__list_resources with JSON input
MCP-->>Claude: Tool result or validation error
Claude-->>Runner: Print raw result or exception info
Runner-->>GH: Job completes (<=5 min)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR adds a GitHub Actions workflow for smoke testing the Unity MCP server. The workflow is designed to perform a minimal integration test by calling a single MCP tool (mcp__unity__list_resources) through the Anthropic Claude Code Base Action to verify the server can start and respond correctly.
The workflow includes several key components: Python/uv environment setup, conditional Unity MCP server installation, smoke test prompt creation, and execution via Claude's codebase action. It's configured with a 5-minute timeout and manual trigger (workflow_dispatch) to provide quick feedback for basic integration issues.
However, the workflow references Python server components that don't exist in the repository. The Unity MCP project appears to be primarily a C# bridge for Unity Editor integration, not a standalone Python MCP server. The workflow assumes the existence of UnityMcpBridge/UnityMcpServer~/src/pyproject.toml and UnityMcpBridge/UnityMcpServer~/src/server.py, but the repository structure only contains Unity C# bridge components in the UnityMcpBridge/ directory.
Important Files Changed
Files Changed
| Filename | Score | Overview |
|---|---|---|
.github/workflows/unity-mcp-smoke.yml |
1/5 | Adds smoke test workflow that references non-existent Python server paths |
Confidence score: 1/5
- This PR will definitely fail when executed due to incorrect file paths and missing Python server components
- Score reflects critical path issues that make the workflow non-functional in the current repository structure
- Pay close attention to
.github/workflows/unity-mcp-smoke.ymlwhich needs significant corrections to work with the actual codebase architecture
Sequence Diagram
sequenceDiagram
participant User
participant GHA as "GitHub Actions"
participant Ubuntu as "Ubuntu Runner"
participant Python as "Python/uv"
participant MCPServer as "Unity MCP Server"
participant Claude as "Claude AI"
User->>GHA: "Trigger workflow_dispatch"
GHA->>Ubuntu: "Start ubuntu-latest runner"
Ubuntu->>GHA: "Checkout repository"
Ubuntu->>Python: "Install Python 3.11 + uv"
Python->>Ubuntu: "Installation complete"
Ubuntu->>Python: "Create venv and install UnityMcpServer (editable)"
Python->>Ubuntu: "Server installed in editable mode"
Ubuntu->>Ubuntu: "Create .claude/prompts/mcp-smoke.md"
Note over Ubuntu: Smoke test prompt with specific tool call instructions
Ubuntu->>Claude: "Run claude-code-base-action with mcp-smoke.md"
Claude->>MCPServer: "Start Unity MCP server via uv run"
MCPServer->>Claude: "Server ready (stdio transport)"
Claude->>MCPServer: "Call mcp__unity__list_resources with ctx={}, under='ClaudeTests', pattern='*.cs'"
MCPServer->>MCPServer: "Process list_resources request"
MCPServer->>Claude: "Return resource list or validation error"
Claude->>Ubuntu: "Print raw tool result to console"
Ubuntu->>GHA: "Workflow complete with results"
GHA->>User: "Smoke test results"
1 file reviewed, 2 comments
| - name: Install UnityMcpServer (editable) | ||
| run: | | ||
| set -eux | ||
| if [ -f "UnityMcpBridge/UnityMcpServer~/src/pyproject.toml" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: This path UnityMcpBridge/UnityMcpServer~/src/pyproject.toml doesn't exist in the repository. The conditional will always be false.
| "UnityMcpBridge/UnityMcpServer~/src", | ||
| "python", | ||
| "server.py" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: The directory UnityMcpBridge/UnityMcpServer~/src and file server.py don't exist in the repository, causing the MCP server startup to fail.
Summary by CodeRabbit