dsh-unity-debug-bridge

dsh-unity-debug-bridge

MCP server for debugging Unity Editor managed code, supporting attach, breakpoints, stepping, call stack inspection, and read-only evaluation.

Category
Visit Server

README

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 会话状态与清理

前置条件

安装到 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 % 1000(process_id 来自 <project>/Library/EditorInstance.json),不是固定 56000。
  5. DAP 传输:Content-Length 帧(非逐行 JSON);该 adapter 不支持 configurationDone 请求。

详见 docs/adapter-contract.md。

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured