Skip to main content
Glama

mcp-debugger

A headless, agentic debugger over MCP โ€” let your AI agents debug running programs in seven languages.

CI codecov npm version Docker Pulls License: MIT OpenSSF Scorecard OpenSSF Best Practices

๐ŸŽฏ 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 seven 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 (redefine_classes)

โœ…

โŒ

Debuggee output as subscribable MCP resource

โœ…

โŒ

In-IDE debugging UX alongside the agent

โœ… read-only IDE mirror (expose_session, #217)

โœ… native

C/C++, PHP

โŒ

โœ… via VS Code extensions

Languages

Python, JS/TS, Ruby, Rust, Go, Java, .NET

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.22.0 โ€” Ruby debugging support lands (launch + attach via rdbg, including remote attach to containers and Kubernetes pods), alongside JavaScript attach-mode fixes and session/proxy lifecycle hardening. 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

  • ๐Ÿงช 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

  • ๐Ÿ”Œ 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-debugger

The 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.

๐Ÿš€ Quick Start

Requirements: Node.js 22+ for the server. Each language you debug also needs its own toolchain installed (Python + debugpy, Ruby + the debug gem / rdbg, Node.js, Go + Delve, JDK 21+, .NET SDK, or the Rust toolchain).

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 list

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

docker run -v $(pwd):/workspace debugmcp/mcp-debugger:latest

โš ๏ธ The Docker image bundles the toolchains for Python, JavaScript, and Java debugging (Rust, Go, and .NET are disabled inside the container image, and the image does not include a Ruby runtime). For those languages, run the server via npm/npx next to your local toolchain โ€” or, for Ruby, use remote attach to a rdbg --open process inside the container (see the Ruby guide). Adapters load dynamically at runtime โ€” list_supported_languages reports only those whose toolchain is detected.

Using npm

npm install -g @debugmcp/mcp-debugger
mcp-debugger --help

Or 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", 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

Tool

Description

Status

create_debug_session

Create a new debugging session

โœ… Implemented

list_debug_sessions

List all active sessions

โœ… Implemented

list_supported_languages

Show available language adapters

โœ… Implemented

set_breakpoint

Set a breakpoint in a file

โœ… Implemented

list_breakpoints

List a session's breakpoints with verified state

โœ… Implemented

remove_breakpoint

Remove a breakpoint by id or file+line

โœ… Implemented

clear_breakpoints

Remove all breakpoints (optionally per file)

โœ… Implemented

start_debugging

Start debugging a script

โœ… Implemented

restart_debugging

Relaunch with the same config, breakpoints re-applied

โœ… Implemented

attach_to_process

Attach debugger to a running process

โœ… Implemented

detach_from_process

Detach debugger from a process

โœ… Implemented

expose_session

Open a read-only DAP mirror endpoint so an IDE can attach and inspect

โœ… Implemented

unexpose_session

Close the mirror endpoint and disconnect IDE clients

โœ… Implemented

get_stack_trace

Get the current stack trace

โœ… Implemented

list_threads

List all threads in the debug session

โœ… Implemented

get_scopes

Get variable scopes for a frame

โœ… Implemented

get_variables

Get variables in a scope

โœ… Implemented

get_local_variables

Get local variables in current frame

โœ… Implemented

step_over

Step over the current line

โœ… Implemented

step_into

Step into a function

โœ… Implemented

step_out

Step out of a function

โœ… Implemented

continue_execution

Continue running

โœ… Implemented

pause_execution

Pause running execution

โœ… Implemented

evaluate_expression

Evaluate expressions in debug context

โœ… Implemented

get_source_context

Get source code context

โœ… Implemented

get_output

Read captured debuggee output (stdout/stderr)

โœ… Implemented

close_debug_session

Close a session

โœ… Implemented

redefine_classes

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      โ”‚โ”‚Mock      โ”‚
        โ”‚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, b

Step 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

๐Ÿค 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
# All debug adapters (JavaScript js-debug, Rust CodeLLDB) are automatically downloaded

# 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:force

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=true to 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:vendor

Running 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-latest

See tests/README.md for detailed testing instructions.

๐Ÿ“Š Project Status

  • โœ… Production Ready: v0.22.0 with seven language adapters 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)

  • ๐ŸŸข 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

๐Ÿ™ Acknowledgments

Built with:


Give your AI agents a real debugger โ€” in any language.

Install Server
A
license - permissive license
C
quality
A
maintenance

Maintenance

โ€“Maintainers
2dResponse time
4wRelease cycle
12Releases (12mo)
Commit activity
Issues opened vs closed

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

  • A
    license
    A
    quality
    C
    maintenance
    Enables 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.
    18
    15
    2
    Apache 2.0
  • A
    license
    B
    quality
    C
    maintenance
    Enables AI agents to debug code and automate browsers using Chrome DevTools Protocol, supporting breakpoints, variable inspection, and replayable interaction recording.
    35
    860
    16
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Enables AI agents to debug code inside VS Code by setting breakpoints, stepping through execution, inspecting variables, and evaluating expressions across multiple languages.
    459
    MIT

View all related MCP servers

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

View all MCP Connectors

Latest Blog Posts

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