home / mcp / mcp go debugger mcp server
Provides a Go debugging interface via MCP to launch, attach, set breakpoints, step, and inspect variables in Go programs.
Configuration
View docs{
"mcpServers": {
"sunfmin-mcp-go-debugger": {
"command": "mcp-go-debugger",
"args": []
}
}
}You use the MCP Go Debugger to run, attach to, and inspect Go programs within an MCP client. It provides a debugger interface built around the Delve-era capabilities, letting you launch or attach to Go processes, set breakpoints, step through code, inspect variables and stack traces, and capture program output for analysis. This makes diagnosing bugs, verifying logic, and validating behavior during development faster and more repeatable.
Launch and attach to Go applications from your MCP client to start debugging sessions. You can start with a fresh run, attach to a running process, or debug a specific test. Core actions include setting breakpoints, stepping through code, evaluating variables, and inspecting execution context to diagnose issues.
Practical usage patterns you can perform with the MCP Go Debugger are: - Launch a program with debugging enabled and set breakpoints at key locations. - Attach to a running Go process by its PID to inspect state without restarting. - Debug a single test function to isolate test-specific behavior. - Inspect local and argument variables with controlled depth to understand data flow. - Retrieve current execution position to map control flow to source files. - Collect program output to correlate logs with debugging events.
In a typical debugging session you will: - Launch or attach to the target with your MCP client. - Set one or more breakpoints at lines of interest. - Run the program until a breakpoint is hit. - Step into, step over, or step out to navigate the call stack. - Evaluate variables or complex structures to inspect state. - Use the current execution position to locate the exact point of interest in your code. - Continue execution or close the session when you have extracted the necessary insights.
The MCP Go Debugger exposes a set of commands you can invoke from your MCP client to control the debugging session. These include starting the debugger, attaching to processes, breakpoints management, stepping controls, evaluation of variables, and retrieval of runtime information.
You can view stack traces, list all variables in the current scope (locals, args, and package-level context), inspect nested data structures with configurable depth, and capture stdout/stderr from the debugged program. This gives you a complete picture of program behavior during debugging.
Debug individual test functions with a dedicated test debug mode to isolate test behavior without running the entire test suite. You can supply test flags to handle timeouts or concurrency-related issues, enabling precise and repeatable test debugging.
Maintain clear session boundaries between debugging sessions. When you finish, close the current debugging session to release resources. Do not leave breakpoints active in long-running processes unless you intend to debug them again.
Test connection to the debugger to verify the MCP channel is reachable.
Check debugger status and server uptime to ensure the session is healthy.
Launch a Go program with debugging enabled through the MCP client.
Attach to a running Go process by PID to inspect state without restarting.
Debug a Go source file directly from the MCP client.
Debug a specific Go test function to isolate test behavior.
Set a breakpoint at a specific file and line to pause execution.
List all current breakpoints in the active debugging session.
Remove a previously set breakpoint.
Continue execution until the next breakpoint or program end.
Step into the next function call to trace execution.
Step over the next function call to advance without entering.
Step out of the current function to return to the caller.
Evaluate a variable's value with configurable depth for deep inspection.
List all variables in the current scope, including locals and arguments.
Get the current execution position as file, line, and function.
Retrieve captured stdout and stderr from the debugged program.
Close the current debugging session and release resources.