Skip to content

Conversation

@dsarno
Copy link
Owner

@dsarno dsarno commented Aug 20, 2025

Summary by CodeRabbit

  • Tests
    • Added an automated end-to-end smoke test to verify the Unity MCP server starts and responds to a basic resource-listing request, with strict tool permissions and short timeouts.
  • Chores
    • Introduced an on-demand CI workflow to run the Unity MCP smoke test, improving early detection of integration issues and overall reliability.

@coderabbitai
Copy link

coderabbitai bot commented Aug 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds 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

Cohort / File(s) Summary of Changes
CI Workflow: Unity MCP smoke test
.github/workflows/unity-mcp-smoke.yml
Introduces a workflow_dispatch job on ubuntu-latest with 5m timeout. Checks out repo; installs Python 3.11 via uv; conditionally installs UnityMcpServer in editable mode from UnityMcpBridge/UnityMcpServer~/src; writes a prompt to .claude/prompts/mcp-smoke.md; runs anthropics/claude-code-base-action@beta to start the MCP server (uv, stdio) and invoke mcp__unity__list_resources with strict tool permissions and 3m action timeout.

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)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I twitch my ears at CI’s glow,
A smoke test hops—then off we go!
uv warms the Python burrow,
MCP squeaks back, clear as a sparrow.
One tool, one call, results in sight—
Carrots for logs, all green tonight. 🥕✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9071f46 and ea86480.

📒 Files selected for processing (1)
  • .github/workflows/unity-mcp-smoke.yml (1 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/add-smoke-workflow

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dsarno dsarno merged commit 682c60e into main Aug 20, 2025
1 of 2 checks passed
Copy link

@greptile-apps greptile-apps bot left a 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.yml which 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"
Loading

1 file reviewed, 2 comments

Edit Code Review Bot Settings | Greptile

- name: Install UnityMcpServer (editable)
run: |
set -eux
if [ -f "UnityMcpBridge/UnityMcpServer~/src/pyproject.toml" ]; then
Copy link

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.

Comment on lines +68 to +70
"UnityMcpBridge/UnityMcpServer~/src",
"python",
"server.py"
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants