Skip to main content
Glama
goesByhc

dsh-unity-debug-bridge

by goesByhc

dsh-unity-debug-bridge

DSH ↔ Unity Editor breakpoint debugging bridge: as an MCP server (stdio), it exposes Unity Editor managed code (Mono) debugging capabilities to DSH agent — attach to editor, set breakpoints, step, read call stack, read-only evaluation.

Capabilities

Tool

Description

unity_attach

Attach to Unity Editor (reads Library/EditorInstance.json to auto-discover process and port)

unity_set_breakpoint / unity_continue

Breakpoints; continue blocks until hit and returns stopped; when resumeAfterStop=true, automatically releases after hit (AI mode), defaults to stopping (human-viewing mode)

unity_step / unity_step_in / unity_step_out / unity_pause

Step and pause

unity_stack / unity_scopes / unity_variables

Call stack and variables

unity_evaluate

Read-only evaluation (context=watch, state mutation forbidden)

unity_status / unity_detach

Session status and cleanup

Related MCP server: rr-mcp

Prerequisites

Install into DSH

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

Or manually add the stdio server in DSH's MCP settings:

- 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

Usage Notes (Lessons from Real-World Pitfalls, Must Read)

  1. Sessions must end cleanly and allow repeated attaches: Unity 2022.3's debug agent will reject subsequent attaches after a session is forcibly interrupted (killing the adapter) — no handshake after connection, silent failure — and only restarting the editor recovers. As long as you end the session via unity_detach (graceful disconnect), the same editor can be attached repeatedly without restart.

  2. Don't do TCP pre-checks: any extra connection (connect+close) will corrupt agent state; check the port with netstat. Don't use ping-like tools to connect to the debug port.

  3. EditorAttach preference: EditorPrefs "EditorAttach"=true must be persisted before the editor starts (runtime setting has no effect), otherwise the debug agent won't listen. You can execute EditorPrefs.SetBool("EditorAttach", true) once inside the editor and then restart the editor.

  4. Debug port: Editor debug port = 56000 + process_id % 1000 (process_id comes from <project>/Library/EditorInstance.json), not fixed 56000.

  5. DAP transport: Content-Length framing (not line-by-line JSON); this adapter does not support the configurationDone request.

See docs/adapter-contract.md for details.

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