Skip to main content
Glama
goesByhc

dsh-unity-debug-bridge

by goesByhc

dsh-unity-debug-bridge

DSH ↔ Unity Editor 断点调试桥:以 MCP server(stdio) 形式,把 Unity Editor 托管代码(Mono)的调试能力暴露给 DSH agent —— 附加到编辑器、下断点、单步、读调用栈、只读求值。

能力

工具

说明

unity_attach

附加到 Unity Editor(读 Library/EditorInstance.json 自动发现进程与端口)

unity_set_breakpoint / unity_continue

断点;continue 阻塞到命中返回 stopped;resumeAfterStop=true 时命中后自动放行(AI 模式),默认停住(人看模式)

unity_step / unity_step_in / unity_step_out / unity_pause

单步与暂停

unity_stack / unity_scopes / unity_variables

调用栈与变量

unity_evaluate

只读求值(context=watch,禁止改状态)

unity_status / unity_detach

会话状态与清理

Related MCP server: rr-mcp

前置条件

安装到 DSH

node install.mjs
# 然后重启 DSH,/mcp 面板出现 unity-debug-bridge(13 个 unity_* 工具)

或在 DSH 的 MCP 设置里手动添加 stdio 服务器:

- insert:
    - id: mcp-unity-debug-bridge
      name: "@deepseek-ai/dsh-mcp-client"
      config:
        serverName: unity-debug-bridge
        transport: stdio
        command: node
        args: ["<本包路径>/server/mcp-server-stdio.mjs"]
        cwd: "<本包路径>"
        toolCallTimeoutMs: 120000

使用要点(踩坑实录,务必读)

  1. 会话必须干净结束、可反复 attach:Unity 2022.3 调试 agent 在会话被粗暴中断(kill adapter)后会拒绝后续 attach(连接后无握手,静默失败),只能重启编辑器恢复。只要通过 unity_detach(优雅断开)结束会话,同一编辑器可反复 attach,无需重启。

  2. 不要做 TCP 预检:任何多余连接(connect+close)都会破坏 agent 状态;查端口用 netstat。不要用 ping 类工具去连调试端口。

  3. EditorAttach 偏好EditorPrefs "EditorAttach"=true 必须在编辑器启动前已持久化(运行时设置无效),否则调试 agent 不监听。可在编辑器内执行一次 EditorPrefs.SetBool("EditorAttach", true) 后重启编辑器。

  4. 调试端口:Editor 调试端口 = 56000 + process_id % 1000process_id 来自 <project>/Library/EditorInstance.json),不是固定 56000。

  5. DAP 传输:Content-Length 帧(非逐行 JSON);该 adapter 不支持 configurationDone 请求。

详见 docs/adapter-contract.md

License

MIT

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    A
    maintenance
    Seamless automation and intelligent control over your Unity projects. By integrating with the MCP server and client, it allows AI agents or external tools to interact with your Unity environment—creating, modifying, and managing GameObjects, Components, Assets, Scenes, and more.
    3,860
    Apache 2.0
  • A
    license
    -
    quality
    D
    maintenance
    MCP server for orchestrating multi-process rr debugging sessions with reverse execution, breakpoints, and dynamic session state.
    1
    MIT
  • A
    license
    -
    quality
    A
    maintenance
    Provides MCP tools to manage and interact with Unity debug sessions in VS Code, including breakpoints, snapshots, evaluation, and stepping, via a named pipe to the Unity Debugger Pure extension.
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for understanding Javascript internals from ECMAScript specification.

  • MCP server for Klever blockchain smart contract development.

  • An MCP server for deep research or task groups

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/goesByhc/dsh-unity-debug-bridge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server