Bridges MCP clients with DAP debuggers to control and inspect running code
Configuration
View docs{
"mcpServers": {
"go-delve-mcp-dap-server": {
"url": "http://localhost:8080"
}
}
}You can debug your MCP-enabled applications by using the MCP DAP Server, which bridges MCP clients with DAP-compatible debuggers. It gives you full control over debugging sessions, including starting and stopping sessions, setting breakpoints, steering program execution, inspecting state, and evaluating expressions from your tooling.
To get started, first launch the MCP DAP Server, then connect your MCP client to the server to begin a debugging session. The server exposes a Debug Adapter Protocol interface that lets you start a session, attach to processes, and drive debugging from your MCP client. You can control execution, manage breakpoints, and inspect the running program from your client, enabling seamless integration with AI assistants and other MCP clients.
Prerequisites: You need Go 1.24.4 or later and a DAP-compatible debugger for your target language.
Build and run from source:
git clone https://github.com/go-delve/mcp-dap-server
cd mcp-dap-server
go build -o bin/mcp-dap-serverNext you start the server and connect your MCP client using the available endpoints. The server listens on port 8080 by default, and you can reach it via the HTTP endpoint or run it locally as a stdio process.
HTTP connection (recommended for MCP clients): the server serves an HTTP/MCP interface on port 8080. Your MCP client should connect to http://localhost:8080 using the SSE transport.
"mcpServers": {
"dap_http": {
"type": "http",
"name": "dap_http",
"url": "http://localhost:8080",
"args": []
}
}Local stdio (manual startup): you can run the server as a local process and connect via the standard IO channel. Use the runtime command shown below.
{
"type": "stdio",
"name": "dap_stdio",
"command": "./bin/mcp-dap-server",
"args": [],
"env": {}
}Starts a new debugging session with the configured DAP server and prepares the environment for debugging.
Stops the current debugging session and cleans up resources associated with the debuggee.
Restarts the active debugging session, reinitializing the debugger and target process.
Terminates the debugger and the debuggee process, cleaning up all resources.
Launches a program in debug mode, enabling breakpoints, stepping, and state inspection from the start.
Executes a program without attaching a debugger, useful for quick runs or tests.
Attaches to an already running process for debugging without starting a new session.
Sets line breakpoints in a specified source file to pause execution at those lines.
Sets breakpoints at function entry points to pause when those functions are invoked.
Continues program execution from a paused state.
Steps over the current line to the next executable line.
Steps into the next function call to inspect deeper behavior.
Steps out of the current function to return to the caller.
Pauses program execution to inspect state at a stable point.
Lists all threads in the debugged process.
Retrieves the stack trace for a specified thread.
Obtains variable scopes for a frame and fetches variables to show a structured view.
Fetches variables within a scope for display.
Evaluates an expression in the current debugging context.
Sets the value of a variable while debugging.
Lists all loaded source files used by the debuggee.
Lists loaded modules for the debugged process.
Disassembles code at a given memory location.
Provides information about exceptions that occur during debugging.
Disconnects from the debugger and can terminate the debuggee if requested.
Signals that the configuration phase is complete and debugging can start.