MCP Debugger
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
A headless, agentic debugger over MCP β let your AI agents debug running programs in eight languages.
π― Overview
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 step through running programs across eight languages β driving real language debuggers through the Debug Adapter Protocol (DAP).
No IDE required. mcp-debugger runs anywhere Node.js runs: CI runners, Docker containers, Kubernetes pods, SSH boxes, and the sandboxes that cloud coding agents live in. It's the debugger for where IDEs can't go.
When to use mcp-debugger vs an IDE-bound debug server
Microsoft's DebugMCP exposes VS Code's debugger over MCP and is a good choice when your agent works inside a running VS Code. The two projects make different structural trade-offs:
mcp-debugger | microsoft/DebugMCP | |
Runs headless (CI, containers, k8s, cloud agents) | β standalone Node process | β requires a running VS Code |
Transports | stdio + Streamable HTTP | Streamable HTTP (localhost) |
Distribution | npx, npm, Docker image | VS Code Marketplace extension |
Remote attach without an IDE | β debugpy / rdbg / JDWP, incl. pods via port-forward | β |
Per-session process isolation | β one proxy process per session | shares the VS Code instance |
Java hot-swap ( | β | β |
Debuggee output as subscribable MCP resource | β | β |
In-IDE debugging UX alongside the agent | β
read-only IDE mirror ( | β native |
Logpoints without pausing (prod-safe value watching) | β via VS Code | |
Content/function-addressed breakpoints ( | β agent-native addressing that survives edits | β |
Secret redaction on by default | β variable/evaluate/output masking + least-privilege mode | β |
Kubernetes ephemeral debug sidecar (native attach-by-PID) | β | |
C/C++ | β via CodeLLDB (launch + attach-by-PID) | β via VS Code extensions |
PHP | β | β via VS Code extensions |
Languages | Python, JS/TS, Ruby, Rust, Go, Java, .NET, C/C++ | Python, JS/TS, Ruby, Rust, Go, Java, .NET, C/C++, PHP |
If your agent runs in a terminal, a pipeline, or a cloud sandbox β or needs to attach to a process on another machine β you want mcp-debugger.
π v0.24.0 β C/C++ debugging lands (CodeLLDB: prebuilt binaries, auto-compiled single sources, attach by PID), alongside statement/function-addressed breakpoints, logpoints,
restart_debugging, breakpoint management tools, bufferedget_output, break-on-uncaught-exceptions by default, a read-only IDE mirror (expose_session), default-on secret redaction, and a multi-language Docker image (Python, JS, Java, Rust, C/C++ native; Ruby attach). See the CHANGELOG for the full release history.
Related MCP server: cdp-tools-mcp
β¨ Key Features
π Multi-language support β Clean adapter pattern for any language
π Python debugging via debugpy β Full DAP protocol support
π Ruby debugging via rdbg β Launch and attach workflows, including remote attach to containers and Kubernetes pods
π¨ JavaScript (Node.js) debugging via js-debug β VSCode's proven debugger
π¦ Rust debugging via CodeLLDB β Debug Rust & Cargo projects (Linux/macOS; Windows needs the GNU toolchain β see Rust on Windows)
πΉ Go debugging via Delve β Full DAP support for Go programs
β Java debugging via JDI bridge β Launch and attach modes with JDK 21+
π· .NET/C# debugging via netcoredbg β Debug .NET applications with full DAP support
βοΈ C/C++ debugging via CodeLLDB β Launch prebuilt binaries or lone source files (auto-compiled), attach by PID; core dumps and gdbserver/rr targets via config pass-through
π§ͺ Mock adapter for testing β Test without external dependencies
π°οΈ Out-of-IDE & remote attach β Attach over host/port to a process on another machine or inside a container (Python via debugpy, Ruby via rdbg, Java via JDWP) with source-path mapping, or by PID for native code (C/C++) β direct-connect attach needs no local toolchain, and
list_supported_languagesreports per-mode availability with reasonsπ― Breakpoints that survive edits β Address by content (
statement: "total = sum(prices)"), by symbol (function: "main"), or assert line content withexpectedContent; anchors re-resolve acrossrestart_debuggingand weak matches warn loudlyπͺ΅ Logpoints β
set_breakpointwithlogMessage: "x={x}"streams interpolated values intoget_outputwithout pausing β prod-safe value watching on hot pathsπ§° Full breakpoint lifecycle β
list_breakpoints/remove_breakpoint/clear_breakpointswork live mid-run;restart_debuggingrelaunches with the same config and re-applies everything in one callπ‘ Buffered program output β
get_outputreturns debuggee stdout/stderr with a cursor, and each session exposes its transcript as a subscribable MCP resourceπ₯ Crash-state debugging by default β Launch sessions pause on uncaught exceptions with stack and locals live (
breakOnExceptions; exception class/message surfaced vialastStop)πͺ Read-only IDE mirror β
expose_sessionopens a loopback, token-gated DAP endpoint so a human's IDE can inspect the agent's live session without taking controlβΈοΈ Kubernetes ephemeral debug sidecar β
kubectl debug --target+ attach-by-PID reaches native processes in running pods (guide)π STDIO and Streamable HTTP transports β Works with any MCP client (legacy SSE transport is deprecated)
π¦ Zero-runtime dependencies β Self-contained bundles via esbuild + tsup
β‘ npx ready β Run directly with
npx @debugmcp/mcp-debugger- no installation neededπ³ Docker and npm packages β Deploy anywhere
π€ Built for AI agents β Structured JSON responses for easy parsing
π Secret redaction on by default β Credential-shaped values (API keys, tokens, private keys) are masked as labeled placeholders in variable, evaluate, and output results before they reach the agent (details; opt out with
DEBUG_MCP_NO_REDACT=1)π‘οΈ Path validation β Prevents crashes from non-existent files
π AI-aware line context β Intelligent breakpoint placement with code context
β Comprehensive test suite β unit, integration, and end-to-end coverage across every adapter (CI status)
π§ Agent Skill
Tools tell an agent what it can do; a skill teaches it how to debug well. This repo ships an agent skill covering the session golden path, root-cause discipline (bisection over line-by-line stepping), attach/remote recipes, and per-language quirks:
# Claude Code (user-level)
cp -r skills/debugging ~/.claude/skills/mcp-debugger
# Cross-agent directories (Copilot CLI and friends)
cp -r skills/debugging ~/.agents/skills/mcp-debuggerThe server also serves condensed guidance in-band: MCP instructions on connect, plus a debugging-workflow prompt any MCP client can request. See skills/debugging/README.md for details.
π¬ See It In Action
Auto-debug failing CI tests β a composite GitHub Action that launches mcp-debugger + an agent on a test failure and posts the root-cause analysis
Sick pod walkthrough β attach to a misbehaving Python service in Kubernetes via port-forward (tutorial)
Native sick pod β same story for compiled code: ephemeral debug sidecar + attach-by-PID, no in-process agent required
π Quick Start
Requirements: Node.js 22+ for the server. Each language you debug also needs its own toolchain installed (Python + debugpy, Ruby + the
debuggem /rdbg, Node.js, Go + Delve, JDK 21+, .NET SDK, the Rust toolchain, or a C/C++ compiler β g++/clang++, only needed for source-file launch).CodeLLDB platform note (npx/npm installs): the npm package bundles the CodeLLDB debug engine for linux-x64 only, so Rust and C/C++ debugging work out of the box on Linux (CI, containers, cloud sandboxes). On Windows/macOS set
CODELLDB_PATHto a CodeLLDB release binary, build from source (vendors your platform automatically), or use the Docker image.
For MCP Clients (Claude Desktop, etc.)
Add to your MCP settings configuration:
{
"mcpServers": {
"mcp-debugger": {
"command": "node",
"args": ["C:/path/to/mcp-debugger/dist/index.js", "stdio", "--log-level", "debug", "--log-file", "C:/path/to/logs/debug-mcp-server.log"],
"disabled": false,
"autoApprove": ["create_debug_session", "set_breakpoint", "get_variables"]
}
}
}For Claude Code CLI
For Claude Code users, we provide an automated installation script:
Prerequisite: The Claude CLI must be installed and available on your PATH before running the installation script. See Claude Code documentation for installation instructions.
# Clone the repository
git clone https://github.com/debugmcp/mcp-debugger.git
cd mcp-debugger
# Run the installation script
./scripts/install-claude-mcp.sh
# Verify the connection (use 'claude mcp list' if claude is on your PATH)
claude mcp listImportant: 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
docker run -v $(pwd):/workspace debugmcp/mcp-debugger:latestThe Docker image debugs Python, JavaScript, Java, Rust, and C/C++ natively (toolchains + a shared vendored CodeLLDB are included), plus the mock adapter. Ruby is attach-only in the image (the adapter ships without a Ruby runtime β attach to any
rdbg --openprocess, local or remote). Only Go and .NET are disabled in the container β run those via npm/npx next to your local toolchain. Host-built Rust/C++ binaries debugged in the container get an auto-derived source map back to/workspace.list_supported_languagesreports per-mode availability (modes.launch/modes.attach) with reasons. See Docker support.
Using npm
npm install -g @debugmcp/mcp-debugger
mcp-debugger --helpOr use without installation via npx:
npx @debugmcp/mcp-debugger --helpπ How It Works
mcp-debugger exposes debugging operations as MCP tools that can be called with structured JSON parameters:
// Tool: create_debug_session
// Request:
{
"language": "python", // or "ruby", "javascript", "rust", "go", "java", "dotnet", "cpp", or "mock" for testing
"name": "My Debug Session"
}
// Response:
{
"success": true,
"sessionId": "a4d1acc8-84a8-44fe-a13e-28628c5b33c7",
"message": "Created python debug session: My Debug Session"
}π οΈ Available Tools
All 28 tools below are implemented β see the tool reference for parameters and response shapes.
Tool | Description | Status |
| Create a new debugging session | β Implemented |
| List all active sessions | β Implemented |
| Show available language adapters | β Implemented |
| Set a breakpoint in a file | β Implemented |
| List a session's breakpoints with verified state | β Implemented |
| Remove a breakpoint by id or file+line | β Implemented |
| Remove all breakpoints (optionally per file) | β Implemented |
| Start debugging a script | β Implemented |
| Relaunch with the same config, breakpoints re-applied | β Implemented |
| Attach debugger to a running process | β Implemented |
| Detach debugger from a process | β Implemented |
| Open a read-only DAP mirror endpoint so an IDE can attach and inspect | β Implemented |
| Close the mirror endpoint and disconnect IDE clients | β Implemented |
| Get the current stack trace | β Implemented |
| List all threads in the debug session | β Implemented |
| Get variable scopes for a frame | β Implemented |
| Get variables in a scope | β Implemented |
| Get local variables in current frame | β Implemented |
| Step over the current line | β Implemented |
| Step into a function | β Implemented |
| Step out of a function | β Implemented |
| Continue running | β Implemented |
| Pause running execution | β Implemented |
| Evaluate expressions in debug context | β Implemented |
| Get source code context | β Implemented |
| Read captured debuggee output (stdout/stderr) | β Implemented |
| Close a session | β Implemented |
| Hot-swap changed Java classes into a running JVM (Java only) | β Implemented |
ποΈ Architecture: Dynamic Adapter Loading
Version 0.10.0 introduces a clean adapter pattern that separates language-agnostic core functionality from language-specific implementations:
βββββββββββββββ ββββββββββββββββββ ββββββββββββββββ βββββββββββββββββββ
β MCP Client ββββββΆβ DebugMcpServer ββββββΆβSessionManagerββββββΆβ AdapterRegistry β
βββββββββββββββ ββββββββββββββββββ ββββββββββββββββ βββββββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββ βββββββββββββββββββ
β ProxyManager ββββββββ Language Adapterβ
ββββββββββββββββ βββββββββββββββββββ
β
βββββββββββββ¬ββββββββββββ¬ββββββββββββΌββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ
β β β β β β β β β
βββββββΌββββββββββββΌββββββββββββΌββββββββββββΌββββββββββββΌββββββββββββΌββββββββββββΌββββββββββββΌββββββββββββΌβββββ
βPython ββRuby ββJavaScriptββRust ββGo ββJava ββ.NET ββC/C++ ββMock β
βAdapter ββAdapter ββAdapter ββAdapter ββAdapter ββAdapter ββAdapter ββAdapter ββAdapter β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ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:
# buggy_swap.py
def swap_variables(a, b):
a = b # Bug: loses original value of 'a'
b = a # Bug: 'b' gets the new value of 'a'
return a, bStep 1: Create a Debug Session
// Tool: create_debug_session
// Request:
{
"language": "python",
"name": "Swap Bug Investigation"
}
// Response:
{
"success": true,
"sessionId": "a4d1acc8-84a8-44fe-a13e-28628c5b33c7",
"message": "Created python debug session: Swap Bug Investigation"
}Step 2: Set Breakpoints
// Tool: set_breakpoint
// Request:
{
"sessionId": "a4d1acc8-84a8-44fe-a13e-28628c5b33c7",
"file": "buggy_swap.py",
"line": 2
}
// Response:
{
"success": true,
"breakpointId": "28e06119-619e-43c0-b029-339cec2615df",
"file": "C:\\path\\to\\buggy_swap.py",
"line": 2,
"verified": false,
"message": "Breakpoint set at C:\\path\\to\\buggy_swap.py:2"
}Step 3: Start Debugging
// Tool: start_debugging
// Request:
{
"sessionId": "a4d1acc8-84a8-44fe-a13e-28628c5b33c7",
"scriptPath": "buggy_swap.py"
}
// Response:
{
"success": true,
"state": "paused",
"message": "Debugging started for buggy_swap.py. Current state: paused",
"data": {
"message": "Debugging started for buggy_swap.py. Current state: paused",
"reason": "breakpoint"
}
}Step 4: Inspect Variables
First, get the scopes:
// Tool: get_scopes
// Request:
{
"sessionId": "a4d1acc8-84a8-44fe-a13e-28628c5b33c7",
"frameId": 3
}
// Response:
{
"success": true,
"scopes": [
{
"name": "Locals",
"variablesReference": 5,
"expensive": false,
"presentationHint": "locals",
"source": {}
},
{
"name": "Globals",
"variablesReference": 6,
"expensive": false,
"source": {}
}
]
}Then get the local variables:
// Tool: get_variables
// Request:
{
"sessionId": "a4d1acc8-84a8-44fe-a13e-28628c5b33c7",
"scope": 5
}
// Response:
{
"success": true,
"variables": [
{"name": "a", "value": "10", "type": "int", "variablesReference": 0, "expandable": false},
{"name": "b", "value": "20", "type": "int", "variablesReference": 0, "expandable": false}
],
"count": 2,
"variablesReference": 5
}π 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
π Ruby Debugging Guide β Ruby debugging with
rdbg, including remote attachπ¨ JavaScript Debugging Guide β JavaScript/TypeScript features
πΉ Go Debugging Guide β Go debugging with Delve
β Java Debugging Guide β Java debugging with JDI bridge
π· .NET Debugging Guide β .NET/C# debugging with netcoredbg
βοΈ C/C++ Debugging Guide β CodeLLDB launch, auto-compile, attach-by-PID, core dumps, remote stubs
π¦ Rust Debugging Guide β CodeLLDB setup (Windows specifics)
π³ Docker Support β Container languages, attach modes, host-binary source mapping
π JIT Diagnostics Tutorial β Debug live services in Kubernetes, incl. the ephemeral-sidecar flow for compiled code
π€ Agent Debugging Guide β Correct tool usage patterns for AI agents
β οΈ Known Issues β Current caveats and workarounds
π§ Troubleshooting β Common issues & solutions
π€ Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
# Development setup
git clone https://github.com/debugmcp/mcp-debugger.git
cd mcp-debugger
# Install dependencies and vendor debug adapters
pnpm install
# Vendored debug engines (Microsoft's js-debug; CodeLLDB, shared by Rust and C/C++)
# are downloaded automatically and verified against committed SHA-256 digest pins
# Build the project
pnpm build
# Run tests
pnpm test
# Check adapter vendoring status
pnpm vendor:status
# Force re-vendor all adapters (if needed)
pnpm vendor:forceDebug Adapter Vendoring
The project automatically vendors debug adapters during pnpm install:
JavaScript: Downloads Microsoft's js-debug from GitHub releases
Rust & C/C++: Download a single shared copy of CodeLLDB for the current platform (
packages/codelldb-common)Integrity: Every download is verified against the pinned SHA-256 digests in the packages'
vendor-manifest.json; mismatches fail the buildCI Environment: Set
SKIP_ADAPTER_VENDOR=trueto skip vendoring
To manually manage adapters:
# Check current vendoring status
pnpm vendor:status
# Re-vendor all adapters
pnpm vendor
# Clean and re-vendor (force)
pnpm vendor:force
# Clean vendor directories only
pnpm clean:vendorRunning Container Tests Locally
We use Act to run GitHub Actions workflows locally:
# Build the Docker image first
docker build -t mcp-debugger:local .
# Run tests with Act (use WSL2 on Windows)
act -j build-and-test --matrix os:ubuntu-latestSee tests/README.md for detailed testing instructions.
π Project Status
β Production Ready: v0.24.0 with eight language adapters, 28 tools, and polished multi-language distribution
β Clean architecture with a dynamic adapter pattern
β Python Β· Ruby Β· JavaScript/TypeScript Β· Go Β· Java Β· .NET/C#: Full step-through debugging
π¦ Rust: Full support on Linux/macOS/Windows (Windows requires the GNU toolchain; MSVC is not supported by CodeLLDB)
βοΈ C/C++: Full step-through debugging via CodeLLDB (launch + attach-by-PID; on Windows prefer MinGW/DWARF β MSVC PDB fidelity is partial)
π’ Runtime: Node.js 22+
π Active Development: Regular updates and improvements
ποΈ Who Maintains This
mcp-debugger is stewarded by Sycamore LLC and led by John Franklin (@debugmcpdev). The project uses an agent-first development model with human accountability: AI agents write most of the code; a human maintainer makes every merge, release, and security decision. See MAINTAINERS.md, GOVERNANCE.md, and SUPPORT.md (including commercial support).
Supply-chain posture: pinned CI actions, OIDC trusted publishing, sigstore provenance on every npm package, SBOMs attached to releases, and an OpenSSF Scorecard score we actively maintain β details in SUPPLY-CHAIN-SECURITY.md. Report vulnerabilities via SECURITY.md.
π License
MIT License - see LICENSE for details.
π₯ Contributors
@Poyraxx β Ruby adapter (rdbg)
@swinyx β Go adapter (Delve)
@roofpig95008 β Java adapter (JDI bridge)
π Acknowledgments
Built with:
Model Context Protocol by Anthropic
Debug Adapter Protocol by Microsoft
debugpy for Python debugging
debug for Ruby debugging
Give your AI agents a real debugger β in any language.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to debug JavaScript and TypeScript applications by connecting to Chrome DevTools Protocol-compatible debuggers, allowing them to set breakpoints, step through code, inspect variables, and evaluate expressions with full source map support.18142Apache 2.0
- AlicenseBqualityCmaintenanceEnables AI agents to debug code and automate browsers using Chrome DevTools Protocol, supporting breakpoints, variable inspection, and replayable interaction recording.3523416MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to debug code inside VS Code by setting breakpoints, stepping through execution, inspecting variables, and evaluating expressions across multiple languages.478MIT
- AlicenseBqualityCmaintenanceEnables AI agents to debug C/C++ programs with GDB or LLDB, supporting breakpoints, stepping, variable inspection, and function calls.20MIT
Related MCP Connectors
Agent Replay Debugger MCP β record every agent step + deterministic replay. Step-debugger for
Live browser debugging for AI assistants β DOM, console, network via MCP.
Shared debugging memory for AI coding agents
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/debugmcp/mcp-debugger'
If you have feedback or need assistance with the MCP directory API, please join our Discord server