- Home
- MCP servers
- MCP DAP Server
MCP DAP Server
- go
35
GitHub Stars
go
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
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.
How to use
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.
How to install
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-server
Additional content
Next 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.
Configuration and connection details
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": {}
}
Available tools
start_debugger
Starts a new debugging session with the configured DAP server and prepares the environment for debugging.
stop_debugger
Stops the current debugging session and cleans up resources associated with the debuggee.
restart_debugger
Restarts the active debugging session, reinitializing the debugger and target process.
terminate_debugger
Terminates the debugger and the debuggee process, cleaning up all resources.
debug_program
Launches a program in debug mode, enabling breakpoints, stepping, and state inspection from the start.
exec_program
Executes a program without attaching a debugger, useful for quick runs or tests.
attach_debugger
Attaches to an already running process for debugging without starting a new session.
set_breakpoints
Sets line breakpoints in a specified source file to pause execution at those lines.
set_function_breakpoints
Sets breakpoints at function entry points to pause when those functions are invoked.
continue
Continues program execution from a paused state.
next
Steps over the current line to the next executable line.
step_in
Steps into the next function call to inspect deeper behavior.
step_out
Steps out of the current function to return to the caller.
pause
Pauses program execution to inspect state at a stable point.
threads
Lists all threads in the debugged process.
stack_trace
Retrieves the stack trace for a specified thread.
scopes
Obtains variable scopes for a frame and fetches variables to show a structured view.
variables
Fetches variables within a scope for display.
evaluate
Evaluates an expression in the current debugging context.
set_variable
Sets the value of a variable while debugging.
loaded_sources
Lists all loaded source files used by the debuggee.
modules
Lists loaded modules for the debugged process.
disassemble
Disassembles code at a given memory location.
exception_info
Provides information about exceptions that occur during debugging.
disconnect
Disconnects from the debugger and can terminate the debuggee if requested.
configuration_done
Signals that the configuration phase is complete and debugging can start.