mcp-source
Original:🇺🇸 English
Translated
Switch MCP for Unity package source in connected Unity projects. Use /mcp-source [main|beta|branch|local] to swap between upstream releases, your remote branch, or local dev checkout.
2installs
Sourcecoplaydev/unity-mcp
Added on
NPX Install
npx skill4agent add coplaydev/unity-mcp mcp-sourceTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Switch MCP for Unity Package Source
You are switching the package source in one or more Unity projects.
com.coplaydev.unity-mcpallowed-tools
Bash, Read, Edit, ReadMcpResourceTool, ListMcpResourcesTool
Instructions
1. Parse arguments
The user's argument is:
$ARGUMENTSValid values: , , , , or empty.
mainbetabranchlocalIf empty or not one of the four valid values, ask the user to choose:
- main — upstream main branch (stable releases)
- beta — upstream beta branch (pre-release)
- branch — your current remote branch (for testing a PR)
- local — local file reference to your checkout (for live dev iteration)
2. Detect repo context
Run these git commands from the current working directory to find the unity-mcp repo:
bash
git rev-parse --show-toplevel # → repo_root
git rev-parse --abbrev-ref HEAD # → branch_name
git remote get-url origin # → origin_urlConvert SSH origins to HTTPS: if starts with , transform it to .
origin_urlgit@github.com:https://github.com/{owner}/{repo}.git3. Discover target Unity projects
Try two approaches to find files to update:
Packages/manifest.jsonApproach A — MCP resources (preferred):
Read for each connected Unity instance (use to find available instances). Extract and use .
mcpforunity://project/infoListMcpResourcesToolprojectRoot{projectRoot}/Packages/manifest.jsonApproach B — filesystem fallback:
If no MCP instances are connected, search upward from the current working directory for files using Bash:
Packages/manifest.jsonbash
find "$(pwd)" -maxdepth 3 -name "manifest.json" -path "*/Packages/manifest.json" 2>/dev/nullIf multiple manifests are found, update all of them (confirming with the user first).
4. Build the package URL
Based on the user's selection, construct the dependency value:
| Selection | URL |
|---|---|
| |
| |
| |
| |
For : use the HTTPS-normalized origin URL and current git branch name.
For : use the absolute path to the repo root with prefix (no ), e.g. .
branchlocalfile://file:/Users/davidsarno/unity-mcp/MCPForUnity5. Update each manifest
For each discovered :
manifest.json- Read the file with the Read tool
- Find the dependency line
"com.coplaydev.unity-mcp" - Use the Edit tool to replace the old value with the new URL
- Report what was changed: old value → new value, file path
6. Report results
After updating, tell the user:
- Which manifests were updated
- The old and new package source values
- Remind them: "Unity will re-resolve the package automatically. If it doesn't, open Package Manager and click Refresh."