dap-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Local source-code debugger using the Debug Adapter Protocol. Use it when a test fails, a program crashes, runtime state is unclear, or code behavior cannot be explained statically. Start with debug_doctor to detect the project and verify adapter readiness. Prefer debug_at for a one-call breakpoint inspection: it selects the adapter, launches, waits, evaluates expressions, and cleans up. Use debug_run when output or termination is enough. Use debug_launch only for interactive stepping or multiple inspection points. For interactive sessions: debug_launch -> get_state/evaluate -> step -> debug_disconnect. A launch with breakpoints waits by default and reports stopped, terminated, or timeout explicitly. step answers compactly (frame-local scopes, short stack) and states carry only output not reported before; use get_state for the full picture and get_output for the whole buffer. To debug an already-running or suspended process, pass breakpoints to debug_attach so they bind before it resumes. Omit sessionId when exactly one session is active. Adapter-specific DAP fields belong in launchConfig. Tool errors use isError=true.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| debug_doctorA | Inspect a local project, detect its language/tooling, select the likely debug adapter, verify the complete adapter command, and return concrete remediation. Use this before debugging or when an adapter fails to start. |
| debug_atA | Primary one-shot debugging tool for bugs and failing behavior. Auto-selects a ready adapter, launches the program, stops at file:line, evaluates expressions, reports breakpoint/termination/timeout details, and cleans up. |
| list_adaptersA | List all known debug adapters with their availability status on this machine. Returns a summary line, the full adapter list, and a separate 'missing' list with installation hints for adapters that aren't installed. |
| configure_adapterB | Register or update a debug adapter configuration and persist it to disk. |
| debug_launchA | Launch an interactive debug session. With a breakpoint or stopOnEntry, waits by default and reports whether execution stopped, terminated, or timed out. |
| debug_attachA | Attach a debug adapter to an already-running process. Pass breakpoints here rather than afterwards: they bind before the debuggee resumes, which is the only reliable way to stop a process started suspended (e.g. JDWP suspend=y). With breakpoints or exception breakpoints, waits and reports stopped, terminated, or timeout. |
| set_breakpointsB | Set breakpoints in a source file for an active debug session. |
| set_exception_breakpointsC | Configure exception breakpoints for an active debug session. |
| get_stateA | Get the current state of a debug session. If stopped, returns full stack/scopes/variables. If running, returns status and buffered output. |
| evaluateB | Evaluate an expression in the context of a stopped debug session. |
| stepA | Control execution of a debug session: continue, step over (next), step into, step out, or pause. Waits for the program to stop and returns the new state. |
| get_outputA | Get buffered stdout/stderr and debug adapter output for a session. Pass |
| debug_disconnectB | Disconnect from a debug session and optionally terminate the debuggee. |
| debug_restartA | Restart a debug session with the same adapter and launch configuration. |
| debug_inspectA | One-shot inspection: launch a program, run to a breakpoint, evaluate a list of expressions in that frame, then disconnect. Collapses launch + wait + evaluate + disconnect into a single call. Use for 'what is X at line N?' debugging. |
| list_breakpointsA | List the breakpoints currently registered with a session, grouped by source file. Includes regular breakpoints, conditional breakpoints, and logpoints. |
| debug_runA | Launch a program with no stops, let it run to completion, and return all stdout/stderr/console output. Optionally inject logpoints (breakpoints with logMessage) for printf-style debugging without modifying source. Use for 'what does this script actually do?' cases where you don't need to inspect intermediate state. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| sessions | List of all active debug sessions with their current status. |
TDQS
Scored across 17 tools
Most tools map to distinct DAP operations (launch, attach, step, evaluate, breakpoints), but the one-shot helpers debug_at and debug_inspect overlap heavily—both launch, hit a breakpoint, and evaluate expressions—and debug_run sits nearby too. Descriptions do help differentiate them, but an agent must read carefully to pick the right entry point.
All snake_case, but the verb style is split: session tools carry a debug_ prefix (debug_launch, debug_attach, debug_inspect) while peer operations are bare verbs (step, evaluate, get_state). Names like debug_at and debug_doctor don't follow a clear verb_noun pattern, weakening predictability.
17 tools is on the heavy side, and the overlap between debug_at, debug_inspect, and debug_run suggests some could be consolidated. Most tools do earn their place, so it's borderline rather than bloated.
Coverage spans adapter discovery/configuration, session lifecycle (launch, attach, restart, disconnect), breakpoints (regular, exception, list), state/output, evaluate, and step. Minor gaps exist—no explicit breakpoint removal or dedicated thread/stack queries—but these are largely workable through existing tools.