DAP Bridge

•

Enables AI coding agents to natively launch, control, and inspect debugging sessions across multiple programming languages by translating Model Context Protocol (MCP) tool calls into standard Debug Adapter Protocol (DAP) requests.

mcp-dap is a high-performance, single-binary server written in Rust that bridges AI coding agents (such as Claude, Cursor, or Gemini) to battle-tested debug adapters. It acts as an intermediary, translating MCP tool calls from AI agents into standard DAP requests, thereby allowing these agents to natively launch, control, and inspect debugging sessions across various programming languages without needing to reinvent debugging logic. This server boasts features like a single static binary, automatic truncation of large variable values to protect LLM context windows, and the injection of surrounding source lines at breakpoints for efficient debugging. It supports a full debugging session lifecycle, operates asynchronously and concurrently, and enhances security through an adapter allow-list.

主要功能

010 GitHub stars
02Full debugging session lifecycle support: launch, attach, set/remove breakpoints, step, evaluate, inspect, disconnect
03Adapter allow-list to restrict which debug adapter executables may be spawned, enhancing security
04Single static binary, eliminating external runtime dependencies like Node.js or Python
05LLM context guard that truncates large variable values and deep objects to optimize agent context windows
06Automatic context injection of surrounding source lines when a breakpoint is hit, reducing round-trips

使用案例

01Providing native debugging capabilities for AI coding agents like Claude, Cursor, or Gemini
02Enabling AI-powered IDEs to launch, control, and inspect debugging sessions for various languages
03Facilitating the inspection of debuggee state (threads, call stacks, variables) by AI agents