The MCP Debugger is a multi-language debugging server that enables AI agents to perform step-through debugging through the Debug Adapter Protocol (DAP). It provides structured API calls with JSON responses for debugging Python, JavaScript/Node.js, Rust, and Go, with a mock adapter for testing.
Core Capabilities:
Session Management: Create, list, and close independent debugging sessions for different languages and projects
Breakpoint Control: Set breakpoints at specific file paths and line numbers with support for conditional breakpoints and AI-aware intelligent placement
Execution Control: Start debugging scripts with custom arguments and adapter-specific launch configurations, then step over/into/out, continue execution, or pause (pause currently not implemented)
State Inspection: Retrieve stack traces with optional filtering of internal frames, examine variable scopes (Locals, Globals, etc.) for any frame, and access variables using variablesReference numbers or quickly get local variables for the current frame
Expression Evaluation: Evaluate arbitrary expressions in the debug context to read or modify program state (currently defined but not implemented)
Source Context: Retrieve code snippets around specific lines for better debugging visibility
Language Discovery: List all supported debugging languages with their metadata
Key Features:
Auto-detection of language executables (debugpy for Python, js-debug for Node.js, CodeLLDB for Rust) with optional manual path specification
Handles both absolute and relative file paths with validation to prevent crashes
Optional filtering of special variables and internal stack frames for cleaner output
Clean adapter architecture supporting dynamic loading and future language support (Ruby, C/C++)
Flexible deployment via npm, npx (zero-runtime dependencies), or Docker with STDIO and SSE transport modes
Enables step-through debugging for JavaScript applications with tools for managing breakpoints, stack traces, and variable scopes.
Supports debugging of Node.js applications, providing tools to control execution and inspect program state through the Debug Adapter Protocol.
Provides debugging capabilities for Python code, including setting breakpoints, inspecting variables, and stepping through execution using debugpy.
Supports debugging Rust programs and Cargo projects, enabling variable inspection and source context tracking via CodeLLDB.
Provides debugging support for TypeScript projects, allowing for interactive code execution and inspection within the MCP environment.
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., "@MCP Debuggerdebug this Python script and show me the variables at line 15"
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.
mcp-debugger
MCP server for multi-language debugging β give your AI agents debugging superpowers π
π― Overview
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).
π Version 0.18.0: Go debugging support! Debug Go programs with Delve.
π Version 0.17.0: Rust debugging support (Alpha)! Debug Rust programs with CodeLLDB, including Cargo projects, async code, and full variable inspectionβplus step commands now return the active source context so agents keep their place automatically.
π₯ Version 0.16.0: JavaScript/Node.js debugging support (Alpha)! Full debugging capabilities with bundled js-debug, TypeScript support, and zero-runtime dependencies via improved npx distribution.
π¬ Demo Video: See the debugger in action!
Recording in progress - This will show an AI agent discovering and fixing the variable swap bug in real-time
β¨ Key Features
π Multi-language support β Clean adapter pattern for any language
π Python debugging via debugpy β Full DAP protocol support
π¨ JavaScript (Node.js) debugging via js-debug β VSCode's proven debugger (Alpha)
π¦ Rust debugging via CodeLLDB β Debug Rust & Cargo projects (Alpha)
πΉ Go debugging via Delve β Full DAP support for Go programs
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 for detailed guidance. NOTE: The published npm bundle ships the Linux x64 CodeLLDB runtime to stay under registry size limits. On macOS or Windows, point theCODELLDB_PATHenvironment variable at an existing CodeLLDB installation (for example from the VSCode extension) or clone the repo and runpnpm --filter @debugmcp/adapter-rust run build:adapterto vendor your platform binaries locally.
Windows Rust Setup Script
If you're on Windows and want the quickest path to a working GNU toolchain + dlltool configuration, run:
The script installs the stable-gnu toolchain (via rustup), exposes dlltool.exe from rustup's self-contained directory, builds the bundled Rust examples, and (optionally) runs the Rust smoke tests. Add -UpdateUserPath if you want the dlltool path persisted to your user PATH/DLLTOOL variables.
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).
π§ͺ Mock adapter for testing β Test without external dependencies
π STDIO and SSE transport modes β Works with any MCP client
π¦ Zero-runtime dependencies β Self-contained bundles via tsup (~3 MB)
β‘ npx ready β Run directly with
npx @debugmcp/mcp-debugger- no installation neededπ 1019 tests passing β battle-tested end-to-end
π³ Docker and npm packages β Deploy anywhere
π€ Built for AI agents β Structured JSON responses for easy parsing
π‘οΈ Path validation β Prevents crashes from non-existent files
π AI-aware line context β Intelligent breakpoint placement with code context
π Quick Start
For MCP Clients (Claude Desktop, etc.)
Add to your MCP settings configuration:
For Claude Code CLI
For Claude Code users, we provide an automated installation script:
Important: The stdio argument is required to prevent console output from corrupting the JSON-RPC protocol. See CLAUDE.md for detailed setup and troubleshooting.
Using Docker
β οΈ The Docker image intentionally ships only the Python and JavaScript adapters. Rust debugging requires the local, SSE, or packed deployments where the adapter runs next to your toolchain.
Using npm
Or use without installation via npx:
πΈ Screenshot: MCP Integration in Action
This screenshot will show real-time MCP protocol communication with tool calls and JSON responses flowing between the AI agent and debugger.
π How It Works
mcp-debugger exposes debugging operations as MCP tools that can be called with structured JSON parameters:
πΈ Screenshot: Active Debugging Session
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.
π οΈ Available Tools
Tool | Description | Status |
| Create a new debugging session | β Implemented |
| List all active sessions | β Implemented |
| Set a breakpoint in a file | β Implemented |
| Start debugging a script | β Implemented |
| Get the current stack trace | β Implemented |
| Get variable scopes for a frame | β Implemented |
| Get variables in a scope | β Implemented |
| Step over the current line | β Implemented |
| Step into a function | β Implemented |
| Step out of a function | β Implemented |
| Continue running | β Implemented |
| Close a session | β Implemented |
| Pause running execution | β Not Implemented |
| Evaluate expressions | β Not Implemented |
| Get source code context | β Implemented |
πΈ Screenshot: Multi-Session Debugging
This screenshot will show the debugger managing multiple concurrent debug sessions, demonstrating how AI agents can debug different scripts simultaneously with isolated session management.
ποΈ Architecture: Dynamic Adapter Loading
Version 0.10.0 introduces a clean adapter pattern that separates language-agnostic core functionality from language-specific implementations:
Adding Language Support
Want to add debugging support for your favorite language? Check out the Adapter Development Guide!
π‘ Example: Debugging Python Code
Here's a complete debugging session example:
Step 1: Create a Debug Session
Step 2: Set Breakpoints
Step 3: Start Debugging
Step 4: Inspect Variables
First, get the scopes:
Then get the local variables:
πΈ Screenshot: Variable Inspection Reveals the Bug
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.
π Documentation
π Tool Reference β Complete API documentation
π¦ Getting Started Guide β First-time setup
ποΈ Architecture Overview β Multi-language design
π§ Adapter Development β Add new languages
π Dynamic Loading Architecture β Runtime discovery, lazy loading, caching
π§© Adapter API Reference β Adapter, factory, loader, and registry contracts
π Migration Guide β Upgrading to v0.15.0 (dynamic loading)
π Python Debugging Guide β Python-specific features
π¨ JavaScript Debugging Guide β JavaScript/TypeScript features
πΉ Go Debugging Guide β Go debugging with Delve
Rust Debugging on Windows - Toolchain requirements and troubleshooting
π€ AI Integration Guide β Leverage AI-friendly features
π§ Troubleshooting β Common issues & solutions
π€ Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Debug Adapter Vendoring
The project automatically vendors debug adapters during pnpm install:
JavaScript: Downloads Microsoft's js-debug from GitHub releases
Rust: Downloads CodeLLDB binaries for the current platform
CI Environment: Set
SKIP_ADAPTER_VENDOR=trueto skip vendoring
To manually manage adapters:
Running Container Tests Locally
We use Act to run GitHub Actions workflows locally:
See tests/README.md for detailed testing instructions.
π Project Status
β Production Ready: v0.18.0 with Go debugging support via Delve, Rust adapter (Alpha), and polished multi-language distribution
β 1569 tests passing end-to-end
β Clean architecture with adapter pattern
π¨ JavaScript/Node.js: Alpha support with full debugging loop
β Go: Full debugging support via Delve DAP
π§ Coming Soon: Ruby, C/C++, and more language adapters
π Active Development: Regular updates and improvements
See Roadmap.md for planned features.
π License
MIT License - see LICENSE for details.
π Acknowledgments
Built with:
Model Context Protocol by Anthropic
Debug Adapter Protocol by Microsoft
debugpy for Python debugging
Give your AI the power to debug like a developer β in any language! π―