See it in acton here, automatically debugging a buffer overflow: https://x.com/fullduplex/status/1904770477698277847 LLDB-MCP is a tool that integrates the LLDB debugger with Claude's Model Context Protocol (MCP). This integration allows Claude to start, control, and interact with LLDB debugging sessions directly, enabling AI-assisted debugging workflows. The tool provides a comprehensive set of c
Add this skill
npx mdskills install stass/lldb-mcpComprehensive LLDB integration with extensive debugging commands and clear setup instructions
1# LLDB-MCP2345See it in acton here, automatically debugging a buffer overflow: https://x.com/full_duplex/status/190477047769827784767## Overview89LLDB-MCP is a tool that integrates the LLDB debugger with Claude's Model Context Protocol (MCP). This integration allows Claude to start, control, and interact with LLDB debugging sessions directly, enabling AI-assisted debugging workflows.1011The tool provides a comprehensive set of commands for working with LLDB, including:12- Starting and managing LLDB sessions13- Loading programs for debugging14- Setting breakpoints and watchpoints15- Controlling program execution16- Examining memory, registers, and variables17- Analyzing stack traces and program state1819## Features2021- Create and manage multiple LLDB debugging sessions22- Load executables and attach to running processes23- Load core dump files for post-mortem analysis24- Execute arbitrary LLDB commands25- Fine-grained control over program execution26- Memory examination and disassembly27- Thread and stack frame inspection2829## Installation30311. Clone the repository:32 ```33 git clone https://github.com/stass/lldb-mcp.git34 cd lldb-mcp35 ```36372. Install dependencies:38 ```39 pip install mcp40 ```41423. Configure Claude to use the LLDB-MCP server:43 - Open the Claude desktop app configuration44 - Add the following to your MCP configuration:45 ```json46 "mcpServers": {47 "lldb-mcp": {48 "command": "python3",49 "args": ["/path/to/lldb-mcp/lldb_mcp.py"],50 "disabled": false51 }52 }53 ```5455## Usage5657Once installed and configured, you can interact with LLDB through Claude using natural language.5859### Basic Workflow60611. Start a new LLDB session622. Load a program633. Set breakpoints644. Run the program655. Inspect variables and memory666. Control execution (continue, step, next, etc.)677. Terminate the session when done6869### Example Commands7071Here are some examples of how to interact with LLDB-MCP through Claude:7273- "Start a new LLDB session"74- "Load the program '/path/to/executable'"75- "Set a breakpoint at main"76- "Run the program"77- "Show backtrace"78- "Print the value of variable 'count'"79- "Step over the next line"80- "Examine memory at address 0x1000"81- "Show register values"82- "Continue execution"83- "Kill the process"84- "Terminate the LLDB session"8586## Supported Commands8788### Session Management89- `lldb_start`: Start a new LLDB session90- `lldb_terminate`: Terminate an LLDB session91- `lldb_list_sessions`: List all active LLDB sessions9293### Program Loading94- `lldb_load`: Load a program into LLDB95- `lldb_attach`: Attach to a running process96- `lldb_load_core`: Load a core dump file9798### Execution Control99- `lldb_run`: Run the loaded program100- `lldb_continue`: Continue program execution101- `lldb_step`: Step to next line or instruction102- `lldb_next`: Step over function calls103- `lldb_finish`: Execute until the current function returns104- `lldb_kill`: Kill the running process105106### Breakpoints and Watchpoints107- `lldb_set_breakpoint`: Set a breakpoint108- `lldb_breakpoint_list`: List all breakpoints109- `lldb_breakpoint_delete`: Delete a breakpoint110- `lldb_watchpoint`: Set a watchpoint on a variable or memory address111112### Inspection113- `lldb_backtrace`: Show call stack114- `lldb_print`: Print value of expression115- `lldb_examine`: Examine memory116- `lldb_info_registers`: Display registers117- `lldb_frame_info`: Get detailed information about a stack frame118- `lldb_disassemble`: Disassemble code119- `lldb_process_info`: Get information about the current process120121### Thread Management122- `lldb_thread_list`: List all threads in the current process123- `lldb_thread_select`: Select a specific thread124125### Miscellaneous126- `lldb_command`: Execute an arbitrary LLDB command127- `lldb_expression`: Evaluate an expression in the current frame128- `lldb_help`: Get help for LLDB commands129130## Example program131132`example/overflow.c` contains an example C program that causes buffer overflow with certain arguments.133Compile it using `cc overflow.c` and ask Claude to debug the issue with the resulting program:134```135I'm trying to debug my program a.out that is crashing with certain arguments, e.g. when I pass "hello".136Can you help me debug it?137```138139## Debugging Tips140141- Use `lldb_command` when you need to execute LLDB commands that don't have a dedicated function142- Enable debug mode with `--debug` flag when starting the server for detailed logging143- Sessions are automatically cleaned up when the server shuts down144- Each session has a unique ID - make sure to use the correct ID when executing commands145146## Requirements147148- Python 3.7+149- LLDB installed on the system150- Claude desktop app with MCP support151152## Troubleshooting153154- If LLDB commands are timing out, check that LLDB is installed correctly155- Verify the path to LLDB when starting a new session156- Check for permission issues when attaching to processes157- Review debug logs if commands aren't executing correctly158159## License160161BSD 2-clause162
Full transparency — inspect the skill content before installing.