Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

delve-mcp

MCP.Pizza Chef: dwisiswant0

delve-mcp is a TypeScript-based MCP server that fully integrates the Delve debugger for Go programs. It exposes all major Delve commands and debugging capabilities as MCP tools, enabling session management, breakpoint control, variable inspection, program tracing, and replay debugging. It supports multiple backends and provides JSON metadata for debug sessions, facilitating advanced debugging workflows within MCP-enabled environments.

Use This MCP server To

Manage and inspect Go debug sessions via MCP protocol Set and control breakpoints with conditions in Go programs Perform step-by-step execution and trace Go applications Analyze core dumps and replay debugging sessions Integrate Delve debugging into MCP-enabled IDEs or tools Evaluate variables and expressions during debugging Switch between native, lldb, and rr debugging backends Configure logging and debug session parameters dynamically

README

delve-mcp

MCP server for Delve debugger integration

This is a TypeScript-based MCP server that provides a complete interface to the Delve debugger for Go programs. It implements all major Delve commands and capabilities through MCP tools.

Features

Resources

  • List and access debug sessions via delve:// URIs
  • Each session has metadata about its type, target, and port
  • JSON representation for session details and state

Tools

Debug, trace, and analyze Go programs with:

  • Debug commands (debug, attach, exec, test)
  • Core dump analysis
  • Program tracing
  • Replay debugging with rr
  • DAP server support
  • Breakpoint management with conditions
  • Execution control (continue, step, next)
  • Variable inspection and evaluation
  • Backend selection (native, lldb, rr)
  • Logging configuration
  • Session management

Environment Setup

The server requires:

  • Go installed with Delve (go install github.com/go-delve/delve/cmd/dlv@latest)
  • For replay functionality: Mozilla rr (https://github.com/mozilla/rr)
  • Node.js and npm

Installation

To install Delve MCP server:

npm install @dwisiswant0/delve-mcp

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Configuration

To use with Claude Desktop, add the server config:

  • On Linux: ~/.config/Claude/claude_desktop_config.json.
  • On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json.
  • On Windows: %APPDATA%/Claude/claude_desktop_config.json.
{
  "mcpServers": {
    "delve-mcp": {
      "command": "/path/to/delve-mcp/build/index.js"
    }
  }
}

Available Tools

Debug Commands

  • debug - Debug a Go package in current directory or specified package
  • attach - Attach to a running process by PID
  • exec - Execute and debug a precompiled binary
  • test - Debug tests in current package or specified package
  • core - Examine a core dump file with associated executable
  • dap - Start a Debug Adapter Protocol (DAP) server
  • replay - Replay an rr trace recording
  • trace - Trace program execution with function matching

Control Commands

  • setBreakpoint - Set a breakpoint with optional condition
  • removeBreakpoint - Remove an existing breakpoint
  • continue - Continue program execution
  • next - Step over to next line
  • step - Step into function call
  • stepout - Step out of current function
  • variables - List local variables in current scope
  • evaluate - Evaluate expression in current scope

Configuration Commands

  • version - Get Delve version information
  • setBackend - Configure debug backend (native, lldb, rr)
  • configureLogging - Configure debug logging components

Usage Examples

Starting a Debug Session

// Debug current package
{ name: "debug" }

// Debug with specific package and build flags
{
  name: "debug",
  arguments: {
    package: "./cmd/myapp",
    buildFlags: "-tags=integration"
  }
}

Managing Breakpoints

// Set a breakpoint
{
  name: "setBreakpoint",
  arguments: {
    sessionId: "abc123",
    file: "main.go",
    line: 42,
    condition: "count > 5"
  }
}

Inspecting State

// List variables
{
  name: "variables",
  arguments: {
    sessionId: "abc123"
  }
}

// Evaluate expression
{
  name: "evaluate",
  arguments: {
    sessionId: "abc123",
    expr: "myVar.Field"
  }
}

License

MIT.

delve-mcp FAQ

How do I set up delve-mcp for use?
Install Go and Delve debugger, then run delve-mcp as an MCP server to expose debugging tools.
Can delve-mcp handle replay debugging?
Yes, it supports replay debugging using the rr backend for deterministic replay.
What debugging backends does delve-mcp support?
It supports native Delve, LLDB, and rr backends for flexible debugging options.
How does delve-mcp expose debug sessions?
Debug sessions are accessible via delve:// URIs with JSON metadata describing session state and details.
Is delve-mcp limited to local debugging?
No, it can attach to remote processes and supports session management for multiple targets.
Can I manage breakpoints with conditions?
Yes, delve-mcp supports conditional breakpoints and full breakpoint management.
Does delve-mcp support variable inspection?
Yes, it allows inspection and evaluation of variables during debugging sessions.
What LLM providers can integrate with delve-mcp?
It is compatible with OpenAI, Anthropic Claude, and Google Gemini through MCP clients.