Skip to content

sgoodluck/dapug

Repository files navigation

dapug

MCP server that gives AI agents real debugger access.

dapug

What is this

Dapug is an MCP server that gives AI agents real debugger access. It connects to language-specific debug adapters (DAP) so an agent can set breakpoints, run programs, inspect variables, step through code, and diagnose bugs -- all through standard MCP tool calls with no human in the loop.

Installation

From crates.io

cargo install dapug

Prebuilt binaries

Download a prebuilt binary from GitHub Releases. Available platforms:

  • x86_64 Linux (musl, static)
  • aarch64 Linux (musl, static)
  • x86_64 macOS
  • aarch64 macOS (Apple Silicon)

Prerequisites

Dapug requires a debug adapter for each language you want to debug.

Language Adapter Install
Python debugpy pip install debugpy
Go Delve (dlv) go install github.com/go-delve/delve/cmd/dlv@latest
JavaScript/TypeScript js-debug Included with VS Code, or install via vscode-js-debug

Configuration

Claude Code

Option 1 -- CLI:

claude mcp add --transport stdio --scope user dapug -- dapug

Option 2 -- add to .mcp.json in your project root:

{
  "mcpServers": {
    "dapug": {
      "command": "dapug",
      "args": []
    }
  }
}

Claude Desktop

Add to your config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "dapug": {
      "command": "dapug",
      "args": []
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "dapug": {
      "command": "dapug",
      "args": []
    }
  }
}

Available Tools

Tool Description
start_session Start a debug session for a program. Returns a session ID.
set_breakpoint Set a breakpoint at a specific line in a source file.
run Start program execution after setting breakpoints.
wait_for_stop Wait for the program to stop at a breakpoint, exception, or exit. Returns stop location and local variables.
step_over Step over one line.
step_into Step into the function call on the current line.
step_out Step out of the current function.
continue Continue execution until next breakpoint or exit.
inspect Evaluate an expression in the current stopped frame.
get_stack_trace Get the current call stack with file, line, and function name.
end_session End a debug session and free all resources.
list_sessions List all active debug sessions.
end_all_sessions End all active debug sessions.

License

MIT OR Apache-2.0

About

dap-mcp written in rust

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages