Delve MCP
Supported platform for running the Delve MCP server with specific configuration paths.
Supported platform for running the Delve MCP server with specific configuration paths.
Provides integration with Mozilla's rr tool for replay debugging of Go programs, allowing historical execution tracing and analysis.
Required runtime environment for the server, enabling the execution of the TypeScript-based MCP implementation.
Used for package management and distribution of the delve-mcp server.
Implements a TypeScript-based MCP server that interfaces with the Delve debugger for Go programs.
Click on "Deploy 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., "@Delve MCP debug myapp and set a breakpoint at main.go line 42"
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.
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://URIsEach 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
rrDAP 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
Related MCP server: MCP-Typescribe
Installation
To install Delve MCP server:
npm install @dwisiswant0/delve-mcpDevelopment
Install dependencies:
npm installBuild the server:
npm run buildFor development with auto-rebuild:
npm run watchConfiguration
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 packageattach- Attach to a running process by PIDexec- Execute and debug a precompiled binarytest- Debug tests in current package or specified packagecore- Examine a core dump file with associated executabledap- Start a Debug Adapter Protocol (DAP) serverreplay- Replay an rr trace recordingtrace- Trace program execution with function matching
Control Commands
setBreakpoint- Set a breakpoint with optional conditionremoveBreakpoint- Remove an existing breakpointcontinue- Continue program executionnext- Step over to next linestep- Step into function callstepout- Step out of current functionvariables- List local variables in current scopeevaluate- Evaluate expression in current scope
Configuration Commands
version- Get Delve version informationsetBackend- 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.
Available Tools
19 toolsattachC
Attach to a running process
Inputs: pid (required).
configureLoggingC
Configure debug logging
Inputs: components (required), destination.
continueC
Continue program execution
Inputs: sessionId (required).
coreB
Examine a core dump
Inputs: executable (required), corePath (required).
dapC
Start a DAP (Debug Adapter Protocol) server
Inputs: clientAddr.
debugC
Start debugging a Go package
Inputs: package, buildFlags.
evaluateC
Evaluate an expression in current scope
Inputs: sessionId (required), expr (required).
execC
Debug a precompiled binary
Inputs: binary (required), args.
nextC
Step over to next line
Inputs: sessionId (required).
removeBreakpointC
Remove a breakpoint
Inputs: sessionId (required), breakpointId (required).
replayC
Replay an rr trace
Inputs: tracePath (required), onProcess.
setBackendC
Set the backend for debugging
Inputs: backend (required).
setBreakpointB
Set a breakpoint in the debugged program
Inputs: sessionId (required), file (required), line (required), condition.
stepC
Step into function call
Inputs: sessionId (required).
stepoutB
Step out of current function
Inputs: sessionId (required).
testC
Debug tests in a package
Inputs: package, testFlags.
traceC
Trace program execution
Inputs: regexp (required), pkg, ebpf, stack, +1 more.
variablesC
List local variables in current scope
Inputs: sessionId (required).
versionB
Get Delve version information
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Tools have distinct purposes with clear descriptions. Some potential confusion exists between 'debug', 'exec', 'test', and 'attach' as different ways to start debugging, but descriptions differentiate them. Overall, agents can reliably distinguish tools.
All tools use a consistent single-word lowercase naming pattern (e.g., 'continue', 'step', 'setBreakpoint'). While not verb_noun, the pattern is uniform and predictable, making it easy for agents to understand.
19 tools is on the higher end for a debugger MCP server. While each tool serves a legitimate debugging function, the count exceeds the typical 3-15 range, making it somewhat heavy but still manageable.
Covers core debugging workflows like starting, stepping, breakpoints, and evaluation. However, missing common operations like listing breakpoints, viewing stack traces, and goroutine inspection indicate notable gaps for comprehensive debugging.
Maintenance
Related MCP Connectors
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
A MCP server built for developers enabling Git based project management with project and personal…
A simple Typescript MCP server built using the official MCP Typescript SDK and smithery/cli. This…
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseBqualityDmaintenanceTypeScript-based MCP server designed to enhance code editing experiences by providing features such as hover information, code completion, and diagnostics.334 npm26MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables LLMs to understand and work with TypeScript APIs they haven't been trained on by providing structured access to TypeScript type definitions and documentation.44 npm46MIT
- AlicenseNot gradedqualityCmaintenanceA TypeScript-based MCP server that enables code search, file reading, and project management via the GitLab API.11 npm1ISC
- AlicenseNot gradedqualityDmaintenanceA standalone MCP server that provides TypeScript type inference and hover information using tsgo, enabling AI agents to get type details, diagnostics, references, and more without needing an editor.8 npm1MIT