Skip to content

feat: integrate unity-mcp (CoplayDev) into OCGS framework#63

Merged
striderZA merged 10 commits into
masterfrom
feat/unity-mcp-integration
Jun 15, 2026
Merged

feat: integrate unity-mcp (CoplayDev) into OCGS framework#63
striderZA merged 10 commits into
masterfrom
feat/unity-mcp-integration

Conversation

@striderZA

Copy link
Copy Markdown
Owner

Summary

Adds the CoplayDev unity-mcp server as a third MCP integration in OCGS, alongside the existing aseprite and godot MCPs. Mirrors the established patterns throughout.

  • MCP config: New mcp.unity block in opencode.json (HTTP, localhost:8080, disabled by default) — same opt-in shape as mcp.godot
  • Skill docs: New §7.4 in setup-engine/SKILL.md (root + core module copies, byte-identical) covering prerequisites, install, Editor-running constraint, manual config fallback, and troubleshooting
  • Agent references: All 5 unity specialists (unity-specialist + 4 sub-specialists) gain a ## MCP Integration section with domain-specific tool hints
  • Module version: engine-unity bumped 0.6.0 → 0.7.0
  • Changelog: New v0.4.0 — Unity MCP Integration section in UPGRADING.md

Transport choice

HTTP (http://localhost:8080/mcp), the upstream default. Unity MCP runs as a package inside Unity Editor, not as a standalone CLI, so it differs from the godot/aseprite command: [...] shape — this is a deliberate, documented divergence.

Test Plan

  • node tests/agents/validate.mjs → 182/182 PASS (51 agents, 77 skills, 53 commands, 1 cross-reference)
  • node .opencode/plugins/tests/test-*.mjs → 11/11 files, 129/129 scenarios PASS
  • opencode.json valid JSON
  • §7.4 unity-mcp content byte-identical between .opencode/skills/setup-engine/SKILL.md and .opencode/modules/core/skills/setup-engine/SKILL.md (modular framework invariant preserved)
  • All 5 unity specialists have ## MCP Integration section with identical closing clause
  • Pre-existing §7.4 (Build & Run Setup for SFML3/Raylib) renumbered to §7.5 in root monolith; no renumbering needed in core copy (SFML3/Raylib are optional modules absent from core)

Non-blocking follow-ups

Two spec-inherited tool-name nits surfaced during final review — fixable in a follow-up spec amendment, do not block merge:

  • manage_package (singular) → manage_packages (plural) in unity-addressables-specialist.md and setup-engine/SKILL.md §7.4 references
  • list_scenes in §7.4 "Verify" example isn't a documented tool; closest is manage_scene(action="get_active")

Notes

  • Spec and plan files in framework/docs/superpowers/ were created locally and intentionally NOT committed to this branch (treated as local-only working artifacts)
  • Per the implementation plan, an automated smoke-test skill for Unity is out of scope (Unity in batchmode is finicky); integration is interactive-dev only

striderZA added 10 commits June 15, 2026 20:15
Adds the unity MCP block to opencode.json pointing at
http://localhost:8080/mcp, the default endpoint of the CoplayDev
unity-mcp package running inside Unity Editor.

Mirrors the godot MCP pattern: disabled by default because the
server requires Unity Editor to be running. Users opt in via the
setup-engine skill §7.4 (added in the next task).
Documents the prerequisites (Unity 2021.3+, Python 3.10+, uv),
install steps (git URL via Package Manager), the Editor-running
constraint, manual opencode.json config fallback (the wizard may
not auto-configure OpenCode), and troubleshooting.
Adds the unity-mcp §7.4 to the core module copy of setup-engine.
The core copy is the slim baseline (no SFML3/Raylib content),
so no renumbering is needed — the SFML3/Raylib §7.4 from the
root monolith does not exist in core (those are optional modules).
Version bump reflects the new MCP capability added in 0.7.0.
Adds discoverability for the unity-mcp server in the parent
specialist. Mirrors the godot-specialist pattern.
Documents the new MCP capability for users upgrading. Version
bump v0.3.0 -> v0.4.0 reflects the additive unity-mcp feature.
@github-actions

Copy link
Copy Markdown
Contributor

PR Review: feat/unity-mcp-integration

Overall: Clean, well-structured PR. Follows established patterns consistently. The two tool-name nits are already acknowledged.

Issues

1. opencode.jsontype: "local" with url may not work (opencode.json:29-33)

"unity": {
  "type": "local",
  "url": "http://localhost:8080/mcp",
  "enabled": false
}

The existing MCPs (aseprite, godot) both use command: [...] (stdio protocol). This config uses url (HTTP) under type: "local". If OpenCode requires command for type: "local", this block will be silently ignored or error out. It may need "type": "remote" or separate handling.

The PR description calls this a "deliberate, documented divergence" but does not document where in OpenCode's schema type: "local" + url is valid. Could you confirm this works at runtime? If it does, consider adding a comment noting OpenCode supports HTTP MCP under type: "local" (future readers won't know).

2. manage_package should be manage_packages (acknowledged in PR)

.opencode/modules/engine-unity/agents/unity-addressables-specialist.md:169:

manage_package for Addressables package management

Upstream unity-mcp uses plural manage_packages. Same mismatch in setup-engine/SKILL.md §7.4 references.

3. list_scenes — not a documented unity-mcp tool (acknowledged in PR)

setup-engine/SKILL.md:731 (and core copy) uses list_scenes as the verify example. Closest documented tool is manage_scene(action="get_active").

Suggestions

4. pip install uv could be ambiguoussetup-engine/SKILL.md:692

install `uv` via `pip install uv` (or `winget install astral-sh.uv` on Windows)

pip install uv installs uv into the Python environment (e.g., .local/bin/), which may or may not be on PATH. The official install recommends:

curl -LsSf https://astral.sh/uv/install.sh | sh

Consider adding this as the primary option and pip install uv as the fallback.

5. Version in modulefile is semantic — no issues detected

0.6.0 → 0.7.0 is a correct minor bump for adding MCP integration documentation.

Verdict

Merge with minor follow-ups — no blockers. Fix the two tool-name nits (manage_packagemanage_packages, list_scenesmanage_scene) and verify whether type: "local" + url works against your OpenCode version before closing.

New%20session%20-%202026-06-15T19%3A10%3A19.486Z
opencode session  |  github run

@striderZA striderZA merged commit 1f1f018 into master Jun 15, 2026
5 checks passed
@striderZA striderZA deleted the feat/unity-mcp-integration branch June 15, 2026 19:13
striderZA added a commit that referenced this pull request Jun 15, 2026
Follow-up to PR #63. The README's Modular Framework table
listed the engine-unity module without its unity-mcp
integration; this adds a brief mention to match the
existing aseprite MCP mention in the art module row.
striderZA added a commit that referenced this pull request Jun 15, 2026
Follow-up to PR #63. setup-requirements.md gains a parallel
Unity-MCP section matching the existing Godot-MCP structure
(prerequisites, install steps, configuration, tool list).
quick-start.md gains a step 4b for Unity users parallel to
the existing godot-mcp step. skills-reference.md's
/automated-smoke-test description is accurate as a Godot-
specific skill (no Unity parallel exists).
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