dap_mcp
by KashunCheng·★ 40·Score 42
DAP-MCP enables LLM interaction with debuggers through standardized MCP protocol, offering debugging tools like breakpoints and execution control.
Overview
dap-mcp is a Python implementation of the Model Context Protocol that bridges large language models with debug adapters. It provides a set of tools for controlling debugging sessions, including setting and removing breakpoints, controlling execution flow (continue, step in/out/next), evaluating expressions, changing stack frames, and viewing source code. The server supports multiple debug adapters like debugpy and lldb through a flexible JSON configuration system, making it adaptable to various debugging environments.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose dap-mcp when you need AI assistance for debugging workflows and your team uses Python (debugpy) or lldb debuggers.
When NOT to choose this
Avoid if you use other debuggers not yet supported, or need a more comprehensive IDE integration beyond MCP protocol support.
Tools this server exposes
12 tools extracted from the READMElaunchLaunch the debuggee program.
set_breakpointSet a breakpoint at a specified file and line (with an optional condition).
remove_breakpointRemove a breakpoint from a specified file and line.
list_all_breakpointsList all breakpoints currently set in the debugger.
continue_executionContinue program execution after hitting a breakpoint.
step_inStep into a function call.
step_outStep out of the current function.
nextStep over to the next line of code.
evaluateEvaluate an expression in the current debugging context.
change_frameSwitch to a different stack frame.
view_file_around_lineView source code around a specified line.
terminateTerminate the debugging session.
Comparable tools
Installation
Installation
- Install the dap-mcp package:
``bash pip install dap-mcp ``
- Create a configuration file (e.g.,
config.json) with your debugger settings
- Run the server:
``bash python -m dap_mcp --config config.json # or with uv uvx dap-mcp@latest --config config.json ``
Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"dap-debugger": {
"command": "python",
"args": ["-m", "dap_mcp"],
"env": {
"DAP_MCP_CONFIG": "/path/to/config.json"
}
}
}
}FAQ
- What debuggers are supported by dap-mcp?
- Currently, dap-mcp supports debugpy and lldb through the Debug Adapter Protocol. The architecture is designed to be extensible, allowing for additional debugger support by creating new configuration classes.
- How do I add support for a new debugger?
- To add support for a new DAP server, create a new configuration class in `dap_mcp/config.py` that extends the base `DAPConfig` class. Define a unique type value and any additional settings specific to that debugger, then update the union type for debugger-specific configurations.
Compare dap_mcp with
Last updated · Auto-generated from public README + GitHub signals.