DSH-Unreal-Engine: Integrating the Built-in MCP of UE 5.8 into DSH Settings

Introduction

To enable agents to operate Unreal Engine within DeepSeek Harness (DSH), you need to connect the Model Context Protocol (MCP) service provided by Epic in UE 5.8+ to DSH’s MCP client. Without a dedicated plugin, you typically have to manually write the insert block in cordis.patch.yml, specifying the streamable-http transport and a local URL. If the endpoint is misconfigured, the port is occupied, or the editor is not running, you often end up with just an empty tool list, lacking actionable diagnostic information.

dsh-unreal-engine (maintained by yeee-eh) utilizes DSH’s bundle channel: the plugin includes its own cordis.patch.yml to complete the mounting, and provides endpoint auto-detection and manual parsing in the Settings → Unreal Engine page, consolidating “install, connect, and use” into a single settings page and a few installation steps. This article introduces its positioning, capabilities, and installation usage. For the most accurate information, please refer to the README of the GitHub repository.

What is this

dsh-unreal-engine connects the built-in MCP service of Unreal Engine 5.8+ to DeepSeek Harness. The data flow can be summarized as follows:

DSH agent  ──[dsh-mcp-client]──>  UE 5.8 built-in MCP server  ──>  Editor
             Officially provided by DSH          Officially provided by Epic
                    ↑
          This plugin: Settings page + Endpoint detection

The current version of the plugin is 0.1.0 (see package.json), licensed under MIT, and requires Node.js >= 20. During runtime, it intentionally does not bundle the MCP SDK or React, instead reusing the @modelcontextprotocol/sdk / @modelcontextprotocol/client built into DSH and the React from the client shell, respectively, to avoid hook anomalies caused by duplicate instances.

Core Features

Settings Page and Endpoint Detection

After opening Settings → Unreal Engine, you can:

Operation Description
Auto-detect and Save Iterates starting from port 8000 to attempt actual MCP handshakes (not just port scanning). If found, it saves the endpoint.
Manual Input If detection fails, paste the entire line from the UE Output Log or directly enter the port number.
Result Area Displays the number of Toolsets, meta tool names, and protocol version (all from the actual handshake).

Manual input can recognize formats such as:

LogModelContextProtocol: Starting MCP server on port 8000 (override with -ModelContextProtocolPort=N)
LogHttpListener: Created new HttpListener on 127.0.0.1:8000
http://127.0.0.1:8000/mcp
8000

The above formats will be normalized to http://127.0.0.1:8000/mcp.

The configuration is persisted in $env:DSH_HOME/unreal-engine.json, which is read by the host process at startup (the browser-side settings document cannot be read at startup, whereas the MCP client connects exactly at startup).

Bundle Mounting, No Need to Modify User-level Patches

Similar to dshmarket and dsh-chat-manager, this plugin mounts via its own cordis.patch.yml within the bundle. The user’s ~/.dsh/cordis.patch.yml should remain empty (only []), so there is no need to manually modify the user YAML upon uninstallation.

Diagnostics and Standards

  • tools/ue5-dsh-doctor.mjs: Five-stage link connectivity diagnostics (zero dependencies, can be called via npm run doctor).
  • skills/unreal-mcp/: UE operation standards (needs to be manually copied to $env:DSH_HOME/skills/).
  • lib/mcp-client-loader.mjs: Tries new and old MCP package names across multiple resolution roots. If it fails, it lists the reason for each attempt instead of a generic MODULE_NOT_FOUND.

Change Port (Environment Variable)

The MCP URL is read from the environment variable via !!js in the patch, defaulting to the UE default:

url: !!js "process.env.DSH_UNREAL_MCP_URL || 'http://127.0.0.1:8000/mcp'"

To change the port without editing the YAML, set the following before starting DSH:

$env:DSH_UNREAL_MCP_URL = 'http://127.0.0.1:8123/mcp'
dsh --profile web

Known Limitation: The endpoint saved on the settings page and the above !!js line are currently not linked. If a non-8000 port is detected, besides saving it in the settings page, you also need to set DSH_UNREAL_MCP_URL. You must restart DSH after saving the settings, because dsh-mcp-client only connects and registers tools at startup.

Installation and Activation

The README suggests prioritizing installation assistance from DSH / AI based on documentation. Below are the standard steps from the repository. The commands use two placeholders that need to be set in the current PowerShell session:

Placeholder Meaning
$env:DSH_HOME DSH configuration root, usually C:\Users\<Username>\.dsh
$RepoRoot The source code directory of this plugin (the path where you have the source locally)
if (-not $env:DSH_HOME) { $env:DSH_HOME = "$env:USERPROFILE\.dsh" }
$RepoRoot = 'C:\path\to\dsh-unreal-engine'

1. Make the profile resolvable to the package

cd $env:DSH_HOME\profiles\web
pnpm add file:$RepoRoot

If you prefer not to modify package.json, you can create a directory junction in the shared layer:

New-Item -ItemType Junction `
  -Path "$env:DSH_HOME\profiles\node_modules\dsh-unreal-engine" `
  -Target '$RepoRoot'

The package should be placed in profiles/node_modules (the shared layer), not just profiles/web/node_modules. Otherwise, profiles like dsh --profile sdk may report Cannot find package 'dsh-unreal-engine'.

2. Register to bundles

Edit $env:DSH_HOME\profiles\web\package.json and add dsh-unreal-engine to dsh.profile.bundles:

"dsh": {
  "profile": {
    "bundles": [
      "@deepseek-ai/dsh-base",
      "@deepseek-ai/dsh-web-app",
      "...",
      "dsh-unreal-engine"
    ],
    "patchReload": "live"
  }
}

Only when it appears in bundles will DSH apply the cordis.patch.yml within the package. The README notes: In some already installed DSH versions (e.g., 0.1.5-rc), reconcileProfilePlugins can read dsh.bundle for automatic registration but may not be invoked, so this step often needs to be completed manually at present. If dsh is in the PATH, you can also use dsh plugin --profile web add <package> (which will register it for you).

3. Confirm home patch is empty

$env:DSH_HOME\cordis.patch.yml should only be []. If there are still insert blocks for unreal-engine / mcp-unreal, they should be deleted to avoid loading failures caused by duplicate IDs.

4. Verify and Restart

dsh --profile sdk

Exiting quietly (exit=0, no output) indicates the plugin tree is loadable. Afterwards, restart DSH.

Distribution via Packaging

Maintainers can execute in the source directory:

cd $RepoRoot
npm pack --pack-destination ..\dist

This yields dsh-unreal-engine-0.1.0.tgz, for example. Installation on another machine:

cd $env:DSH_HOME\profiles\web
pnpm add D:\Downloads\dsh-unreal-engine-0.1.0.tgz

You still need to manually add dsh-unreal-engine to dsh.profile.bundles, then restart DSH. The target environment must be able to resolve the MCP client module built into DSH; otherwise, detection will report “Cannot resolve MCP client module”. Locate the issue based on the diagnostics output by the plugin.

Typical Usage

One-time Preparation on the UE Side

  1. UE Editor → Edit → Plugins → Search for ModelContextProtocol → Enable → Restart Editor.
  2. Window → Output Log, execute the following in the bottom input box:
   ModelContextProtocol.StartServer
  1. Confirm that Created new HttpListener on 127.0.0.1:8000 appears in the log.

Connection on the DSH Side

  1. Complete the installation and bundles registration above, and restart DSH.
  2. Open Settings → Unreal Engine and use Auto-detect and Save. If it fails, paste the log line or port number and save.
  3. Restart DSH again so that the MCP client registers tools according to the new endpoint.
  4. Use the registered UE MCP tools via the DSH agent in the session (specific tool names are subject to the handshake result area display).

Optional: Copy skills/unreal-mcp/ to $env:DSH_HOME\skills\ to facilitate the agent following the UE operation instructions in the repository. If troubleshooting is needed, run node tools/ue5-dsh-doctor.mjs or npm run doctor.

Applicable Scenarios and Notes

Who it is for: Developers already using DSH for agent workflows and have enabled the official MCP plugin in UE 5.8+; scenarios where visual detection and diagnostics are needed, avoiding the manual writing of cordis.patch.yml.

Permissions and Security: The plugin runs with the current DSH process permissions, reading and writing configurations under $env:DSH_HOME (such as unreal-engine.json), and driving the local UE editor via MCP. Please read the repository source code and the MIT license, as well as the explanation regarding UE EULA and trademarks in NOTICE.md, before installation.

Uninstallation Points: After removing the package name from bundles, execute dsh plugin --profile web remove dsh-unreal-engine (or equivalent pnpm remove). If a junction was used, delete the corresponding directory. Optionally delete $env:DSH_HOME\unreal-engine.json. No need to modify the user cordis.patch.yml.

Ecosystem Note: The DSH community plugin directory (e.g., the entry on SkillHub) is an independent site and has no official affiliation with DeepSeek / High-Flyer. This article does not represent official endorsement.

Conclusion

dsh-unreal-engine consolidates the wiring work between the built-in MCP of UE 5.8+ and DSH’s dsh-mcp-client into bundle installation and the “Unreal Engine” settings page. Detection, persistence, and diagnostics all revolve around the actual MCP handshake. If you are orchestrating game engine-related agents in DSH, you can check your environment against the three chapters (installation, UE preparation, and known limitations) in the directory page and the repository README.

  • Directory Page: https://www.skillhub.cn/plugins/yeee-eh/dsh-unreal-engine
  • GitHub: https://github.com/yeee-eh/dsh-unreal-engine
羽毛球分组比赛记分
小程序二维码

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

Xiaoye