dap_mcp

MCP.Pizza Chef: KashunCheng

dap-mcp is an MCP server implementation designed to manage Debug Adapter Protocol (DAP) sessions, enabling large language models to interact with debuggers seamlessly. It supports setting breakpoints, controlling execution flow, evaluating expressions, and viewing source code, all configurable via JSON. This server optimizes debugging workflows by leveraging MCP's standardized context framework, making debugging more efficient and integrated with AI-driven tools.

Unmaintained · No commits in 13 months.

Use This MCP server To

Manage Debug Adapter Protocol sessions via MCP Set, list, and remove breakpoints programmatically Control debugger execution flow with LLM commands Evaluate expressions during debugging sessions Change stack frames and inspect call stacks View and navigate source code within debugging context Customize debugger settings through JSON configuration Integrate debugging context into AI-assisted development workflows

README

dap-mcp

dap-mcp is an implementation of the Model Context Protocol (MCP) tailored for managing Debug Adapter Protocol (DAP) sessions. MCP provides a standardized framework to optimize and extend the context window of large language models, and in this project, it is used to enhance and streamline debugging workflows.

Features

  • Debug Adapter Protocol Integration: Interact with debuggers using a standardized protocol.
  • MCP Framework: Leverage MCP to optimize context and enhance debugging workflows.
  • Rich Debugging Tools: Set, list, and remove breakpoints; control execution (continue, step in/out/next); evaluate expressions; change stack frames; and view source code.
  • Flexible Configuration: Customize debugger settings, source directories, and other parameters via a JSON configuration file.

Installation

Prerequisites

  • Python 3.10 or higher
  • uv (optional, for running the server)

Installing and Running the Server

Install dap-mcp and its dependencies:

pip install dap-mcp
python -m dap_mcp --config config.json

# Or, if you have uv installed
uvx dap-mcp@latest --config config.json

Configuration

The project uses a JSON configuration file (e.g., .config.json) to specify debugger settings and source directories. An example configuration:

dap_mcp FAQ

How do I configure dap-mcp for my debugger?
Configure dap-mcp using a JSON file specifying debugger settings, source directories, and parameters to tailor the debugging environment.
What Python version is required to run dap-mcp?
dap-mcp requires Python 3.10 or higher for proper operation.
Can dap-mcp control debugger execution flow?
Yes, it supports commands like continue, step in, step out, and step next to control execution.
Does dap-mcp support expression evaluation during debugging?
Yes, it allows evaluating expressions within the current debugging context.
Is it possible to customize breakpoints with dap-mcp?
Yes, you can set, list, and remove breakpoints through the MCP interface.
What protocols does dap-mcp integrate with?
dap-mcp integrates with the Debug Adapter Protocol (DAP) to standardize debugger interactions.
Can dap-mcp be used with multiple debuggers?
Yes, as long as the debugger supports DAP, dap-mcp can manage its sessions.
What optional dependencies does dap-mcp have?
The server optionally uses the 'uv' package for running the server efficiently.