Skip to content

Conversation

@msanatan
Copy link
Member

@msanatan msanatan commented Jan 23, 2026

Description

Type of Change

Save your change type

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Test update

Changes Made

Testing/Screenshots/Recordings

Documentation Updates

  • I have added/removed/modified tools or resources
  • If yes, I have updated all documentation files using:
    • The LLM prompt at tools/UPDATE_DOCS_PROMPT.md (recommended)
    • Manual updates following the guide at tools/UPDATE_DOCS.md

Related Issues

Additional Notes

Summary by Sourcery

Automate and harden the release workflow around the main and beta branches, centralize version management, and add support for publishing an MCP bundle artifact with updated documentation and metadata.

Enhancements:

  • Introduce a unified version update script and manifest to keep package, server, and documentation version references in sync.
  • Add scripts and configuration to generate and package a Model Context Protocol Bundle (.mcpb) for distribution.
  • Document the maintainer release process and how to keep tools/manifest and docs synchronized across the repo.

Build:

  • Refine the release GitHub Actions workflow to enforce running on main, use a temporary release branch and PR-based version bump, create annotated tags from merged main, synchronize main back into beta, and clean up temporary branches.
  • Add a new job to generate and upload an MCPB bundle to the GitHub release as part of the release pipeline.

Documentation:

  • Update development guides (EN/ZH) with instructions for updating tools, the manifest, and using the version update script.
  • Add a maintainer-focused releasing guide describing the main/beta flow, workflow behavior, and recovery steps.
  • Extend the pull request template to include a checklist for documentation updates related to tools/resources.
  • Add an LLM-oriented prompt file to standardize how documentation is updated after tool/resource changes.

Chores:

  • Add a manifest.json describing the Unity MCP bundle and a .mcpbignore file to support MCPB packaging.

bryankthompson and others added 6 commits January 22, 2026 15:46
* feat: Add MCPB bundle for Claude Desktop installation

Add Model Context Protocol Bundle (MCPB) support enabling single-click
installation in Claude Desktop and other MCP hosts.

Changes:
- Add manifest.json with uvx-based server configuration
- Add icon.png for display in Claude Desktop
- Add .mcpbignore for build exclusions
- Add pre-built unity-mcp.mcpb bundle

🤖 Generated with [Claude Code](https://claude.com/claude-code)

* fix: Generate MCPB as release artifact instead of committing to repo

Address review feedback from @msanatan:
- Remove pre-built unity-mcp.mcpb and icon.png from repository
- Add tools/generate_mcpb.py script for bundle generation
- Update release.yml with new publish_mcpb job that:
  - Generates bundle using generate_mcpb.py
  - Uploads MCPB file as release artifact
- Update manifest.json to reference icon from docs/images/

The bundle is now generated automatically on each release,
keeping the repository clean while providing download artifacts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

* fix: Use correct mcpb pack CLI syntax (positional args)

The mcpb CLI uses 'mcpb pack [directory] [output]' syntax,
not '--output' flag. Tested locally - bundle generates correctly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: triepod-ai <199543909+triepod-ai@users.noreply.github.com>
Replace inline sed/jq commands in release workflow with tools/update_versions.py script that:
- Updates MCPForUnity/package.json, manifest.json, Server/pyproject.toml
- Updates version references in Server/README.md, README.md, docs/i18n/README-zh.md
- Supports --dry-run and --version flags
- Auto-detects version from package.json if not specified
- Provides better error handling and progress output
Add comprehensive documentation for the version update process in both English and Chinese development guides:
- Document manifest.json and package.json version synchronization during releases
- Explain update_versions.py script usage with examples (default, --version, --dry-run)
- List all files updated by the script (package.json, manifest.json, pyproject.toml, READMEs)
- Provide guidance on manual tool updates outside release
Add automated documentation update workflow to ensure consistency when tools/resources change:
- Add UPDATE_DOCS_PROMPT.md with copy-paste LLM prompt that:
  - Instructs LLM to scan Server/src/services/tools/ and resources/ for decorators
  - Updates manifest.json tools array, README.md tools/resources sections, README-zh.md
  - Enforces alphabetical ordering and formatting rules (backticks, bullets)
  - References check_docs_sync.py for
* feat: add release workflow concurrency control and main-to-beta sync

Add safeguards to prevent concurrent releases and ensure beta stays in sync:
- Add concurrency group to prevent overlapping release runs
- Enforce workflow runs only on main branch (fail if run elsewhere)
- Explicitly checkout and push to main (not dynamic branch)
- Fail if release tag already exists (was silently skipping)
- Add sync_beta job that merges main back into beta after release
- Add docs/guides/RELEASING.md with two

* feat: use PRs for version bumps and beta sync instead of direct pushes

For release notes to work we need for PRs from beta to main to not be squashed. We also want to enforce all changes to be via PRs, for humans. But that also limits GH Actions.

An alternative is creating a GH App with bypass permissions but that felt like overkill

Replace direct pushes to main/beta with PR-based workflow for better branch protection compatibility:
- Create temporary release/vX.Y.Z branch for version bump
- Open PR from release branch into main, enable auto-merge
- Poll for PR merge completion (up to 2 minutes) before creating tag
- Fetch merged main and create tag on merged commit
- Clean up release branch after tag creation
- Create PR to merge main into beta (skip if already
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 23, 2026

Reviewer's Guide

Refactors the release workflow to enforce running on main, centralizes version bumping via a new update_versions.py script, introduces automated PR-based merging and branch syncing between main and beta, publishes a new MCPB bundle artifact, and adds documentation/templates to support the new release and tooling workflow.

Sequence diagram for the new release workflow and branch sync

sequenceDiagram
    actor Maintainer
    participant GitHubActions as GitHub_Actions
    participant BumpJob as Job_bump
    participant SyncBetaJob as Job_sync_beta
    participant PublishDocker as Job_publish_docker
    participant PublishPyPI as Job_publish_pypi
    participant PublishMCPB as Job_publish_mcpb
    participant GitHubPR as GitHub_PRs
    participant GitBranches as Git_branches_and_tags
    participant GitHubRelease as GitHub_Releases

    Maintainer->>GitHubActions: Manually trigger Release workflow on branch main
    GitHubActions->>BumpJob: Start bump job

    BumpJob->>GitBranches: Check GITHUB_REF_NAME is main
    BumpJob->>GitBranches: Checkout main
    BumpJob->>BumpJob: Compute new_version and tag
    BumpJob->>BumpJob: Run update_versions.py with new_version
    BumpJob->>GitBranches: Create branch release/vX.Y.Z with version bump commit
    BumpJob->>GitBranches: Push release/vX.Y.Z to origin

    BumpJob->>GitHubPR: Create PR head=release/vX.Y.Z base=main
    BumpJob->>GitHubPR: Enable auto merge for bump PR
    GitHubPR-->>BumpJob: PR merged (after checks) or merge attempted directly

    BumpJob->>GitBranches: Fetch and checkout merged main
    BumpJob->>GitBranches: Create annotated tag vX.Y.Z on main
    BumpJob->>GitBranches: Push tag vX.Y.Z
    BumpJob->>GitBranches: Delete release/vX.Y.Z branch on origin (cleanup)

    BumpJob->>GitHubRelease: Create GitHub Release for vX.Y.Z

    BumpJob-->>SyncBetaJob: Output new_version and tag
    BumpJob-->>PublishDocker: Output tag
    BumpJob-->>PublishPyPI: Output tag
    BumpJob-->>PublishMCPB: Output new_version and tag

    GitHubActions->>SyncBetaJob: Start sync_beta job (needs bump)
    SyncBetaJob->>GitBranches: Fetch main and beta
    SyncBetaJob->>SyncBetaJob: Check if beta is behind main
    alt beta is behind main
        SyncBetaJob->>GitHubPR: Create PR head=main base=beta
        SyncBetaJob->>GitHubPR: Enable auto merge
        GitHubPR-->>SyncBetaJob: Sync PR merged or merged directly
    else beta up to date
        SyncBetaJob-->>GitHubActions: Skip sync PR
    end

    GitHubActions->>PublishDocker: Start publish_docker job (needs bump)
    PublishDocker->>GitBranches: Checkout tag vX.Y.Z
    PublishDocker->>PublishDocker: Build and push Docker image

    GitHubActions->>PublishPyPI: Start publish_pypi job (needs bump)
    PublishPyPI->>GitBranches: Checkout tag vX.Y.Z
    PublishPyPI->>PublishPyPI: Build and upload package to PyPI

    GitHubActions->>PublishMCPB: Start publish_mcpb job (needs bump)
    PublishMCPB->>GitBranches: Checkout tag vX.Y.Z
    PublishMCPB->>PublishMCPB: Generate unity-mcp-X.Y.Z.mcpb
    PublishMCPB->>GitHubRelease: Attach .mcpb file to release vX.Y.Z
Loading

Class diagram for new tooling scripts update_versions.py and generate_mcpb.py

classDiagram
    class UpdateVersionsScript {
        +Path REPO_ROOT
        +Path PACKAGE_JSON
        +Path MANIFEST_JSON
        +Path PYPROJECT_TOML
        +Path SERVER_README
        +Path ROOT_README
        +Path ZH_README
        +str load_package_version()
        +bool update_package_json(new_version, dry_run)
        +bool update_manifest_json(new_version, dry_run)
        +bool update_pyproject_toml(new_version, dry_run)
        +bool update_server_readme(new_version, dry_run)
        +bool update_root_readme(new_version, dry_run)
        +bool update_zh_readme(new_version, dry_run)
        +int main()
    }

    class GenerateMcpbScript {
        +Path REPO_ROOT
        +Path DEFAULT_ICON
        +Path MANIFEST_TEMPLATE
        +dict create_manifest(version, icon_filename)
        +Path generate_mcpb(version, output_path, icon_path)
        +int main()
    }

    class ManifestJson {
        +string manifest_version
        +string name
        +string version
        +string description
        +string icon
        +object author
        +object repository
        +object server
        +ToolEntry[] tools
    }

    class ToolEntry {
        +string name
        +string description
    }

    UpdateVersionsScript --> ManifestJson : synchronizes_version
    GenerateMcpbScript --> ManifestJson : reads_template_and_embeds
    ManifestJson "1" o-- "many" ToolEntry : contains
Loading

Flow diagram for bump job logic in the release workflow

flowchart TD
    A["Start bump job"] --> B["Check GITHUB_REF_NAME == main"]
    B -->|No| Z["Fail: workflow must run on main"]
    B -->|Yes| C["Checkout main with fetch-depth 0"]
    C --> D["Compute new_version and tag from inputs"]
    D --> E["Run python3 tools/update_versions.py --version new_version"]
    E --> F["Create branch name release/vX.Y.Z"]
    F --> G["Configure git user"]
    G --> H["Checkout new branch release/vX.Y.Z"]
    H --> I["git add versioned files including manifest.json"]
    I --> J{Any staged changes?}
    J -->|No| K["Log 'No version changes to commit'"]
    J -->|Yes| L["Commit 'chore: bump version to new_version'"]
    K --> M
    L --> M["Push branch release/vX.Y.Z to origin"]

    M --> N["Create PR head=release/vX.Y.Z base=main"]
    N --> O["Enable auto-merge on PR"]
    O --> P["Poll PR state up to timeout"]
    P --> Q{PR merged?}
    Q -->|Yes| R["Proceed to tagging"]
    Q -->|No| S["Attempt direct merge via gh pr merge"]
    S --> R

    R --> T["git fetch origin main"]
    T --> U["git checkout main"]
    U --> V["git pull origin main"]
    V --> W{Does tag already exist on remote?}
    W -->|Yes| X["Fail: tag already exists, refuse to release"]
    W -->|No| Y["Create annotated tag and push to origin"]
    Y --> AA["Create GitHub release for tag"]
    AA --> AB["Delete remote branch release/vX.Y.Z (best-effort)"]
    AB --> AC["End bump job"]
Loading

File-Level Changes

Change Details Files
Refactor release workflow to be main-only, PR-based, and branch-protection friendly while centralizing version bumping and adding MCPB publishing.
  • Add workflow concurrency group to prevent overlapping release runs.
  • Enforce that the release workflow runs only on the main branch and explicitly check out main.
  • Replace inline sed/jq version edits with a call to tools/update_versions.py.
  • Commit version changes to a temporary release/vX.Y.Z branch and open an auto-merged PR into main using gh CLI.
  • After merge, fetch updated main, create and push annotated tag, and fail if the tag already exists.
  • Add cleanup of the temporary release branch even on failures.
  • Add sync_beta job to open and auto-merge a PR from main back into beta when beta is behind main.
  • Add publish_mcpb job to build and upload a .mcpb bundle artifact for the release tag.
.github/workflows/release.yml
Introduce reusable tooling for version synchronization and MCPB bundle generation.
  • Add update_versions.py to compute and propagate version numbers across package.json, manifest.json, pyproject.toml, and README files with dry-run support.
  • Add generate_mcpb.py to build an MCPB bundle using manifest.json, icon, LICENSE, and README via the @anthropic-ai/mcpb CLI.
  • Add a root manifest.json describing the MCP server, entrypoint, and full tool list used by MCPB generation and docs.
tools/update_versions.py
tools/generate_mcpb.py
manifest.json
Document the new release process, tooling, and docs-update workflow, and extend the PR template accordingly.
  • Add RELEASING.md guide describing the beta→main promotion flow, release workflow behavior, repo settings, and failure recovery.
  • Update English and Chinese dev docs to explain how tools/manifest are versioned and how to use update_versions.py.
  • Add UPDATE_DOCS_PROMPT.md with an LLM prompt for keeping manifest and docs in sync after tool/resource changes.
  • Extend the pull request template with a documentation-updates checklist referencing the new docs tools.
docs/guides/RELEASING.md
docs/development/README-DEV.md
docs/development/README-DEV-zh.md
tools/UPDATE_DOCS_PROMPT.md
.github/pull_request_template.md
Add configuration files for MCPB packaging behavior.
  • Add a .mcpbignore file at the repo root (contents not shown in diff) to control which files are included in MCPB bundles.
.mcpbignore

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 Jan 23, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

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.


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:

  • In tools/update_versions.py, the --update-package argument is declared but never used, and the actual behavior is to always update MCPForUnity/package.json when --version is provided; either wire the flag into the logic or remove/adjust it and the help text to avoid confusing consumers of the script.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `tools/update_versions.py`, the `--update-package` argument is declared but never used, and the actual behavior is to always update `MCPForUnity/package.json` when `--version` is provided; either wire the flag into the logic or remove/adjust it and the help text to avoid confusing consumers of the script.

## Individual Comments

### Comment 1
<location> `.github/pull_request_template.md:22-23` </location>
<code_context>


+## Documentation Updates
+<!-- Check if you updated documentation for tools/resources changes -->
+- [ ] I have added/removed/modified tools or resources
+- [ ] If yes, I have updated all documentation files using:
</code_context>

<issue_to_address>
**suggestion (typo):** Rephrase this sentence for clearer grammar

Suggest rephrasing to: "Check if you updated documentation for tool/resource changes" or "for changes to tools/resources," as "for tools/resources changes" is a bit awkward grammatically.

```suggestion
## Documentation Updates
<!-- Check if you updated documentation for changes to tools/resources -->
```
</issue_to_address>

### Comment 2
<location> `tools/UPDATE_DOCS_PROMPT.md:7-8` </location>
<code_context>
+## Example Usage
+
+After adding a new tool called "manage_new_feature" and a new resource called "feature_resource", you would:
+1. Copy the prompt above
+2. Paste it into your LLM
+3. The LLM will analyze the codebase and update all documentation files
</code_context>

<issue_to_address>
**suggestion (typo):** “Copy the prompt above” may be misleading since the prompt is defined below

Here you reference “the prompt above,” but the actual prompt text appears later under the `## Prompt` heading. To reduce confusion, please update this wording (e.g., “Copy the prompt below” or “Copy the prompt in the section below”).

```suggestion
After adding a new tool called "manage_new_feature" and a new resource called "feature_resource", you would:
1. Copy the prompt in the section below
```
</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.

@dsarno
Copy link
Collaborator

dsarno commented Jan 23, 2026

@msanatan Do you want to tell people in the main README that they can grab the beta if they use its branch URL when pulling the package?

@msanatan
Copy link
Member Author

@msanatan Do you want to tell people in the main README that they can grab the beta if they use its branch URL when pulling the package?

Good question! Why not, we give them an example of installing a fixed version, so we can tell them how to install the beta version

@dsarno
Copy link
Collaborator

dsarno commented Jan 23, 2026

@msanatan Do you want to tell people in the main README that they can grab the beta if they use its branch URL when pulling the package?

Good question! Why not, we give them an example of installing a fixed version, so we can tell them how to install the beta version

Yes and I think we can get rid of the fixed version idea too. Main is the fixed / stable version. So stable is default but beta is de fun.

…branch

Remove version-specific installation examples from README.md and README-zh.md, replacing with beta branch references. Update release workflow and update_versions.py to stop modifying README files during version bumps since they no longer contain version-specific URLs.
@msanatan msanatan merged commit 5acef27 into main Jan 23, 2026
2 checks passed
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.

4 participants