You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8bc17fb
Browse filesBrowse the repository at this point in the historyBrowse files
mcp-debugger is a Model Context Protocol (MCP) server that provides debugging tools as structured API calls. It enables AI agents to perform step-through debugging of multiple programming languages using the Debug Adapter Protocol (DAP).
18
+
mcp-debugger is a Model Context Protocol (MCP) server that exposes step-through debugging as structured tool calls. It lets AI agents set breakpoints, inspect variables, evaluate expressions, and stepthrough running programs across six languages — driving real language debuggers through the Debug Adapter Protocol (DAP).
19
19
20
-
> 🆕 Version 0.19.0: Java debugging via JDI bridge with launch and attach modes! Plus Go debugging with Delve.
21
-
22
-
> 🆕 Version 0.17.0: Rust debugging support! Debug Rust programs with CodeLLDB on Linux/macOS, including Cargo projects, async code, and full variable inspection—plus step commands now return the active source context so agents keep their place automatically.
23
-
24
-
> 🔥 Version 0.16.0: JavaScript/Node.js debugging support! Full debugging capabilities with bundled js-debug, TypeScript support, and zero-runtime dependencies via improved npx distribution.
25
-
26
-
> 🎬 **Demo Video**: See the debugger in action!
27
-
>
28
-
> *Recording in progress - This will show an AI agent discovering and fixing the variable swap bug in real-time*
29
-
>
30
-
> <!-- To capture this demo, see examples/visualizer/demo_script.md -->
> <em>AI agent discovering and fixing a variable swap bug in real-time</em>
36
-
> </div>
37
-
> -->
20
+
> 🆕 **v0.21.0** — the minimum runtime is now **Node.js 22+** (Node 20 reached end-of-life). See the [CHANGELOG](./CHANGELOG.md) for the full release history.
38
21
39
22
## ✨ Key Features
40
23
41
24
- 🌐 **Multi-language support** – Clean adapter pattern for any language
42
25
- 🐍 **Python debugging via debugpy** – Full DAP protocol support
- 🦀 **Rust debugging via CodeLLDB** – Debug Rust & Cargo projects (Linux/macOS/Windows with GNU toolchain)
27
+
- 🦀 **Rust debugging via CodeLLDB** – Debug Rust & Cargo projects (Linux/macOS; Windows needs the GNU toolchain — see [Rust on Windows](docs/rust-debugging-windows.md))
45
28
- 🐹 **Go debugging via Delve** – Full DAP support for Go programs
46
29
- ☕ **Java debugging via JDI bridge** – Launch and attach modes with JDK 21+
47
30
- 🔷 **.NET/C# debugging via netcoredbg** – Debug .NET applications with full DAP support
48
-
> WARNING: On Windows, use the GNU toolchain for full variable inspection. Run `mcp-debugger check-rust-binary <path-to-exe>` to verify your build and see [Rust Debugging on Windows](docs/rust-debugging-windows.md) for detailed guidance.
49
-
> NOTE: The published npm bundle ships the Linux x64 CodeLLDB runtime to stay under registry size limits. On macOS or Windows, point the `CODELLDB_PATH` environment variable at an existing CodeLLDB installation (for example from the VSCode extension) or clone the repo and run `pnpm --filter @debugmcp/adapter-rust run build:adapter` to vendor your platform binaries locally.
50
-
51
-
### Windows Rust Setup Script
52
-
53
-
If you're on Windows and want the quickest path to a working GNU toolchain + dlltool configuration, run:
54
-
55
-
```powershell
56
-
pwsh scripts/setup/windows-rust-debug.ps1
57
-
```
58
-
59
-
The script installs the `stable-gnu` toolchain (via rustup), sets up `dlltool.exe` (preferring MSYS2/MinGW when available, falling back to rustup's self-contained copy), builds the bundled Rust examples, and runs the Rust smoke tests by default. Add `-SkipTests` to opt out of running tests. Add `-UpdateUserPath` if you want the dlltool path persisted to your user PATH/DLLTOOL variables.
60
-
61
-
The script will also attempt to provision an MSYS2-based MinGW-w64 toolchain (via winget + pacman) so `cargo +stable-gnu` has a fully functional `dlltool/ld/as` stack. If MSYS2 is already installed, it simply reuses it; otherwise it guides you through installing it (or warns so you can install manually).
62
31
- 🧪 **Mock adapter for testing** – Test without external dependencies
32
+
- 🛰️ **Out-of-IDE & remote attach** – Attach over host/port to a process on another machine or inside a container (Python via debugpy, Java via JDWP), with source-path mapping
63
33
- 🔌 **STDIO and Streamable HTTP transports** – Works with any MCP client (legacy SSE transport is deprecated)
- 🤖 **Built for AI agents** – Structured JSON responses for easy parsing
69
38
- 🛡️ **Path validation** – Prevents crashes from non-existent files
70
39
- 📝 **AI-aware line context** – Intelligent breakpoint placement with code context
40
+
- ✅ **Comprehensive test suite** – unit, integration, and end-to-end coverage across every adapter ([CI status](https://github.com/debugmcp/mcp-debugger/actions/workflows/ci.yml))
71
41
72
42
## 🚀 Quick Start
73
43
44
+
> **Requirements:** Node.js 22+ for the server. Each language you debug also needs its own toolchain installed (Python + debugpy, Node.js, Go + Delve, JDK 21+, .NET SDK, or the Rust toolchain).
45
+
74
46
### For MCP Clients (Claude Desktop, etc.)
75
47
76
48
Add to your MCP settings configuration:
@@ -128,16 +100,6 @@ Or use without installation via npx:
128
100
npx @debugmcp/mcp-debugger --help
129
101
```
130
102
131
-
> 📸 **Screenshot**: *MCP Integration in Action*
132
-
>
133
-
> This screenshot will show real-time MCP protocol communication with tool calls and JSON responses flowing between the AI agent and debugger.
134
-
>
135
-
> <!-- To capture this screenshot, see examples/visualizer/capture_guide.md -->
136
-
> <!-- Uncomment when mcp-integration.png is available:
> *Real-time MCP protocol communication showing tool calls and responses*
139
-
> -->
140
-
141
103
## 📚 How It Works
142
104
143
105
mcp-debugger exposes debugging operations as MCP tools that can be called with structured JSON parameters:
@@ -157,16 +119,6 @@ mcp-debugger exposes debugging operations as MCP tools that can be called with s
157
119
}
158
120
```
159
121
160
-
> 📸 **Screenshot**: *Active Debugging Session*
161
-
>
162
-
> This screenshot will show the debugger paused at a breakpoint with the stack trace visible in the left panel, local variables in the right panel, and source code with line highlighting in the center.
163
-
>
164
-
> <!-- To capture this screenshot, see examples/visualizer/capture_guide.md -->
165
-
> <!-- Uncomment when debugging-session.png is available:
> *Active debugging session paused at a breakpoint with stack trace visible*
168
-
> -->
169
-
170
122
## 🛠️ Available Tools
171
123
172
124
| Tool | Description | Status |
@@ -193,16 +145,6 @@ mcp-debugger exposes debugging operations as MCP tools that can be called with s
193
145
|`close_debug_session`| Close a session | ✅ Implemented |
194
146
|`redefine_classes`| Hot-swap changed Java classes into a running JVM (Java only) | ✅ Implemented |
195
147
196
-
> 📸 **Screenshot**: *Multi-Session Debugging*
197
-
>
198
-
> This screenshot will show the debugger managing multiple concurrent debug sessions, demonstrating how AI agents can debug different scripts simultaneously with isolated session management.
199
-
>
200
-
> <!-- To capture this screenshot, see examples/visualizer/capture_guide.md -->
201
-
> <!-- Uncomment when multi-session.png is available:
Version 0.10.0 introduces a clean adapter pattern that separates language-agnostic core functionality from language-specific implementations:
@@ -355,16 +297,6 @@ Then get the local variables:
355
297
}
356
298
```
357
299
358
-
> 📸 **Screenshot**: *Variable Inspection Reveals the Bug*
359
-
>
360
-
> This screenshot will show the TUI visualizer after stepping over line 4, where both variables incorrectly show value 20, clearly demonstrating the variable swap bug. The left panel shows the execution state, the center shows the highlighted code, and the right panel displays the incorrect variable values.
361
-
>
362
-
> <!-- To capture this screenshot, see examples/visualizer/capture_guide.md -->
363
-
> <!-- Uncomment when variable-inspection.png is available:
0 commit comments