- Home
- MCP servers
- LLDB
LLDB
- python
1
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
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.
How to use
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.
How to install
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 httpx
Option 2: Install from source using a setup script if you have one in your project.
chmod +x setup_for_copilot.sh
./setup_for_copilot.sh
Automatic configuration with your MCP client is also supported.
claude mcp add lldb python3 /path/to/lldb-mcp/lldb_mcp_server.py
Additional configuration and usage notes
Configuration 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"]
}
}
}
Troubleshooting and tips
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 --version
If 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.%p
When symbols are not found, compile your program with debug information.
g++ -g -O0 myprogram.cpp -o myprogram
clang++ -g -O0 myprogram.cpp -o myprogram
Available tools
lldb_run
Run a program under LLDB with optional breakpoints and arguments.
lldb_analyze_crash
Analyze crash dumps and core files to determine the fault.
lldb_set_breakpoint
Set breakpoints by function, file:line, or address, with optional conditions.
lldb_watchpoint
Set watchpoints to break on memory access for a variable.
lldb_examine_variables
Inspect local variables and program arguments at a breakpoint.
lldb_backtrace
Retrieve stack traces for all threads in the debugged process.
lldb_registers
Display CPU register values for the current context.
lldb_read_memory
Read and display memory contents from a given address.
lldb_threads
List all threads and their states during debugging.
lldb_disassemble
Disassemble code regions or specific functions.
lldb_source
Show source code with line numbers corresponding to the current context.
lldb_symbols
Look up symbols by name, regex, or address.
lldb_images
List loaded executables and shared libraries.
lldb_evaluate
Evaluate C/C++ expressions within the current debug context.
lldb_run_command
Execute arbitrary LLDB commands directly.
lldb_help
Get help on LLDB commands and features.
lldb_version
Show LLDB version information.