{
  "markdown": "# qwen-dap-mcp\n\n**Give coding agents a real native debugger.**\n\n`qwen-dap-mcp` is a local **Debug Adapter Protocol (DAP) → Model Context Protocol (MCP)** bridge for native crash debugging, hang/deadlock triage, crash dumps, differential runtime analysis, remote targets, and bounded fix/verify workflows.\n\nBuilt for **Qwen Code**, usable from any stdio MCP client, and designed to expose debugger evidence without turning MCP into a general-purpose shell.\n\n[![CI](https://github.com/SLP-DEV1/qwen-dap-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/SLP-DEV1/qwen-dap-mcp/actions/workflows/ci.yml)\n[![Release](https://img.shields.io/github/v/release/SLP-DEV1/qwen-dap-mcp)](https://github.com/SLP-DEV1/qwen-dap-mcp/releases/latest)\n[![npm](https://img.shields.io/npm/v/@slp-dev1/qwen-dap-mcp)](https://www.npmjs.com/package/@slp-dev1/qwen-dap-mcp)\n[![npm downloads](https://img.shields.io/npm/dm/@slp-dev1/qwen-dap-mcp)](https://www.npmjs.com/package/@slp-dev1/qwen-dap-mcp)\n[![MCP Registry](https://img.shields.io/badge/MCP%20Registry-published-5b5bd6)](https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.SLP-DEV1%2Fqwen-dap-mcp)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)\n[![Node](https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg)](package.json)\n[![GitHub stars](https://img.shields.io/github/stars/SLP-DEV1/qwen-dap-mcp?style=social)](https://github.com/SLP-DEV1/qwen-dap-mcp/stargazers)\n\n**[Quick start](#quick-start) · [Capabilities](#what-it-does) · [Debugger support](#debugger-support) · [Safety](#safety-by-design) · [Docs](docs/README.md) · [Contributing](CONTRIBUTING.md)**\n\n## Why this exists\n\nCoding agents can read source and propose patches, but native failures often cannot be diagnosed reliably from source alone. The useful evidence lives at runtime: thread stacks, registers, locals, disassembly, exception state, modules, memory, wait states, symbols, and crash dumps.\n\n`qwen-dap-mcp` makes that evidence available through MCP and adds agent-oriented workflows on top of raw debugger primitives:\n\n- **Evidence first** — inspect the actual failing process instead of guessing from source.\n- **High-level workflows** — crash, hang, differential, writer-tracing, dump, and verification tools are designed for agents rather than humans driving a debugger console.\n- **Bounded automation** — autonomous fix/verify state is explicit, serializable, iteration-limited, and re-checks the original reproduction.\n- **Small default surface** — the normal agent toolset stays compact while advanced low-level DAP tools remain opt-in.\n- **Local by default** — the MCP server communicates over stdio and debugger adapters run locally unless you explicitly configure a validated remote target.\n\n## Quick start\n\n### Qwen Code\n\nInstall directly from GitHub:\n\n```bash\nqwen extensions install SLP-DEV1/qwen-dap-mcp\n```\n\nOr install the published npm package:\n\n```bash\nqwen extensions install @slp-dev1/qwen-dap-mcp\n```\n\nThen verify the extension:\n\n```text\n/mcp\n/skills\n```\n\nYou should see the `qwen-dap-mcp` server and the bundled `native-runtime-debug` skill.\n\n### Any stdio MCP client\n\n```bash\nnpx -y @slp-dev1/qwen-dap-mcp\n```\n\nTypical configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"qwen-dap-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@slp-dev1/qwen-dap-mcp\"]\n    }\n  }\n}\n```\n\nCLI discovery is available without starting the stdio server:\n\n```bash\nqwen-dap-mcp --help\nqwen-dap-mcp --version\n```\n\n## 30-second example\n\n```text\nYou: Debug why app.exe crashes with --repro\n\nCoding agent\n  ↓\nqwen-dap-mcp starts a DAP debugger\n  ↓\ncaptures the native failure + project-controlled frame\n  ↓\ncorrelates stack + registers + locals + disassembly\n  ↓\nbacktracks runtime evidence toward the likely producer\n  ↓\nagent applies a minimal source fix\n  ↓\nbuilds and repeats the original reproduction\n  ↓\nverifies whether the original crash fingerprint is gone\n```\n\nThe MCP server supplies debugger evidence and bounded workflow state. Source editing, builds, tests, and source-control operations stay with the coding agent's normal authorized tools.\n\n## What it does\n\n| Problem | Agent-oriented capability |\n| --- | --- |\n| Native crash | Diagnose a stopped process, identify project frames, collect runtime evidence, and drive bounded fix/verify loops |\n| Hang or deadlock | Observe, pause when needed, capture all-thread stacks, classify waits, and surface conservative deadlock candidates |\n| Good run vs bad run | Compare stopped sessions semantically while suppressing raw ASLR/address noise |\n| Suspicious value | Trace real writers with data breakpoints/watchpoints and bounded temporal tracing |\n| Crash dump | Inspect Windows minidumps and supported LLDB/GDB postmortem targets without launching the failed program |\n| Remote native target | Attach through validated `gdbserver` / `lldb-server gdbserver` endpoints with loopback-first policy |\n| Multiple targets | Keep isolated DAP sessions and route requests by `sessionId` |\n| Agent safety | Keep the default surface compact and optionally gate executable/mutating DAP actions with HOL Guard |\n\n### Default agent tool surface\n\nThe default toolset intentionally exposes 14 high-signal tools:\n\n| Tool | Purpose |\n| --- | --- |\n| `debug_this_crash` | High-level native crash diagnosis and bounded autonomous verification |\n| `debug_this_hang` | High-level hang/deadlock triage |\n| `debug_compare_runs` | Semantic comparison of baseline and failing stopped sessions |\n| `debug_trace_value` | Bounded temporal tracing of a suspicious value |\n| `debug_diagnose_stop` | Diagnose the current debugger stop |\n| `debug_source_disassembly` | Correlate source with nearby native instructions |\n| `debug_find_writer` | Stop at the code that writes a watched value |\n| `debug_run_to_stop` | Continue/launch toward a bounded meaningful stop |\n| `debug_open_dump` | Open supported postmortem dump/core targets |\n| `debug_snapshot` | Capture structured runtime evidence |\n| `debug_status` | Inspect debugger/session state |\n| `debug_continue` | Continue the active target |\n| `debug_disconnect` | Cleanly end a debugger session |\n| `debug_sessions` | Create, inspect, and remove isolated sessions |\n\nNeed raw stacks, scopes, variables, memory, modules, breakpoints, evaluation, stepping, or adapter-specific controls? See the opt-in **full toolset** in [docs/toolsets.md](docs/toolsets.md).\n\n## Debugger support\n\n| Adapter / target | Supported use |\n| --- | --- |\n| **CodeLLDB** | Local native launch/attach and Windows minidump workflows |\n| **LLVM `lldb-dap`** | Native launch/attach, core-file inspection, and `lldb-server gdbserver` remote attach |\n| **GNU GDB 14+ DAP** | Native launch/attach, core-file workflows, and hardened `gdbserver` remote attach |\n\nAdapter discovery, prerequisites, and platform-specific setup are documented in [docs/README.md](docs/README.md).\n\n## More than raw DAP\n\nRaw DAP is intentionally low level. `qwen-dap-mcp` keeps raw debugger access available in the full toolset, but its default surface focuses on workflows an agent can reason about directly.\n\n| | Source only | Raw DAP | qwen-dap-mcp agent tools |\n| --- | :---: | :---: | :---: |\n| Runtime debugger evidence | — | ✓ | ✓ |\n| High-level crash diagnosis | — | — | ✓ |\n| All-thread hang triage | — | manual | ✓ |\n| Good-vs-bad semantic diff | — | manual | ✓ |\n| Explicit bounded fix/verify state | — | — | ✓ |\n| Verification fingerprinting | — | — | ✓ |\n\n## Safety by design\n\nA debugger can execute and mutate target state, so the bridge treats that power explicitly.\n\n- No arbitrary shell tool is exposed by the MCP server.\n- No source-writing primitive is exposed by the MCP server.\n- No general memory-write primitive is part of the default agent surface.\n- Remote endpoints are validated and non-loopback access requires explicit allowlisting.\n- Autonomous workflow state is explicit rather than hidden inside a background loop.\n- Optional **HOL Guard 2.2+** integration can fail closed before protected adapter startup or executable/mutating DAP actions cross the debugger boundary.\n\nRead the full policy and threat model in [docs/hol-guard.md](docs/hol-guard.md) and [SECURITY.md](SECURITY.md).\n\n## Repro labs and benchmark harness\n\nThe repository includes deterministic native fixtures so behavior can be tested instead of demonstrated only with screenshots:\n\n```bash\nnpm run demo:build -- null-pointer\nnpm run demo:repro -- null-pointer\n\nnpm run demo:hang:build -- deadlock\nnpm run demo:hang:repro -- deadlock\n```\n\n[`benchmark/`](benchmark/) also contains a reproducible comparison harness for `source-only`, `dap-raw`, and `qwen-dap-mcp` workflows. It deliberately ships without invented performance numbers; publishable results should record the exact model, settings, commit, reproduction, raw outcome, and verification status.\n\n## Documentation\n\nStart with the [documentation index](docs/README.md).\n\n| Topic | Guide |\n| --- | --- |\n| CodeLLDB on Windows | [docs/CODELLDB_WINDOWS.md](docs/CODELLDB_WINDOWS.md) |\n| LLVM `lldb-dap` | [docs/lldb-dap.md](docs/lldb-dap.md) |\n| GNU GDB DAP | [docs/gdb-dap.md](docs/gdb-dap.md) |\n| Remote debugging | [docs/remote-debugging.md](docs/remote-debugging.md) |\n| Hang/deadlock analysis | [docs/hang-debugging.md](docs/hang-debugging.md) |\n| Differential debugging | [docs/differential-debugging.md](docs/differential-debugging.md) |\n| Agent vs full toolsets | [docs/toolsets.md](docs/toolsets.md) |\n| HOL Guard integration | [docs/hol-guard.md](docs/hol-guard.md) |\n| Publishing / releases | [docs/publishing.md](docs/publishing.md) |\n\n## Development\n\nRequirements: **Node.js 20+**.\n\n```bash\ngit clone https://github.com/SLP-DEV1/qwen-dap-mcp.git\ncd qwen-dap-mcp\nnpm ci\nnpm run check\n```\n\n`npm run check` builds TypeScript, runs the test suite, and validates the self-contained Qwen extension package. CI additionally exercises native crash/hang fixtures, adapter-specific real smoke tests, package output, HOL Guard compatibility, and the container build.\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request.\n\n## Distribution\n\nPublished as:\n\n- npm: `@slp-dev1/qwen-dap-mcp`\n- MCP Registry: `io.github.SLP-DEV1/qwen-dap-mcp`\n- Qwen Code extension: `qwen extensions install SLP-DEV1/qwen-dap-mcp`\n- GitHub Releases: self-contained extension archives\n\nCurrent release details are in [CHANGELOG.md](CHANGELOG.md) and [GitHub Releases](https://github.com/SLP-DEV1/qwen-dap-mcp/releases).\n\n## Contributing\n\nBug reports, reproducible native failure cases, adapter compatibility findings, documentation fixes, and focused feature proposals are welcome. Please keep additions evidence-driven and prefer high-level agent workflows over expanding the default surface with raw debugger commands.\n\nIf this project saves you a debugging session, **consider starring the repository** — it helps other MCP and coding-agent users discover it.\n\n## License\n\nApache-2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).\n",
  "bytes": 10982,
  "sha": "d5e397d75601a2b39ee2dd926860475277664b77ce3a203e6ad4d3a30fc5ccc3",
  "repo_slug": "slp-dev1/qwen-dap-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_slp_dev1_qwen_dap_mcp_556abee7/readme"
}