Provides LLDB debugging capabilities via MCP tools for Claude Code and other MCP-enabled assistants.
Configuration
View docs{
"mcpServers": {
"benpm-claude_lldb_mcp": {
"command": "python",
"args": [
"/path/to/lldb-mcp/lldb_mcp_server.py"
]
}
}
}You can run an LLDB MCP Server that exposes LLDB debugging capabilities as structured MCP tools. It helps you control execution, inspect state, analyze crashes, read memory, and more from your MCP-enabled AI assistants or Claude Code, delivering targeted debugging workflows with clear commands and responses.
You use this server by configuring an MCP client to connect to it, then issuing MCP tool requests that correspond to LLDB actions. Practical workflows include setting breakpoints, running programs with arguments, inspecting variables and registers, disassembling code, reading memory, and evaluating expressions in the current debug context. You can also run arbitrary LLDB commands through a dedicated tool when you need finer control. Use the “automatic” configuration path to add the server to your client, or configure the process explicitly with a local Python command or an installed package if you prefer. When you ask your AI assistant to debug, phrase requests in natural language like: set a breakpoint at a function, run the program with arguments, and show local variables when stopped; or analyze a crash dump and core file to determine the fault.
Prerequisites you need before installation: Python 3.10 or newer, LLDB installed and accessible in your PATH, and the mcp[cli] package available for Python.
Step-by-step installation options you can follow.
# Option 1: Install from source
# Clone the repository
git clone https://github.com/yourusername/lldb-mcp.git
cd lldb-mcp
# Install dependencies in editable mode
pip install -e .
# Run tests (optional but recommended)
pytest tests/If you prefer a quick setup without cloning, install the required Python packages directly.
pip install "mcp[cli]" pydantic httpxOption 2: Install from source using a setup script if you have one in your project.
chmod +x setup_for_copilot.sh
./setup_for_copilot.shAutomatic configuration with your MCP client is also supported.
claude mcp add lldb python3 /path/to/lldb-mcp/lldb_mcp_server.pyConfiguration can also be expressed directly for your MCP client. You can use a local Python command to run the MCP server script, or install the package and run the provided entry point.
{
"mcpServers": {
"lldb": {
"command": "python",
"args": ["/path/to/lldb-mcp/lldb_mcp_server.py"]
}
}
}If you install the server as a package, you can start it with a shorter command if the package provides a CLI entry point.
{
"mcpServers": {
"lldb": {
"command": "lldb-mcp"
}
}
}For isolation, you can use uvx to run the server in a contained environment.
{
"mcpServers": {
"lldb": {
"command": "uvx",
"args": ["--from", "/path/to/lldb-mcp", "lldb-mcp"]
}
}
}If LLDB cannot be found in your environment, ensure LLDB is installed and available in your PATH by checking with the following commands.
which lldb
lldb --versionIf you encounter permission issues with core dumps, enable core dumps and set the core pattern accordingly.
ulimit -c unlimited
sudo sysctl -w kernel.core_pattern=core.%pWhen symbols are not found, compile your program with debug information.
g++ -g -O0 myprogram.cpp -o myprogram
clang++ -g -O0 myprogram.cpp -o myprogramRun a program under LLDB with optional breakpoints and arguments.
Analyze crash dumps and core files to determine the fault.
Set breakpoints by function, file:line, or address, with optional conditions.
Set watchpoints to break on memory access for a variable.
Inspect local variables and program arguments at a breakpoint.
Retrieve stack traces for all threads in the debugged process.
Display CPU register values for the current context.
Read and display memory contents from a given address.
List all threads and their states during debugging.
Disassemble code regions or specific functions.
Show source code with line numbers corresponding to the current context.
Look up symbols by name, regex, or address.
List loaded executables and shared libraries.
Evaluate C/C++ expressions within the current debug context.
Execute arbitrary LLDB commands directly.
Get help on LLDB commands and features.
Show LLDB version information.