qwen-dap-mcp
This server is an MCP bridge that gives coding agents (like Qwen Code) native debugger capabilities via DAP, enabling live debugging, crash analysis, and bounded autonomous fix/verify loops.
Autonomous crash debugging: run the
debug_this_crashworkflow to diagnose, propose fixes, apply them (via external tools), rebuild, reproduce, and verify outcomes with statuses likefixed,retry-fix, orbudget-exhausted.Launch/attach debuggers: start CodeLLDB or any local DAP adapter, launch or attach to native processes, and configure breakpoints (source, function, instruction, data, exception).
Inspect runtime state: list threads, read stack traces, scopes, variables, evaluate expressions, list modules, disassemble memory, read memory, and fetch exception info.
Control execution: pause, continue, step over/into/out, and wait for stops.
Analyze crashes: open minidumps (read-only postmort), classify crashes, score project frames, correlate operands/registers/locals, root causes, and compute verification fingerprints.- Capture snap: gather a bounded runtime snapshot (stop reason, stack locals, registers, disassembly, modules, exception info) for agent reasoning.
**Manage sessions check status, review recent DAP events, and disconnectly.
Safety-focused: only local stdio transport, no shell or source-writing primitives bounded memory/stack reads, and no hidden autonomous state.
Provides integration with LLVM's lldb-dap debugger adapter for native runtime debugging, live launch/attach workflows, and read-only core-file/minidump analysis, enabling stack, register, local variable, exception, module, disassembly, memory, and source-correlation evidence collection for crash diagnosis and bounded autonomous fix/verify cycles.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@qwen-dap-mcpLaunch the C++ binary, set a breakpoint at main, and take a debug snapshot"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
qwen-dap-mcp
Give Qwen Code a real native debugger.
A debugger-agnostic Debug Adapter Protocol (DAP) → Model Context Protocol (MCP) bridge for native runtime debugging, crash analysis, and bounded autonomous fix/verify loops.
Published on npm as @slp-dev1/qwen-dap-mcp and in the official MCP Registry as io.github.SLP-DEV1/qwen-dap-mcp.
Why this exists
Coding agents are good at reading and editing source, but native crashes often need evidence that only a debugger can provide: stack frames, registers, locals, disassembly, exception state, memory, modules, and crash dumps.
qwen-dap-mcp exposes that evidence through MCP so Qwen Code and other MCP clients can reason about native failures without embedding a debugger protocol inside the agent.
What it can do
Autonomous crash debugging — diagnose → inspect source → propose fix → apply fix → build → reproduce → verify.
Real native debugger evidence — stack, registers, locals, exception state, modules, disassembly, memory, and source correlation.
CodeLLDB integration — launch or attach to authorized local native targets through DAP.
Upstream LLVM lldb-dap integration — first-class live debugging and core-file inspection without treating lldb-dap as a CodeLLDB alias.
Windows minidumps / postmortem debugging — open existing
.dmpfiles and recover structured evidence.Runtime root-cause backtracking — follow suspicious values through bounded caller frames toward likely project-controlled producer candidates.
Verification fingerprints — distinguish fixed, same-crash, changed-failure, and inconclusive reproductions.
Safety boundaries — no arbitrary shell, source-writing primitive, general memory-write primitive, or hidden autonomous state inside the MCP server.
Related MCP server: Debug-MCP
30-second example
You: Debug why app.exe crashes with --repro
Qwen Code
↓
starts CodeLLDB or upstream lldb-dap through qwen-dap-mcp
↓
finds the native failure and first project-controlled frame
↓
correlates instruction operands ↔ registers ↔ locals
↓
backtracks runtime evidence toward a likely producer
↓
reads the relevant source
↓
applies a minimal evidence-backed fix
↓
builds and repeats the same reproduction
↓
verifies the original crash fingerprint no longer reproducesInstall in Qwen Code
Install directly from the GitHub release:
qwen extensions install SLP-DEV1/qwen-dap-mcpOr install the published scoped npm extension:
qwen extensions install @slp-dev1/qwen-dap-mcpThen verify the extension and MCP server:
/mcp
/skillsYou should see the qwen-dap-mcp MCP server and bundled native-runtime-debug Skill.
The GitHub release archive is self-contained: runtime npm dependencies are bundled into dist/index.js.
Use from another stdio MCP client
For MCP clients that accept a local stdio command, the published npm package can be launched with:
npx -y @slp-dev1/qwen-dap-mcpA typical client configuration looks like:
{
"mcpServers": {
"qwen-dap-mcp": {
"command": "npx",
"args": ["-y", "@slp-dev1/qwen-dap-mcp"]
}
}
}Qwen Code is the primary integration and the path covered by the project's extension packaging and release validation. The MCP server itself communicates over local stdio.
Distribution
Channel | Identifier / install path |
Qwen Code from GitHub |
|
Qwen Code from npm |
|
npm |
|
Official MCP Registry |
|
GitHub Releases | Self-contained extension archive |
Debugger adapters
CodeLLDB and upstream LLVM lldb-dap are both first-class adapter paths. Existing CodeLLDB workflows remain supported; use debug_this_crash(mode="lldb-dap") when you want the debugger adapter shipped by LLVM itself. The lldb-dap path supports live launch/attach plus read-only core-file analysis through dumpAdapter="lldb-dap".
Discovery supports an explicit adapterPath, LLDB_DAP_PATH, canonical or versioned PATH binaries, common LLVM toolchain directories / LLVM_HOME, and xcrun --find lldb-dap on macOS. See docs/lldb-dap.md for examples, postmortem behavior, and the manual full-toolset helpers.
Autonomous crash debugging
The high-level debug_this_crash workflow can drive a bounded autonomous debugging cycle:
Diagnose
↓
select project frame
↓
operand ↔ register ↔ variable evidence
↓
call-chain / runtime provenance backtrack
↓
inspect source
↓
propose minimal fix
↓
apply fix
↓
build
↓
reproduce
↓
verify fingerprint + evidence quality
├── fixed → stop
├── same crash → revise fix
├── changed crash → re-baseline active failure
├── inconclusive → finish reproduction, do not edit
└── budget exhausted / weak evidence → stop and reportStart an autonomous cycle:
debug_this_crash(
mode="codelldb",
program="C:\\build\\app.exe",
args=["--repro"],
cwd="C:\\repo\\app",
analysis={
projectRoots:["C:\\repo\\app"],
projectModules:["app.exe"],
callerDepth:3
},
workflow={
stage:"autonomous",
maxIterations:3
}
)The first call returns workflow.autonomousAgent with explicit serializable state, dependency-aware nextActions, root and active crash fingerprints, bounded history, runtime backtracking evidence, verification quality, and stop/continue status.
The server keeps no hidden autonomous-loop memory. Qwen Code performs requested source edits, builds, tests, and source-control operations through its normal authorized tools.
Autonomous statuses
Status | Meaning |
| Do not patch yet; collect stronger project/caller evidence |
| Evidence is strong enough for the first bounded source fix |
| The same active crash survived; revise the fix |
| Verification stopped too early; finish the original reproduction |
| A different crash appeared; preserve the root fingerprint and re-baseline |
| The complete reproduction ended cleanly |
| Maximum automatic fix attempts reached |
| Trustworthy evidence for another autonomous edit is unavailable |
Intelligent diagnosis
The diagnosis layer separates raw debugger facts from inference and reports:
classification— current crash/stop family,faultLocation— literal debugger stop frame,projectFrame— first likely application-controlled frame,frameSelection— scored stack-frame evidence and runtime/system exclusions,operandAnalysis— instruction operands, referenced registers, memory operands, and register↔local bindings,callChain— project callers, runtime boundaries, repeated frames, and provenance clues,hypotheses— ranked explanations with explicit confidence,fixWorkflow— candidate source location and narrow evidence-backed fix direction,verificationBaseline— compact failure signature,rootCauseBacktrack— bounded runtime provenance toward producer candidates,verificationQuality— debugger-evidence strength after verification.
A high project-frame score means “likely project code”, not “proven root cause”. Causal claims should still be tied to exception state, operands/registers/locals, caller provenance, source confirmation, and reproduction.
Crash dumps / minidumps
Open and diagnose an existing dump in one high-level call:
debug_this_crash(
mode="dump",
dumpPath="C:\\crashes\\app.dmp",
program="C:\\build\\app.exe",
sourceMap={"D:/agent/_work/project/src":"C:/work/project/src"},
analysis={projectRoots:["C:\\repo\\app"]}
)A dump session is frozen/read-only. A historical dump can establish evidence for the captured failure, but a source fix still needs a rebuilt live reproduction or a newly generated dump for verification.
Architecture
Qwen Code / MCP client
│
│ MCP over stdio
▼
qwen-dap-mcp
│
├── lifecycle/concurrency guard
├── bounded DAP snapshot layer
├── crash classification
├── project-frame scoring
├── operand/register/local correlation
├── call-chain provenance
├── runtime root-cause backtracking
├── verification fingerprints + quality scoring
└── autonomous action state machine
│
│ DAP over stdio
▼
CodeLLDB / lldb-dap / DAP adapter
│
├── authorized live target
└── crash dump / core fileThe MCP server has no HTTP listener. The adapter is spawned locally without a shell and communicates over stdio.
MCP toolsets
The default agent toolset deliberately exposes only the nine high-level tools below so coding agents do not spend context on every low-level debugger primitive. Set QWEN_DAP_MCP_TOOLSET=full when you intentionally need the complete manual DAP surface. See docs/toolsets.md.
Default agent tools
Tool | Purpose |
| High-level live/CodeLLDB/lldb-dap/dump diagnosis, verification, and autonomous orchestration |
| Intelligent diagnosis of the current stopped state |
| Fault correlation plus project-frame instruction/operand/register/local context |
| Launch/attach and race-safely wait for stop/exit/termination |
| Open a native core/minidump for read-only postmortem inspection |
| Capture a bounded raw runtime snapshot |
| Read current session status |
| Resume an authorized live target to the next stop |
| Disconnect and tear down the debugger session |
The full toolset additionally exposes manual breakpoint/watchpoint management, stepping, evaluation, threads/stacks/scopes/variables, modules, disassembly, bounded memory reads, exception controls, generic DAP launch/attach, and CodeLLDB / lldb-dap lifecycle primitives.
Verification model
Verification deliberately separates debugger evidence from external guarantees such as build success, project tests, and exact reproduction inputs.
Verdicts:
fixed— complete reproduction reached a clean successful terminal outcome,not-fixed— same crash family/signature reproduced,changed-failure— execution still crashed but the active failure signature changed,inconclusive— insufficient evidence to claim success or failure.
A breakpoint, entry stop, pause, step, or configured/first-chance exception stop is deliberately not proof of a fix.
Real Windows validation
The repository contains real CodeLLDB smoke workflows on Windows. The minidump smoke path:
compiles an MSVC C++ crash target with PDB symbols,
intentionally triggers an access violation,
writes a real
.dmpwithMiniDumpWriteDump,starts real CodeLLDB,
opens the dump through DAP,
verifies stack/source/register/module/disassembly recovery,
runs intelligent project-frame diagnosis,
validates autonomous state/fingerprint/action generation from the real dump.
Development
Requirements:
Node.js 20+
npm
Run the complete check:
npm ci --ignore-scripts
npm run checknpm run check performs TypeScript build, tests, and extension-package staging. CI runs Node 20 and 22.
Safety model
local stdio MCP transport only,
no built-in remote HTTP debugger service,
no arbitrary shell/source-writing MCP primitive,
no arbitrary memory-write MCP primitive,
no automatic source rollback without external evidence,
live attach intended only for authorized local targets,
postmortem dumps frozen against execution-control operations,
bounded autonomous fix budget with deterministic stop conditions,
weak/inconclusive evidence does not trigger another source edit,
first-chance/configured exception stops are not automatically treated as fatal.
Contributing
Issues and pull requests are welcome. See CONTRIBUTING.md for development guidance.
If the project is useful to you, starring the repository helps other Qwen Code and MCP users discover it.
License
Apache License 2.0. See LICENSE.
Maintenance
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables step-through debugging for C#, Node.js/TypeScript, Python, and Dart applications on Windows through a unified MCP interface. Acts as a bridge between MCP clients and various debug adapters, providing consistent debugging workflows with breakpoints, variable inspection, and process attachment capabilities.4ISC
- AlicenseAqualityDmaintenanceEnables AI assistants to perform interactive Python debugging with breakpoints, step execution, and variable inspection using the Debug Adapter Protocol (DAP) through an MCP server interface.81MIT
- AlicenseNot gradedqualityDmaintenanceEnables coding agents to use a real debugger (Python via debugpy) for launching, attaching, setting breakpoints, stepping through code, inspecting stack frames, and evaluating expressions through MCP tools.27MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to inspect debug state, control execution, and set breakpoints in VS Code by exposing the Debug Adapter Protocol as an MCP server.Apache 2.0
Related MCP Connectors
Agent Replay Debugger MCP — record every agent step + deterministic replay. Step-debugger for
Live browser debugging for AI assistants — DOM, console, network via MCP.
Workflow diagnostics, capability routing, and x402 settlement for MCP-compatible agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SLP-DEV1/qwen-dap-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server