trace-mcp
Local code graph of a repository, queried over MCP for impact, call paths and context
Step-through debugging over MCP: breakpoints, stepping, stack and variables via real language debuggers
By Debug MCP JavaScript Local · stdio Developer tools
55 popularity score ★ 185 ↓ 3.2k/wk
Opens the app, which asks before it adds the server.
claude mcp add debugger -- npx -y @debugmcp/mcp-debugger stdio{
"mcpServers": {
"debugger": {
"command": "npx",
"args": [
"-y",
"@debugmcp/mcp-debugger",
"stdio"
]
}
}
}{
"mcpServers": {
"debugger": {
"command": "npx",
"args": [
"-y",
"@debugmcp/mcp-debugger",
"stdio"
]
}
}
}{
"servers": {
"debugger": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@debugmcp/mcp-debugger",
"stdio"
]
}
}
}[mcp_servers.debugger]
command = "npx"
args = ["-y", "@debugmcp/mcp-debugger", "stdio"]gemini mcp add --scope user debugger npx -- -y @debugmcp/mcp-debugger stdioOpens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
claude mcp add debugger -- docker run -i --rm -v '<ABSOLUTE_PATH>:/workspace' debugmcp/mcp-debugger:latest{
"mcpServers": {
"debugger": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"<ABSOLUTE_PATH>:/workspace",
"debugmcp/mcp-debugger:latest"
]
}
}
}{
"mcpServers": {
"debugger": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"<ABSOLUTE_PATH>:/workspace",
"debugmcp/mcp-debugger:latest"
]
}
}
}{
"servers": {
"debugger": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"<ABSOLUTE_PATH>:/workspace",
"debugmcp/mcp-debugger:latest"
]
}
}
}[mcp_servers.debugger]
command = "docker"
args = ["run", "-i", "--rm", "-v", "<ABSOLUTE_PATH>:/workspace", "debugmcp/mcp-debugger:latest"]gemini mcp add --scope user debugger docker -- run -i --rm -v '<ABSOLUTE_PATH>:/workspace' debugmcp/mcp-debugger:latestDEBUG_MCP_VARIABLE_ACCESS |
Optional: open or explicit. explicit makes the variable tools require a list of names. |
|---|---|
DEBUG_MCP_BP_ADDRESSING |
Optional: line, assert or content. line allows line numbers only, assert adds expectedContent, content adds statement and function anchors. |
DEBUG_MCP_NO_REDACT |
Optional: Set to 1 or true to turn off masking of credential-like values in results, which is on by default. |
DEBUG_MCP_DISABLE_LANGUAGES |
Optional: Comma-separated adapters to disable, e.g. go,dotnet. |
CODELLDB_PATH |
Optional: Path to a CodeLLDB binary when the optional platform package was not installed. |
In a container, a setting goes in with -e NAME=value after docker run.
mcp-debugger turns a debugger into a set of tool calls. An assistant opens a session for a language, sets breakpoints, launches a script or attaches to a running process, then steps through the code and evaluates expressions while the program is paused. Underneath it speaks the Debug Adapter Protocol to existing debuggers: debugpy for Python, rdbg for Ruby, js-debug for JavaScript and TypeScript, Delve for Go, a JDI bridge for Java, netcoredbg for .NET, CodeLLDB for Rust, C/C++ and COBOL, and the SDK's own adapters for Dart and Flutter.
It runs as a standalone Node process with no IDE, so it fits CI runners and containers as well as a terminal. Besides line breakpoints you can pin a breakpoint to a function name or to a statement's text. Logpoints record values without pausing. It keeps the program's stdout and stderr for reading back. A read-only, token-gated endpoint lets a person's IDE watch the same live session. Launch sessions pause on uncaught exceptions by default, except Ruby, where rdbg has no such filter. For Python tests, start_debugging can run a single pytest test and stop at the failing assert without a breakpoint.
Since the Dart release, continue_execution returns at once and wait_for_stop is how you block until the next stop. The Java hot-swap tool is now hot_reload, which also does Flutter hot reload. The tool schema file registers 29 tools. The old name redefine_classes is still accepted on a call, with a deprecation warning, but it is no longer listed by tools/list and goes away at 1.0.
Three settings the README only touches in a table come from the code. DEBUG_MCP_VARIABLE_ACCESS=explicit makes get_variables and get_local_variables demand a list of names instead of dumping whole scopes. DEBUG_MCP_BP_ADDRESSING=line strips the statement and function anchors from set_breakpoint. DEBUG_MCP_DISABLE_LANGUAGES takes a comma-separated list of adapters to switch off.
| Runtime | Node.js 22+ |
|---|---|
| Runs on | macOS, Windows, Linux |
| Also |
|
Each language you debug needs its own toolchain: Python with debugpy, Ruby with the debug gem (rdbg), Go with Delve, JDK 21+, the .NET SDK with netcoredbg, the Rust toolchain, g++ or clang++ for C/C++ source launch, GnuCOBOL 3.1.2+ for COBOL source launch, and the Dart or Flutter SDK (on PATH, or set DART_SDK or FLUTTER_ROOT) for Dart. Run `flutter --version` once before the first Flutter session. js-debug and CodeLLDB come with the npm package (CodeLLDB as a per-platform optional dependency, so with --omit=optional set CODELLDB_PATH). `npx @debugmcp/mcp-debugger doctor` reports what is missing. The Docker image needs a mounted workspace.
Launches answer after a short hold. If the program has not stopped by then, start_debugging, pause_execution and the other waiting tools return pending:true and leave the program running with breakpoints armed. Call wait_for_stop to keep waiting. In the Docker image Go and .NET are switched off and Flutter is missing, so run those through npx next to your own toolchain.
Suits developers who want an assistant to debug a program in a terminal, CI job, container or pod, where no IDE is running, including attaching to a remote debugpy, rdbg, JDWP or V8 inspector port. It is local, needs no account, and drives the toolchains you already have. If your assistant works inside a running VS Code and you want VS Code's own debugger, its README points to Microsoft's DebugMCP extension, which also covers PHP. Pick something else if you cannot install the per-language debuggers, or if letting an assistant launch programs and evaluate code on the machine is not acceptable.
11 only read, 18 change things. A ? marks an optional parameter.
create_debug_session changeslanguage: enumname?: stringexecutablePath?: stringhost?: stringport?: numberprocessId?: anysourcePaths?: arrayjustMyCode?: booleanbreakOnExceptions?: enumstopOnEntry?: booleantimeout?: numberverifyTimeout?: numberadapterConfig?: objectlist_supported_languageslist_debug_sessionsset_breakpoint changessessionId: stringfile?: stringline?: numbercondition?: stringlogMessage?: stringsuspendPolicy?: enumexpectedContent?: stringstatement?: stringnearLine?: numberfunction?: stringlist_breakpointssessionId: stringfile?: stringremove_breakpoint changessessionId: stringbreakpointId?: stringfunction?: stringfile?: stringline?: numberclear_breakpoints changessessionId: stringfile?: stringstart_debugging changessessionId: stringscriptPath: stringargs?: arraydapLaunchArgs?: objectdryRunSpawn?: booleanbreakOnExceptions?: enumtestRunner?: stringtestTarget?: stringadapterLaunchConfig?: objectrestart_debugging changessessionId: stringattach_to_process changessessionId: stringport?: numberhost?: stringprocessId?: anytimeout?: numberverifyTimeout?: numbersourcePaths?: arraystopOnEntry?: booleanjustMyCode?: booleanbreakOnExceptions?: enumadapterConfig?: objectdetach_from_process changessessionId: stringterminateProcess?: booleanexpose_session changessessionId: stringunexpose_session changessessionId: stringclose_debug_session changessessionId: stringstep_over changessessionId: stringstep_into changessessionId: stringstep_out changessessionId: stringcontinue_execution changessessionId: stringwait_for_stopsessionId: stringtimeout?: numberpause_execution changessessionId: stringlist_threadssessionId: stringget_variablessessionId: stringscope: numbernames?: arrayget_local_variablessessionId: stringincludeSpecial?: booleannames?: arrayget_stack_tracesessionId: stringincludeInternals?: booleanthreadId?: numberget_scopessessionId: stringframeId: numberevaluate_expression changessessionId: stringexpression: stringframeId?: numbertimeout?: numberget_source_contextsessionId: stringfile: stringline: numberlinesContext?: numberget_outputsessionId: stringsince?: numberlimit?: numberhot_reload changessessionId: stringclassesDir?: stringsinceTimestamp?: numbertimeout?: number