Mcp Dap Server
MCP server to communicate with DAP servers allowing AI Agents the ability to debug live programs.
- Transport
- Not stated
- Package
- —
- Registry id
- —
No install snippet on purpose. A working MCP config is a command, its arguments and an environment block — the last two are where API keys live, so this catalogue never stores them and cannot publish them. Follow the link above for the authors' own instructions.
A Model Context Protocol (MCP) server that provides debugging capabilities through the Debug Adapter Protocol (DAP). This server enables AI assistants and other MCP clients to interact with debuggers for various programming languages.
Overview
The MCP DAP Server acts as a bridge between MCP clients and DAP-compatible debuggers, allowing programmatic control of debugging sessions. It provides a comprehensive set of debugging tools that can be used to:
- Start and stop debugging sessions
- Set breakpoints (line-based and function-based)
- Control program execution (continue, step in/out/over, pause)
- Inspect program state (threads, stack traces, variables, scopes)
- Evaluate expressions
- Attach to running processes
- Handle exceptions
Demos
- Basic demo with multiple prompts
- Autonomous agentic debugging pt.1
- Autonomous agentic debugging pt.2
Features
- Unified Debug Launch: Single
debugtool handles source, binary, and attach modes - Automatic Context: Execution control tools return full state (location, stack, variables)
- Streamlined API: 13 tools cover all debugging operations
- Breakpoint Management: Set line and function breakpoints, run-to-cursor
- Full State Inspection: Stack traces, scopes, and variables in one call
- Expression Evaluation: Evaluate and modify variables in context
- Process Attachment: Attach to running processes
- Disassembly Support: View disassembled code at memory addresses
Installation
Prerequisites
- Go 1.24.4 or later
- A DAP-compatible debugger for your target language
Building from Source
git clone https://github.com/go-delve/mcp-dap-server
cd mcp-dap-server
go build -o bin/mcp-dap-server
Usage
Connecting via MCP
The server uses stdio transport, allowing AI agents to spawn it on-demand. Configure your MCP client with the path to the binary.
Important
A debugger can launch programs, attach to processes, evaluate target code, inspect secrets, and alter or terminate a debuggee. Run this server only for a trusted, single-user MCP client under a least-privileged OS account. The stdio server has no HTTP listener or multi-tenant authorization layer. Delve's internal DAP socket is always bound to loopback.
Persistent server logging is disabled by default. Set MCP_DAP_LOG=1 to create
a unique private log in the OS temporary directory. It is capped at 8 MiB and
retained until manually deleted. Explicit protocol and GDB tool logs reject
existing files; treat them as sensitive. GDB tool logs are written directly by
GDB and are not size-capped.
Example MCP Client Configuration
This configuration works with Gemini CLI and similar MCP clients:
{
"mcpServers": {
"dap-debugger": {
"command": "mcp-dap-server",
"args": [],
"env": {}
}
}
}
Claude Code Configuration
claude mcp add mcp-dap-server /path/to/mcp-dap-server
Available Tools
Session Management
debug
Start a debugging session. Supports four modes:
- source: Compile and debug Go source code
- binary: Debug a pre-compiled executable
- core: Debug a core dump file
- attach: Attach to a running process
From the project's README.