MCP DAP Server logo

MCP DAP Server

Organization
go-delve

MCP server to communicate with DAP servers allowing AI Agents the ability to debug live programs.

Publishergo-delve
Repositorymcp-dap-server
LanguageGo
Forks
18
Stars
104
Available tools
0
Transport typestreamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    MCP DAP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    104 stars and 18 forks from the linked repository.

MCP DAP Server

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

Features

  • Unified Debug Launch: Single debug tool 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

bash
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:

json
{
  "mcpServers": {
    "dap-debugger": {
      "command": "mcp-dap-server",
      "args": [],
      "env": {}
    }
  }
}

Claude Code Configuration

bash
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

Parameters:

  • mode (string, required): One of 'source', 'binary', 'core', or 'attach'
  • path (string): Path to source file or binary (required for source/binary modes; optional for core mode with GDB, which can auto-detect it)
  • args (array): Arguments to pass to the program
  • coreFilePath (string): Path to core dump file (required for core mode)
  • processId (number): Process ID (required for attach mode)
  • breakpoints (array): Breakpoints to set before running (file:line or function name)
  • stopOnEntry (boolean): Stop at program entry point
  • port (number): optional numeric Delve port (0 chooses an ephemeral loopback port; external bind addresses are not accepted)

Returns full context (location, stack trace, variables) when stopped.

stop

End the debugging session. Terminates the debuggee and stops the debugger.

restart

Restart the debugging session with optional new arguments.

  • Parameters:
    • arguments (array, optional): New program arguments

Breakpoints

breakpoint

Set a breakpoint at a file:line location or on a function.

  • Parameters (one of):
    • file (string) + line (number): Source file and line number
    • function (string): Function name

clear-breakpoints

Remove breakpoints from a file or clear all breakpoints.

  • Parameters:
    • file (string, optional): Clear breakpoints in this file
    • all (boolean, optional): Clear all breakpoints

Execution Control

continue

Continue program execution. Optionally run to a specific location.

  • Parameters:
    • to (object, optional): Run-to-cursor target (file+line or function)

Returns full context when stopped.

step

Step through code execution.

  • Parameters:
    • mode (string, required): One of 'over', 'in', or 'out'

Returns full context at new location.

pause

Pause program execution.

  • Parameters:
    • threadId (number): Thread ID to pause

State Inspection

context

Get full debugging context including current location, stack trace, and all variables.

  • Parameters:
    • threadId (number, optional): Thread ID
    • frameId (number, optional): Stack frame ID

evaluate

Evaluate an expression in the current debugging context.

  • Parameters:
    • expression (string): Expression to evaluate
    • frameId (number, optional): Frame context
    • context (string, optional): Evaluation context ('watch', 'repl', 'hover')

set-variable

Modify a variable's value in the debugged program.

  • Parameters:
    • variablesReference (number): Variables reference from context
    • name (string): Variable name
    • value (string): New value

Program Information

info

Get program metadata.

  • Parameters:
    • type (string, required): One of 'sources' or 'modules'

disassemble

Disassemble code at a memory address.

  • Parameters:
    • memoryReference (string): Memory address
    • instructionOffset (number, optional): Offset from address
    • instructionCount (number): Number of instructions to disassemble

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Acknowledgments

Use MCP DAP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCP DAP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP connects through a hosted MCP server URL in TypingMind.

Add an MCP server URL

Use this when MCP DAP Server is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter the MCP server URL from the provider in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste the MCP server URL from the provider into the Server URL field.
  2. Enter a connection name for MCP DAP Server.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the MCP DAP Server connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the MCP DAP Server tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the MCP DAP Server tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP DAP Server to help me with this task?
MCP DAP Server
Sure. I read it.
Here is what I found using MCP DAP Server.

Frequently asked questions

What is the MCP DAP Server MCP server used for?

MCP DAP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCP DAP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCP DAP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCP DAP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCP DAP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCP DAP Server MCP to TypingMind?

MCP DAP Server can be connected in TypingMind by adding its hosted MCP server URL. This is useful when you want a remote MCP connection that is available from your TypingMind workspace.

What tools does MCP DAP Server MCP provide in TypingMind?

MCP DAP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCP DAP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCP DAP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇