Skip to content

Conversation

@msanatan
Copy link
Contributor

@msanatan msanatan commented Dec 19, 2025

An optional action to update DockerHub

Again, just more options for developers: https://hub.docker.com/r/msanatan/mcp-for-unity-server

Users can get the MCP server via uvx, pypi, and now through Docker

Summary by Sourcery

Add optional Docker Hub publishing workflow and Docker usage docs while simplifying Python package publishing.

New Features:

  • Introduce a manual GitHub Actions workflow to build and publish the server Docker image to Docker Hub.
  • Add Docker usage documentation for running the MCP for Unity server container.

Enhancements:

  • Simplify the PyPI publishing workflow by removing the TestPyPI publish job.

Summary by CodeRabbit

  • New Features

    • Docker image now available for the MCP for Unity Server.
  • Documentation

    • Added Docker overview guide with quick start instructions, environment variables, and configuration examples.

✏️ Tip: You can customize this high-level summary in your review settings.

Removes the publish-to-testpypi job from the GitHub Actions workflow to streamline the publishing process and only publish to production PyPI.
@msanatan msanatan self-assigned this Dec 19, 2025
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 19, 2025

Reviewer's Guide

Adds a manual GitHub Actions workflow to build and publish a Docker image for the MCP for Unity server to Docker Hub, documents how to use the Docker image, and simplifies the existing Python publishing workflow by removing the TestPyPI job.

Sequence diagram for manual Docker publish workflow

sequenceDiagram
  actor Developer
  participant GitHubRepo
  participant WorkflowPublishDocker
  participant GitHubActionsRunner as GitHub_Actions_Runner
  participant DockerHub

  Developer->>GitHubRepo: Push tags or changes (optional)
  Developer->>WorkflowPublishDocker: Trigger workflow_dispatch

  WorkflowPublishDocker->>GitHubActionsRunner: Start job push_to_registry

  GitHubActionsRunner->>GitHubRepo: actions/checkout@v6
  GitHubRepo-->>GitHubActionsRunner: Source code (including Server/Dockerfile)

  GitHubActionsRunner->>DockerHub: docker/login-action@v3 using secrets
  DockerHub-->>GitHubActionsRunner: Authenticated session

  GitHubActionsRunner->>GitHubActionsRunner: docker/metadata-action@v5
  GitHubActionsRunner-->>GitHubActionsRunner: tags and labels (semver, branch, sha)

  GitHubActionsRunner->>GitHubActionsRunner: docker/setup-buildx-action@v3

  GitHubActionsRunner->>DockerHub: docker/build-push-action@v6
  activate DockerHub
  DockerHub-->>GitHubActionsRunner: Image mcp-for-unity-server stored with tags
  deactivate DockerHub

  GitHubActionsRunner-->>Developer: Job success, Docker image available
Loading

File-Level Changes

Change Details Files
Simplified the PyPI publishing workflow to only publish to the main PyPI index and removed TestPyPI support.
  • Renamed the workflow to indicate it now only publishes to PyPI, not TestPyPI.
  • Deleted the separate job that downloaded built distributions and published them to TestPyPI using trusted publishing and a custom repository URL.
.github/workflows/publish-pypi.yml
Documented usage of the MCP for Unity server Docker image for end users.
  • Added a Docker overview document explaining how to pull and run the Docker image, configure MCP clients, set environment variables, and find full documentation and licensing information.
  • Included example prompts to demonstrate typical usage once the server is connected to Unity.
Server/DOCKER_OVERVIEW.md
Introduced a GitHub Actions workflow to build and publish the MCP for Unity server Docker image to Docker Hub on manual trigger.
  • Created a workflow that logs into Docker Hub using repository secrets and builds the Docker image from Server/Dockerfile using Docker Buildx.
  • Configured docker/metadata-action to derive tags from semantic versions, branches, and commit SHA, and applied these tags and labels when pushing the image to Docker Hub.
.github/workflows/publish-docker.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 19, 2025

Warning

Rate limit exceeded

@msanatan has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 27 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 0e7a64c and f119c93.

📒 Files selected for processing (3)
  • .github/workflows/publish-docker.yml (1 hunks)
  • .github/workflows/publish-pypi.yml (1 hunks)
  • Server/DOCKER_OVERVIEW.md (1 hunks)

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Introduces a new GitHub Actions workflow for publishing Docker images to Docker Hub, removes TestPyPI publishing from the existing PyPI workflow, and adds documentation for the Docker image quick start and configuration.

Changes

Cohort / File(s) Summary
CI/CD Workflows
.github/workflows/publish-docker.yml, .github/workflows/publish-pypi.yml
New Docker image publishing workflow to Docker Hub with metadata extraction and automated builds; simplified PyPI workflow by removing TestPyPI job and related steps.
Documentation
Server/DOCKER_OVERVIEW.md
New Docker overview guide with quick start instructions, environment variables, configuration examples, and integration links.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • .github/workflows/publish-docker.yml follows standard GitHub Actions patterns but involves Docker Hub integration, secrets, and metadata generation—worth verifying configuration accuracy
  • .github/workflows/publish-pypi.yml is a straightforward removal of the TestPyPI job; verify no unintended dependencies remain
  • Server/DOCKER_OVERVIEW.md is documentation; check for completeness and accuracy of examples

Poem

🐰 A Docker dream, wrapped tight and neat,
🐳 CI pipelines make the release complete,
📦 No TestPyPI detours today,
🚀 Just push to Hub the hoppy way!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Publish to Docker Hub' directly and clearly summarizes the main change: adding Docker Hub publishing capability. The changes center on the new publish-docker.yml workflow, Docker documentation, and PyPI workflow cleanup, all supporting the Docker Hub distribution objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 2 issues, and left some high level feedback:

  • The Docker workflow uses ${{ secrets.DOCKER_USERNAME }}/mcp-for-unity-server while the README hard-codes msanatan/mcp-for-unity-server; consider aligning these (or clearly documenting the expected Docker Hub namespace) so the published image name always matches the instructions.
  • In .github/workflows/publish-docker.yml, the packages: write permission appears unused since the workflow only interacts with Docker Hub; you can likely drop it to keep permissions minimal.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The Docker workflow uses `${{ secrets.DOCKER_USERNAME }}/mcp-for-unity-server` while the README hard-codes `msanatan/mcp-for-unity-server`; consider aligning these (or clearly documenting the expected Docker Hub namespace) so the published image name always matches the instructions.
- In `.github/workflows/publish-docker.yml`, the `packages: write` permission appears unused since the workflow only interacts with Docker Hub; you can likely drop it to keep permissions minimal.

## Individual Comments

### Comment 1
<location> `.github/workflows/publish-docker.yml:10-14` </location>
<code_context>
+  push_to_registry:
+    name: Push Docker image to Docker Hub
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      packages: write
+
+    steps:
</code_context>

<issue_to_address>
**🚨 suggestion (security):** The `packages: write` permission appears unnecessary for pushing directly to Docker Hub.

Since this job only logs in to Docker Hub and doesn’t touch GitHub Packages, `packages: write` is redundant. Consider removing it—or the whole `permissions` block if nothing needs elevation—to follow least-privilege best practices.

```suggestion
    steps:
```
</issue_to_address>

### Comment 2
<location> `Server/DOCKER_OVERVIEW.md:51` </location>
<code_context>
+
+## Configuration
+
+The server connects to Unity Editor automatically when both are running. No additional configuration needed.
+
+**Environment Variables:**
</code_context>

<issue_to_address>
**nitpick (typo):** Consider making the sentence more grammatically complete.

For example: "The server connects to the Unity Editor automatically when both are running. No additional configuration is needed." Adding "the" and "is" is optional but improves readability.

```suggestion
The server connects to the Unity Editor automatically when both are running. No additional configuration is needed.
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/publish-docker.yml (1)

38-45: Consider enabling Docker layer caching for faster builds.

Docker layer caching can significantly speed up subsequent builds by reusing unchanged layers.

🔎 Proposed enhancement to enable layer caching
       - name: Build and push Docker image
         uses: docker/build-push-action@v6
         with:
           context: .
           file: Server/Dockerfile
           push: true
           tags: ${{ steps.meta.outputs.tags }}
           labels: ${{ steps.meta.outputs.labels }}
+          cache-from: type=gha
+          cache-to: type=gha,mode=max

This uses GitHub Actions cache to store and reuse Docker layers between builds.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 12e1b62 and 0e7a64c.

📒 Files selected for processing (3)
  • .github/workflows/publish-docker.yml (1 hunks)
  • .github/workflows/publish-pypi.yml (1 hunks)
  • Server/DOCKER_OVERVIEW.md (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Sourcery review
🔇 Additional comments (3)
.github/workflows/publish-pypi.yml (1)

1-52: LGTM! Workflow simplification is clean.

The removal of TestPyPI publishing streamlines the workflow appropriately. The remaining PyPI publishing job is correctly configured with proper gating (startsWith(github.ref, 'refs/tags/')), environment, and permissions.

Server/DOCKER_OVERVIEW.md (2)

66-88: Well-structured documentation with helpful examples.

The example prompts and documentation links provide clear guidance for users getting started with the Docker image.


55-56: Remove or fix the LOG_LEVEL environment variable documentation—it is not implemented in the server code.

The DISABLE_TELEMETRY variable is correctly implemented and supported (Server/src/core/telemetry.py:189-191). However, LOG_LEVEL=DEBUG is documented but not implemented. The server has a hardcoded log level default of "INFO" in config.py with no environment variable override. Either implement LOG_LEVEL support or remove it from the documentation.

Likely an incorrect or invalid review comment.

msanatan and others added 6 commits December 19, 2025 17:08
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
it should be Ubuntu's default but just in case
@msanatan
Copy link
Contributor Author

So many AI comments for a simple PR lol. They're very useful though. Let's go Docker Hub!

@msanatan msanatan merged commit edd40ec into CoplayDev:main Dec 19, 2025
2 checks passed
@msanatan msanatan deleted the docker-hub branch December 19, 2025 21:24
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.

1 participant