# MCP Debugger

> Debug running programs with AI agents over MCP.

- **URL**: https://followmcp.com/en/servers/mcp-debugger
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 198
- **FMRS Score**: 57/100 (Grade C)
- **Source**: https://github.com/debugmcp/mcp-debugger
- **Transports**: stdio (local process), Streamable HTTP
- **Runtimes**: Node.js 22+
- **Auth**: No credential needed

## Overview
MCP Debugger is a headless debugging server that exposes breakpoints, stepping, variable inspection, and expression evaluation as structured tools. It drives language debuggers through the Debug Adapter Protocol and supports Python, Ruby, JavaScript/TypeScript, Rust, Go, Java, .NET, C/C++, COBOL, and Dart/Flutter. It offers stdio and Streamable HTTP transports and can launch programs or attach to running processes.

## Best for
- AI agent workflows that need debugging through structured MCP tools.
- Developers who can provide the target source, runtime, and required debugging tools.
- Teams debugging from terminals, containers, or remote environments.

## Not for
- Users who need a graphical IDE as their primary debugging interface.
- Environments that cannot provide the target process, source, or required language debugging dependencies.
- Users expecting identical capabilities across every language and deployment mode.

## Required permissions
- When starting a debug session, the server may need access to project files and permission to launch the target program.
- Attaching requires access to the target process or its debugging port; native code can be attached to by process ID.
- Docker use requires mounting the host workspace at /workspace in the container.
- HTTP mode accepts debugger tool requests; it binds to 127.0.0.1 by default, and a non-loopback bind should have an appropriate access boundary.

## Risks
- Debugging tools can start programs, pause processes, and inspect runtime variables; attaching to a production service may affect its operation.
- The README says credential-shaped values in variables, expressions, and output are redacted by default, but this does not establish that every sensitive value will be detected.
- The README notes that logpoints can slow some programs; after attaching to a Node.js process by PID, the inspector port may remain open after detaching.
- Clients of one HTTP server process share its debug sessions; a client holding a session ID can access that session.

## Client config (JSON)
```json
{"mcpServers":{"mcp-debugger":{"command":"npx","args":["-y","@debugmcp/mcp-debugger","stdio"]}}}
```

## Tools (29)
- `create_debug_session`: Create a debugging session.
- `list_debug_sessions`: List active debugging sessions.
- `list_supported_languages`: Show available language adapters and their supported modes.
- `set_breakpoint`: Set a breakpoint in a file.
- `list_breakpoints`: List a session's breakpoints and their verification state.
- `remove_breakpoint`: Remove a breakpoint by ID or by file and line.
- `clear_breakpoints`: Clear all breakpoints or those in a specified file.
- `start_debugging`: Start debugging a program or test.
- `restart_debugging`: Relaunch debugging with the same configuration and reapply breakpoints.
- `attach_to_process`: Attach the debugger to a running process.
- `detach_from_process`: Detach the debugger from a process.
- `expose_session`: Open a read-only DAP mirror endpoint for an IDE to inspect the session.
- `unexpose_session`: Close the mirror endpoint and disconnect IDE clients.
- `get_stack_trace`: Get the current stack trace.
- `list_threads`: List threads in the debugging session.
- `get_scopes`: Get variable scopes for a stack frame.
- `get_variables`: Get variables in a scope.
- `get_local_variables`: Get local variables in the current frame.
- `step_over`: Step over the current line.
- `step_into`: Step into a function.
- `step_out`: Step out of the current function.
- `continue_execution`: Continue program execution.
- `wait_for_stop`: Wait until the session pauses or ends.
- `pause_execution`: Pause running execution.
- `evaluate_expression`: Evaluate an expression in the debugging context.
- `get_source_context`: Get source code context.
- `get_output`: Read captured standard output and standard error.
- `close_debug_session`: Close a debugging session.
- `hot_reload`: Apply code changes to a running program while preserving its state; support depends on the language and runtime.
