dsh-unity-mcp-bridge: On-Demand DSH Workflow Plugin for Unity MCP Connection

Introduction

When using agents in DSH to assist Unity development, the common practice is to connect to the Unity-side MCP server (AI Game Developer / com.ivanmurzak.unity.mcp). If the official MCP client remains connected, the JSON Schema of Unity tools will occupy context long-term. If you manually modify @deepseek-ai/dsh-mcp-client in the npx cache, DSH upgrades may wipe out your patches. The following introduces the community plugin dsh-unity-mcp-bridge (maintainer xiake-1), which connects Unity MCP to DSH in a “dormant by default, activate on demand” manner, and comes with installation check skills and command catalogs. It belongs to the “Workflow” category plugin on SkillHub.

What is this

dsh-unity-mcp-bridge is a standalone DSH npm plugin package (current version 0.3.3, MIT license) that bridges between DSH and Unity MCP. Unity capabilities do not activate on their own: they will only connect and register mcp__unity__* tools after the user executes /unity-mcp-tools. Sessions that don’t touch Unity will only have 2 additional hook tools (documented as ~224 tokens).

Plugin directory page: SkillHub — xiake-1/dsh-unity-mcp-bridge
Source code: github.com/xiake-1/dsh-unity-mcp-bridge

Core Features

Compared to @deepseek-ai/dsh-mcp-client distributed with DSH, this plugin emphasizes three incremental capabilities in the README, and retains the resyncAfterTools behavior that makes the on-demand workflow feasible:

  1. Vendored implementation
    The bridging logic is in this package’s lib/index.js, without relying on manual modifications to the npx cache; DSH upgrades will not silently overwrite your modifications. The implementation is derived from @deepseek-ai/dsh-mcp-client v0.1.5-rc.2, and the changes are documented in the file header and LICENSE.

  2. Bundled command catalog skill
    skills/SKILL.md serves as the index, and skills/reference/*.md lists Unity commands by category (Chinese documentation states a total of 73 commands). After activation, it is registered as a runtime skill; the model first reads the index, then reads individual category files when needed, avoiding flooding the context at once.

  3. Wrap-up helper tool unity_tools_restore
    Disables Unity tools except for tool management ones, and can disconnect, reverting the tool set to the minimal resident set.

  4. resyncAfterTools
    After the configured tools (typically tool-set-enabled-state) return from a call, the bridge re-fetches tools/list on its own and replaces the registry, instead of waiting for the server’s notifications/tools/list_changed (DSH long sessions may not receive this notification).

Additionally, it provides two companion slash skills that are visible to the model by default (can be disabled via registerHelperSkills: false):

Skill Purpose
/unity-mcp-install Checks and installs unity-mcp-cli; locates the Unity project in the workspace via ProjectSettings/ProjectVersion.txt; executes unity-mcp-cli install-plugin <project> --with-server as needed; CLI / plugin / Server versions need to be in lockstep (documentation example: CLI 1.2.0 ↔ com.ivanmurzak.unity.mcp@1.2.0 ↔ server 9.2.11).
/unity-mcp-check Aligns the ports on both Unity and DSH sides to 20000; sets the AI agent to Kilo Code; initializes the tool set to only enable tool-set-enabled-state; probes connectivity and verifies the bridge with unity_mcp_activate.

Feature descriptions and the token/latency comparison between “tool calls vs direct file reading” can be found in FEATURES-AND-COMPARISON.md (in Chinese) in the repository.

Installation and Activation

The DSH peer dependency declares a lower bound of >=0.1.5-rc.2 (not pinned); the README states host compatibility has been verified on 0.1.5-rc.2, 0.1.7-rc.2, and 0.2.0-rc.2.

<profile> refers to the DSH profile running the MCP bridge: web corresponds to dsh web, desktop corresponds to the DeepSeek Harness desktop app.

  1. Install the plugin (commands from the official README, choose one):
dsh plugin --profile <profile> add git+https://github.com/xiake-1/dsh-unity-mcp-bridge.git

Or from a local checkout directory:

dsh plugin --profile <profile> add file:<path-to-this-checkout>
  1. Insert an entry in %DSH_HOME%/profiles/<profile>/cordis.patch.yml so the profile points to this package instead of the stock client (Chinese documentation suggests uniformly using the /mcp endpoint on port 20000):
- insert:
    - id: unity-mcp
      name: 'dsh-unity-mcp-bridge'
      config:
        serverName: unity
        transport: streamable-http
        url: http://localhost:20000/mcp
        resyncAfterTools:
          - tool-set-enabled-state
        resyncIntervalMs: 0
  1. Restart dsh web or the desktop application. The command catalog skill and unity_tools_restore will load with the plugin; companion installation/check skills are available when registerHelperSkills: true (default).

Note: Do not use the stock @deepseek-ai/dsh-mcp-client simultaneously with this plugin to connect to the same serverName, otherwise both modules will fight over the same set of public tool names.

Uninstall example:

dsh plugin --profile <profile> remove dsh-unity-mcp-bridge

And delete the corresponding unity-mcp line from cordis.patch.yml.

Typical Usage

For the complete Unity-side environment, refer to the ai-game.dev Unity documentation. On the DSH side, it’s recommended to follow the “on-demand workflow”:

  1. For the first time or when the environment is uncertain, first run /unity-mcp-install, then run /unity-mcp-check, to align ports, Kilo Code, and the minimal tool set.
  2. When the Agent needs to operate Unity, the user executes /unity-mcp-tools (this skill is not visible to the model by default, and is the only entry point for activation).
  3. Call unity_mcp_activate to connect to Unity and register the mcp__unity__* tools.
  4. Refer to the bundled command catalog, and use mcp__unity__tool-set-enabled-state to enable the commands needed for the current task (the full Schema of each enabled command will enter every subsequent model request, so only enable what’s necessary).
  5. In the next step, call the specific mcp__unity__<command_name>.
  6. At the end of the task, call unity_tools_restore (optionally keep to retain individual commands), returning to dormant state.

Common configuration options (full list in README Configuration):

Field Default Description
autoStart false Stay dormant; set to true to connect on startup
resyncAfterTools [] On-demand workflow should include tool-set-enabled-state
toolCallTimeoutMs 60000 Single tool call timeout
registerCatalogSkill true Whether to register the command catalog skill
registerHelperSkills true Whether to register /unity-mcp-install and /unity-mcp-check

Use Cases and Notes

Who it’s for: Developers who are already using or planning to use DSH + Unity MCP (com.ivanmurzak.unity.mcp) for editor automation, want to control context size, and are willing to complete installation and port alignment via slash skills.

Permissions and security: The plugin runs with the current DSH process. Before installation, please read the repository source code and the MIT license, and confirm that the URL, transport, and network exposure scope in cordis.patch.yml comply with your environment.

Ecosystem notes: DeepSeek Harness adopts an “everything is a plugin” extension approach; SkillHub is a community plugin directory site, with no official affiliation with DeepSeek / High-Flyer. The star rating of this plugin on the directory page is 0, which does not mean the functionality is unusable. Before use, refer to the GitHub README and version 0.3.3.

Conclusion

dsh-unity-mcp-bridge connects Unity MCP to DSH in a dormant state by default, expands tools on demand through /unity-mcp-tools, collapses context with resyncAfterTools and unity_tools_restore, and uses a vendored implementation to avoid losing patches during upgrades. When needed, it can be installed from SkillHub or GitHub, then align the Unity and DSH sides using /unity-mcp-install and /unity-mcp-check.

  • Directory page: https://www.skillhub.cn/plugins/xiake-1/dsh-unity-mcp-bridge
  • GitHub: https://github.com/xiake-1/dsh-unity-mcp-bridge
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye