
LLDB Integration
STDIOLLDB debugger integration for AI assistants via Model-Context Protocol.
LLDB debugger integration for AI assistants via Model-Context Protocol.
This project provides a Model-Context Protocol (MCP) integration for LLDB, allowing AI assistants like Claude to interact with your debugging sessions through a standardized interface.
The integration consists of two main components:
This architecture allows Claude to help you debug code by directly interacting with LLDB through natural language. The MCP server acts as a bridge, translating Claude's requests into LLDB commands and returning results in a structured format.
fastmcp
Python package (for Claude Desktop integration)Clone this repository:
git clone https://github.com/ant4g0nist/lldb-mcp.git
cd lldb-mcp
Install required dependencies:
pip install "fastmcp>=1.2.0" httpx
or
uv install "fastmcp>=1.2.0" httpx
Make sure Claude for Desktop is installed and updated to the latest version.
Configure Claude for Desktop to use the LLDB MCP server by editing:
~/Library/Application Support/Claude/claude_desktop_config.json
Update the paths and add the LLDB MCP configuration:
{ "mcpServers": { "lldb": { "command": "/path/to/your/.local/bin/uv", "args": [ "--directory", "/path/to/your/lldb-mcp/llmcp", "run", "lldb_mcp.py" ] } } }
Restart Claude for Desktop.
Start a debugging session in LLDB and enable the MCP server with:
(lldb) command script import lisa.py
You should now see the LLDB tools available in Claude for Desktop. Look for the hammer icon.
If you prefer to use the plugin directly from LLDB without Claude for Desktop:
Add the following to your ~/.lldbinit
file to load the plugin automatically:
command script import /path/to/lldb_plugin.py
In your LLDB session, start the MCP server:
(lldb) mcp start
The server will be available at http://localhost:13338 for any MCP client to connect to.
The MCP server exposes the following methods for AI assistants:
Once set up, you can interact with LLDB through Claude using natural language. Some examples:
/path/to/executable
"-v input.txt
"ptr->data[i]
"claude_desktop_config.json
Contributions are welcome! Please feel free to submit pull requests or create issues for bugs and feature requests.
Apache License