Purpose
qwen-dap-mcp provides coding agents with true native debugger capabilities. Coding agents can read source code and propose patches, but native faults often cannot be reliably diagnosed from source code alone; useful evidence exists at runtime: thread stacks, registers, local variables, disassembly, exception state, modules, memory, wait states, symbols, and crash dumps. This tool provides that evidence to agents via MCP.
Main Capabilities
- Evidence-first: Inspect the process that actually failed, rather than guessing from source code alone.
- Advanced workflows: Crash, hang, diff, causal tracing, progress probing, runtime reporting, dump, and verification tools, designed for agents rather than for humans operating a debugger console.
- Bounded automation: Autonomous fix/verify state is explicit, serializable, has iteration limits, and re-checks the original reproduction.
- Small default surface: By default, only 18 core agent tools are shown; forensic workflows and raw DAP control are separate optional tiers.
- Local by default: The MCP server communicates via stdio, the debug adapter runs locally, unless a verified remote target is explicitly configured.
Supports native crash debugging, hang/deadlock investigation, crash dumps, differential runtime analysis, remote targets, and bounded fix/verify workflows. For debugger support, adapter discovery, prerequisites, and platform-specific setup are documented (the specific adapter list is not provided at this time).
Usage
Installation options include installing directly from GitHub or installing the published npm package, then verifying the extension. Typical configuration applies to any stdio MCP client. CLI discovery functionality is available without starting the stdio server.
The default toolset deliberately exposes only 18 core tools, so coding models spend less context and selection cost on rarely needed forensic workflows. When deeper investigation is needed, set QWEN_DAP_MCP_TOOLSET=forensics, which keeps the raw manual DAP interface hidden while adding extra tools (the specific tool list is not provided at this time). Only set QWEN_DAP_MCP_TOOLSET=fullwhen raw stack/scope/variables, manual breakpoints/watchpoints, evaluation, memory reads, single-stepping, or adapter-specific control are explicitly needed.
The MCP server provides debugger evidence and bounded workflow state. Source editing, building, testing, and source control operations are still performed by the coding agent's normal authorized tools.
Applicable Scenarios
Suitable for coding agent workflows that need to diagnose native faults through runtime evidence, including crash diagnosis, deadlock investigation, crash dump analysis, differential runtime analysis, and bounded fix-and-verify loops. Obtainable via Qwen Code, npm, and the MCP Registry, among others.
Security Design
A debugger can execute and change target state, so this bridge tool explicitly handles that capability: the MCP server does not expose arbitrary shell tools, does not expose source write primitives, and the default agent surface does not include generic memory write primitives. Remote endpoints are verified, and non-loopback access requires an explicit allowlist. Autonomous workflow state is explicit, rather than hidden in background loops. Optional HOL Guard 2.2+ integration can fail closed before protected adapters start or before executable/mutating DAP operations cross the debugger boundary. Full policy and threat model are in the relevant documentation.
Testing and Benchmarks
The repository contains deterministic native test fixtures, making behavior testable. The benchmark directory also contains reproducible comparison tools for source-only, dap-raw, and qwen-dap-mcp workflows, deliberately without fabricated performance numbers.
Requirements and Limitations
Requires Node.js 20+.npm run check It builds TypeScript, runs the test suite, and verifies self-contained Qwen extension packages. CI also tests native crash/hang fixtures, adapter-specific real smoke tests, package output, HOL Guard compatibility, and container builds. The license is Apache-2.0.