LLDB-MCP
A MCP server for LLDB that allows automatic analyzing, debugging and disassembling of native apps.
stass
README
LLDB-MCP
See it in acton here, automatically debugging a buffer overflow: https://x.com/full_duplex/status/1904770477698277847
Overview
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 commands for working with LLDB, including:
- Starting and managing LLDB sessions
- Loading programs for debugging
- Setting breakpoints and watchpoints
- Controlling program execution
- Examining memory, registers, and variables
- Analyzing stack traces and program state
Features
- Create and manage multiple LLDB debugging sessions
- Load executables and attach to running processes
- Load core dump files for post-mortem analysis
- Execute arbitrary LLDB commands
- Fine-grained control over program execution
- Memory examination and disassembly
- Thread and stack frame inspection
Installation
-
Clone the repository:
git clone https://github.com/stass/lldb-mcp.git cd lldb-mcp
-
Install dependencies:
pip install mcp
-
Configure Claude to use the LLDB-MCP server:
- Open the Claude desktop app configuration
- Add the following to your MCP configuration:
"mcpServers": { "lldb-mcp": { "command": "python3", "args": ["/path/to/lldb-mcp/lldb_mcp.py"], "disabled": false } }
Usage
Once installed and configured, you can interact with LLDB through Claude using natural language.
Basic Workflow
- Start a new LLDB session
- Load a program
- Set breakpoints
- Run the program
- Inspect variables and memory
- Control execution (continue, step, next, etc.)
- Terminate the session when done
Example Commands
Here are some examples of how to interact with LLDB-MCP through Claude:
- "Start a new LLDB session"
- "Load the program '/path/to/executable'"
- "Set a breakpoint at main"
- "Run the program"
- "Show backtrace"
- "Print the value of variable 'count'"
- "Step over the next line"
- "Examine memory at address 0x1000"
- "Show register values"
- "Continue execution"
- "Kill the process"
- "Terminate the LLDB session"
Supported Commands
Session Management
lldb_start
: Start a new LLDB sessionlldb_terminate
: Terminate an LLDB sessionlldb_list_sessions
: List all active LLDB sessions
Program Loading
lldb_load
: Load a program into LLDBlldb_attach
: Attach to a running processlldb_load_core
: Load a core dump file
Execution Control
lldb_run
: Run the loaded programlldb_continue
: Continue program executionlldb_step
: Step to next line or instructionlldb_next
: Step over function callslldb_finish
: Execute until the current function returnslldb_kill
: Kill the running process
Breakpoints and Watchpoints
lldb_set_breakpoint
: Set a breakpointlldb_breakpoint_list
: List all breakpointslldb_breakpoint_delete
: Delete a breakpointlldb_watchpoint
: Set a watchpoint on a variable or memory address
Inspection
lldb_backtrace
: Show call stacklldb_print
: Print value of expressionlldb_examine
: Examine memorylldb_info_registers
: Display registerslldb_frame_info
: Get detailed information about a stack framelldb_disassemble
: Disassemble codelldb_process_info
: Get information about the current process
Thread Management
lldb_thread_list
: List all threads in the current processlldb_thread_select
: Select a specific thread
Miscellaneous
lldb_command
: Execute an arbitrary LLDB commandlldb_expression
: Evaluate an expression in the current framelldb_help
: Get help for LLDB commands
Example program
example/overflow.c
contains an example C program that causes buffer overflow with certain arguments.
Compile it using cc overflow.c
and ask Claude to debug the issue with the resulting program:
I'm trying to debug my program a.out that is crashing with certain arguments, e.g. when I pass "hello".
Can you help me debug it?
Debugging Tips
- Use
lldb_command
when you need to execute LLDB commands that don't have a dedicated function - Enable debug mode with
--debug
flag when starting the server for detailed logging - Sessions are automatically cleaned up when the server shuts down
- Each session has a unique ID - make sure to use the correct ID when executing commands
Requirements
- Python 3.7+
- LLDB installed on the system
- Claude desktop app with MCP support
Troubleshooting
- If LLDB commands are timing out, check that LLDB is installed correctly
- Verify the path to LLDB when starting a new session
- Check for permission issues when attaching to processes
- Review debug logs if commands aren't executing correctly
License
BSD 2-clause
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.