-
Notifications
You must be signed in to change notification settings - Fork 672
feat: Add MCPB bundle for Claude Desktop installation #580
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
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)
Reviewer's GuideAdds a Model Context Protocol Bundle (MCPB) manifest and related packaging files so the Unity MCP server can be installed as a one-click bundle in Claude Desktop and other MCP hosts, using an uvx-based Python server entrypoint and enumerating all available tools. Sequence diagram for MCPB-based Unity MCP installation and launchsequenceDiagram
actor User
participant ClaudeDesktop
participant MCPBundle
participant MCPServerPython
participant PyPI
participant UnityEditor
User->>ClaudeDesktop: double_click unity_mcp_mcpb
ClaudeDesktop->>MCPBundle: read manifest_json
MCPBundle-->>ClaudeDesktop: server_config(type_python, entry_point, uvx_command)
ClaudeDesktop->>ClaudeDesktop: register tools_from_manifest
User->>ClaudeDesktop: select Unity_MCP_server
ClaudeDesktop->>MCPServerPython: launch uvx --from mcpforunityserver mcp_for_unity
MCPServerPython->>PyPI: download mcpforunityserver (if_needed)
PyPI-->>MCPServerPython: package_files
MCPServerPython->>UnityEditor: connect_via_Unity_MCP_plugin
UnityEditor-->>MCPServerPython: connection_ready
MCPServerPython-->>ClaudeDesktop: mcp_server_ready_with_29_tools
User->>ClaudeDesktop: invoke_tool manage_gameobject
ClaudeDesktop->>MCPServerPython: mcp_tool_request manage_gameobject
MCPServerPython->>UnityEditor: apply_gameobject_operation
UnityEditor-->>MCPServerPython: operation_result
MCPServerPython-->>ClaudeDesktop: tool_response
ClaudeDesktop-->>User: show_result
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Note Other AI code review bot(s) detectedCodeRabbit 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. 📝 WalkthroughWalkthroughAdds MCPB packaging support: a new Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer/Tag
participant GH as GitHub Actions (runner)
participant Gen as tools/generate_mcpb.py
participant NPX as npx (`@anthropic-ai/mcpb`)
participant Release as GitHub Release
Dev->>GH: push tag / trigger release workflow
GH->>GH: checkout tag\nsetup-node (v20)\nsetup-python (3.11)
GH->>Gen: run generate_mcpb.py --version <tag> --icon <icon>
Gen->>Gen: create build context\nwrite manifest.json\ncopy icon/LICENSE/README
Gen->>NPX: run `npx `@anthropic-ai/mcpb` pack` on build context
NPX-->>Gen: produce `unity-mcp-<version>.mcpb`
Gen-->>GH: return MCPB path
GH->>Release: upload `unity-mcp-<version>.mcpb`
Release-->>Dev: MCPB artifact available
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. Comment |
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.
Hey - I've found 1 issue, and left some high level feedback:
- The
server.entry_pointis set toServer/src/main.pywhile the actual launch is handled viauvxinmcp_config; if the entry point is unused for this server type, consider either aligning it with the real module or omitting it to avoid confusion for future maintainers. - The
.mcpbignorefile is currently empty; consider explicitly ignoring the generated.mcpbbundle and any build or tooling artifacts (e.g.,node_modules,.venv, caches) to keep bundles minimal and reproducible.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `server.entry_point` is set to `Server/src/main.py` while the actual launch is handled via `uvx` in `mcp_config`; if the entry point is unused for this server type, consider either aligning it with the real module or omitting it to avoid confusion for future maintainers.
- The `.mcpbignore` file is currently empty; consider explicitly ignoring the generated `.mcpb` bundle and any build or tooling artifacts (e.g., `node_modules`, `.venv`, caches) to keep bundles minimal and reproducible.
## Individual Comments
### Comment 1
<location> `manifest.json:20-23` </location>
<code_context>
+ "icon": "icon.png",
+ "server": {
+ "type": "python",
+ "entry_point": "Server/src/main.py",
+ "mcp_config": {
+ "command": "uvx",
+ "args": ["--from", "mcpforunityserver", "mcp-for-unity"],
+ "env": {}
+ }
</code_context>
<issue_to_address>
**issue (bug_risk):** Clarify whether the server should be launched via entry_point or mcp_config to avoid conflicting definitions.
The manifest defines both a Python `entry_point` and an `mcp_config` using `uvx`, which may cause different hosts to choose different startup paths. Decide which mechanism should be canonical and remove the other to avoid inconsistent behavior across MCP clients.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| "entry_point": "Server/src/main.py", | ||
| "mcp_config": { | ||
| "command": "uvx", | ||
| "args": ["--from", "mcpforunityserver", "mcp-for-unity"], |
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.
issue (bug_risk): Clarify whether the server should be launched via entry_point or mcp_config to avoid conflicting definitions.
The manifest defines both a Python entry_point and an mcp_config using uvx, which may cause different hosts to choose different startup paths. Decide which mechanism should be canonical and remove the other to avoid inconsistent behavior across MCP clients.
|
Thanks @triepod-ai, I might merge this in soon. We should also update |
|
Thinking a bit more, the bundle updates every version. I think this is better suited as a release artifact than something that lives and is updated in the repo. |
|
Hey @triepod-ai, can you change this so the MCPB is NOT added to the repo, but generated on each release? Something like this: release.yml: - name: Generate MCPB bundle
env:
NEW_VERSION: ${{ steps.compute.outputs.new_version }}
shell: bash
run: |
set -euo pipefail
python3 tools/generate_mcpb.py "$NEW_VERSION" \
--output "unity-mcp-${NEW_VERSION}.mcpb" \
--icon docs/images/coplay-logo.png
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.tag.outputs.tag }}
name: ${{ steps.tag.outputs.tag }}
generate_release_notes: true
files: |
unity-mcp-${{ steps.compute.outputs.new_version }}.mcpbDo you have a nice way to keep all the tools updated? |
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)
|
Thanks for the feedback @msanatan! You're right - having the bundle as a release artifact is much cleaner. I've updated the PR with the following changes: Changes Made
Regarding Tool SyncThe tools list in If you'd prefer automatic tool discovery, we could enhance the script to query the server's Let me know if you'd like any adjustments! |
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)
|
Tested the generate script locally - it works! Bundle installs and loads correctly in Claude Desktop (Windows). Ready for review when you have a chance. |
|
@msanatan I would encourage you to consider submitting it to the official anthropic directory (https://www.anthropic.com/engineering/desktop-extensions). |
|
Hi Bryan, we'll definitely put it in the directory! Separately, do you know if Anthropic has any grant programs that support open source projects with token credits? We use Claude code extensively to develop this project, and to make it Claude-friendly, and have spent thousands of dollars on tokens for it, much of it (like me) out of our own pockets. We'd love to count Anthropic as a supporter and collaborator in that way as we grow and reach people all over the world. Let me know if we could send a short proposal about it. Thanks! |
msanatan
left a comment
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.
Things to do post-merge:
- Auto update version of
manifest.json- Can improve version bump with a separate script
- Put a reminder in developer docs to update this when tools are updated
- I think we can probably do this by analyzing Python code, but I won't expend that effort right now
Summary
Adds Model Context Protocol Bundle (MCPB) support enabling single-click installation in Claude Desktop and other MCP hosts.
Changes
manifest.jsonwith uvx-based server configuration (downloads from PyPI)icon.png(Coplay avatar).mcpbignorefor build exclusionsunity-mcp.mcpbbundle for direct installationWhat is MCPB?
MCPB (MCP Bundle) is a packaging format that enables easy distribution of MCP servers. Similar to browser extensions (.crx) or VS Code extensions (.vsix), users can install the server with a single click.
Testing
mcpb validate)mcpb pack)Installation
Download the
unity-mcp.mcpbfile and double-click to install in Claude Desktop.Note: Requires the Unity MCP plugin installed in Unity Editor (see README for setup).
Building the Bundle
If you prefer to build from source:
npx @anthropic-ai/mcpb pack .🤖 Generated with Claude Code
Summary by Sourcery
Add MCP bundle metadata for the Unity MCP server to support installation via MCP hosts.
New Features:
Enhancements:
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.