# mcp-debugger — DAP Debugging Tools for Agents > Add step-through debugging to AI agents via an MCP server built on the Debug Adapter Protocol (DAP). Works across languages; run with npm or Docker. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use 1. Install / run: ```bash npx @debugmcp/mcp-debugger --help ``` 2. Start / smoke test: ```bash npm install -g @debugmcp/mcp-debugger && mcp-debugger --help ``` 3. Verify: - Start the MCP server and call `list_supported_languages`, then create one debug session and set a breakpoint. ## Intro Add step-through debugging to AI agents via an MCP server built on the Debug Adapter Protocol (DAP). Works across languages; run with npm or Docker. - **Best for:** AI coding agents that need deterministic debugging actions (breakpoints, stepping, stack/vars) instead of log guessing - **Works with:** MCP clients + DAP-based debuggers; multi-language projects (see repo for adapters) - **Setup time:** 10 minutes ## How to Use It Well - Setup time ~10 minutes (npm + connect from your MCP client) - GitHub stars + forks (verified): see Source & Thanks - One MCP tool call can replace multiple “please step/print/inspect” prompt turns If your agent’s debugging loop is “edit → run → read logs → guess”, you waste tokens and time. With mcp-debugger, you can make debugging state explicit: set one breakpoint, step a few frames, and inspect locals/stack via structured calls. ### FAQ **Q: What does it actually expose?** A: A set of MCP tools that map to DAP-style debugging actions like create session, breakpoints, stepping, stack and variables. **Q: Do I need an IDE UI?** A: No. Agents can drive debugging headlessly by calling MCP tools; your IDE is optional. **Q: Is it safe for production?** A: Use it in dev/CI environments. Limit what files/processes the debugger can touch and run it with least privilege. ## Source & Thanks > Source: https://github.com/debugmcp/mcp-debugger > License: MIT > GitHub stars: 105 · forks: 15 --- ## 快速使用 1. 安装 / 运行: ```bash npx @debugmcp/mcp-debugger --help ``` 2. 启动 / 冒烟测试: ```bash npm install -g @debugmcp/mcp-debugger && mcp-debugger --help ``` 3. 验证: - Start the MCP server and call `list_supported_languages`, then create one debug session and set a breakpoint. ## 简介 通过 MCP server 把 Debug Adapter Protocol(DAP)的断点/单步/变量查看等能力暴露为结构化工具调用,让 AI agent 能在多语言项目里做可重复的调试排障。 - **适合谁:** 希望把“断点/单步/堆栈/变量”变成可控工具调用,而不是靠日志猜测的 AI 编程代理 - **可搭配:** 支持 MCP 的客户端 + 基于 DAP 的调试器;多语言工程(适配器以仓库为准) - **准备时间:** 10 分钟 ## 实战建议 - 接入时间约 10 分钟(npm 安装 + 在 MCP 客户端里连接) - GitHub stars + forks(已核验):见「来源与感谢」 - 一次工具调用可替代多轮“单步/打印/检查变量”的对话回合 如果你的 agent 调试循环是“改代码→跑→看日志→猜原因”,通常会浪费大量 token 和时间。mcp-debugger 的价值在于把调试状态显式化:下一个断点、走几步、查看局部变量/堆栈,都变成结构化的可重复工具调用。 ### FAQ **它到底暴露了什么能力?** A: 它把 DAP 风格的调试动作封装成 MCP 工具:创建会话、下断点、单步、查看堆栈与变量等。 **必须配 IDE UI 吗?** A: 不需要。Agent 通过 MCP 工具就能无界面调试;IDE 只是可选的可视化入口。 **适合放到生产环境吗?** A: 更适合开发/CI。建议最小权限运行,限制可调试的进程与可访问的路径。 ## 来源与感谢 > Source: https://github.com/debugmcp/mcp-debugger > License: MIT > GitHub stars: 105 · forks: 15 --- Source: https://tokrepo.com/en/workflows/mcp-debugger-dap-debugging-tools-for-agents Author: MCP Hub