{"id":35107534,"url":"https://github.com/benpm/claude_lldb_mcp","last_synced_at":"2026-05-22T10:02:40.986Z","repository":{"id":328570296,"uuid":"1114126368","full_name":"benpm/claude_lldb_mcp","owner":"benpm","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-14T02:58:06.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-16T02:50:20.085Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benpm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-11T00:00:02.000Z","updated_at":"2025-12-14T07:22:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/benpm/claude_lldb_mcp","commit_stats":null,"previous_names":["benpm/claude_lldb_mcp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/benpm/claude_lldb_mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpm%2Fclaude_lldb_mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpm%2Fclaude_lldb_mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpm%2Fclaude_lldb_mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpm%2Fclaude_lldb_mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benpm","download_url":"https://codeload.github.com/benpm/claude_lldb_mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpm%2Fclaude_lldb_mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28082916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-27T18:27:28.761Z","updated_at":"2026-05-22T10:02:40.935Z","avatar_url":"https://github.com/benpm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"128\" height=\"128\" alt=\"claude_lldb_mcp\" src=\"https://github.com/user-attachments/assets/106576ab-f3a5-43cb-a40f-5ad5ac561204\" /\u003e\n\n# LLDB MCP Server\n\n[![CI](https://github.com/benpm/claude_lldb_mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/benpm/claude_lldb_mcp/actions/workflows/ci.yml)\n\nAn MCP (Model Context Protocol) server that provides structured debugging tools for LLDB, designed for use with Claude Code and other MCP-compatible AI assistants.\n\n## Features\n\nThis server exposes LLDB debugging capabilities through well-defined MCP tools:\n\n### Execution Control\n- **lldb_run** - Run a program with optional breakpoints and arguments\n- **lldb_analyze_crash** - Analyze crash dumps and core files\n\n### Breakpoints \u0026 Watchpoints\n- **lldb_set_breakpoint** - Set breakpoints by function, file:line, or address\n- **lldb_watchpoint** - Set watchpoints to break on variable access\n\n### Inspection\n- **lldb_examine_variables** - View local variables and arguments\n- **lldb_backtrace** - Get stack traces for all threads\n- **lldb_registers** - View CPU register values\n- **lldb_read_memory** - Read and display memory contents\n- **lldb_threads** - List all threads and their states\n\n### Code Analysis\n- **lldb_disassemble** - Disassemble functions or address ranges\n- **lldb_source** - List source code with line numbers\n- **lldb_symbols** - Look up symbols by name, regex, or address\n- **lldb_images** - List loaded executables and shared libraries\n\n### Expression Evaluation\n- **lldb_evaluate** - Evaluate C/C++ expressions in debug context\n\n### Utilities\n- **lldb_run_command** - Run arbitrary LLDB commands\n- **lldb_help** - Get help on LLDB commands\n- **lldb_version** - Show LLDB version info\n\n## Requirements\n\n- Python 3.10+\n- LLDB (with command-line tool in PATH)\n- `mcp[cli]` Python package\n\n### Installing LLDB\n\n**Ubuntu/Debian:**\n\n```bash\nsudo apt install lldb\n```\n\n**macOS:**\n\n```bash\n# LLDB comes with Xcode Command Line Tools\nxcode-select --install\n```\n\n**Windows:**\n\n```bash\n# Install via LLVM releases or Visual Studio\nwinget install LLVM.LLVM\n```\n\n## Installation\n\n### Quick Start (Recommended)\n380.\n1. We provide a setup script that installs all dependencies and verifies the installation.\n382.\n383. ```bash\n2. # Make the script executable\n3. chmod +x setup_for_copilot.sh\n386.\n4. # Run the setup script\n5. ./setup_for_copilot.sh\n389. ```\n390.\n6. This script will:\n1. 1. Check for Python 3 and pip\n1. 2. Install required Python packages (`mcp[cli]`, `pydantic`, `httpx`)\n1. 3. Verify the installation by running tests\n395.\n7. ### Option 1: Install from source\n\n```bash\n# Clone the repository\ngit clone https://github.com/yourusername/lldb-mcp.git\ncd lldb-mcp\n\n# Install dependencies\npip install -e .\n```\n\n### Option 2: Install dependencies directly\n\n```bash\npip install \"mcp[cli]\" pydantic httpx\n```\n\n## Configuration for Claude Code\n\n### Automatic Configuration\nYou can easily add the server to Claude Code using the `mcp add` command:\n\n```bash\nclaude mcp add lldb python3 /path/to/lldb-mcp/lldb_mcp_server.py\n```\n\nReplace `/path/to/lldb-mcp` with the actual path to the repository.\n\n### Manual Configuration\nAdd the following to your Claude Code MCP configuration file:\n\n### Location of config file\n- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n- **Linux**: `~/.config/Claude/claude_desktop_config.json`\n\n### Configuration\n\n```json\n{\n  \"mcpServers\": {\n    \"lldb\": {\n      \"command\": \"python\",\n      \"args\": [\"/path/to/lldb-mcp/lldb_mcp_server.py\"]\n    }\n  }\n}\n```\n\nOr if installed as a package:\n\n```json\n{\n  \"mcpServers\": {\n    \"lldb\": {\n      \"command\": \"lldb-mcp\"\n    }\n  }\n}\n```\n\n### Using uvx (recommended for isolation)\n\n```json\n{\n  \"mcpServers\": {\n    \"lldb\": {\n      \"command\": \"uvx\",\n      \"args\": [\"--from\", \"/path/to/lldb-mcp\", \"lldb-mcp\"]\n    }\n  }\n}\n```\n\n## Usage Examples\n\nOnce configured, you can ask Claude Code to help with debugging tasks:\n\n### Analyze a Crash\n\n\u003e \"Analyze the crash dump in ./core and the executable ./myprogram to find what caused the segfault\"\n\n### Set Breakpoints and Examine State\n\n\u003e \"Set a breakpoint at the processData function in processor.cpp, run the program with argument 'test.txt', and show me the local variables when it stops\"\n\n### Disassemble Code\n\n\u003e \"Show me the assembly for the main function in ./myprogram\"\n\n### Evaluate Expressions\n\n\u003e \"Run ./myprogram until it hits parseConfig and evaluate the expression config-\u003emax_threads\"\n\n### Memory Inspection\n\n\u003e \"Read 128 bytes of memory at address 0x7fff5fbff000 in hexadecimal format\"\n\n### Symbol Lookup\n\n\u003e \"Find all symbols matching 'parse.*' regex in ./myprogram\"\n\n## Tool Reference\n\n### lldb_run_command\n\nExecute any LLDB command directly.\n\n```python\n{\n    \"command\": \"help breakpoint\",  # Any LLDB command\n    \"target\": \"./myprogram\",       # Optional: executable to load\n    \"working_dir\": \"/path/to/dir\"  # Optional: working directory\n}\n```\n\n### lldb_analyze_crash\n\nAnalyze crash dumps with full context.\n\n```python\n{\n    \"executable\": \"./myprogram\",\n    \"core_file\": \"./core\",              # Optional: core dump\n    \"response_format\": \"markdown\"       # or \"json\"\n}\n```\n\n### lldb_set_breakpoint\n\nSet breakpoints with conditions.\n\n```python\n{\n    \"executable\": \"./myprogram\",\n    \"location\": \"main.cpp:42\",          # or \"functionName\" or \"0x400500\"\n    \"condition\": \"i \u003e 100\"              # Optional: break condition\n}\n```\n\n### lldb_examine_variables\n\nView variables at a breakpoint.\n\n```python\n{\n    \"executable\": \"./myprogram\",\n    \"breakpoint\": \"processData\",\n    \"variables\": [\"buffer\", \"size\"],    # Optional: specific vars\n    \"args\": [\"input.txt\"],              # Optional: program args\n    \"response_format\": \"markdown\"\n}\n```\n\n### lldb_disassemble\n\nDisassemble code regions.\n\n```python\n{\n    \"executable\": \"./myprogram\",\n    \"target\": \"main\",                   # Function name, address range, or \"current\"\n    \"show_bytes\": true,                 # Show opcode bytes\n    \"mixed\": true                       # Interleave source\n}\n```\n\n### lldb_read_memory\n\nRead memory contents.\n\n```python\n{\n    \"executable\": \"./myprogram\",\n    \"address\": \"0x7fff5fbff000\",\n    \"count\": 64,                        # Bytes to read\n    \"format\": \"x\",                      # x=hex, b=binary, d=decimal, s=string\n    \"breakpoint\": \"main\"                # Optional: stop here first\n}\n```\n\n### lldb_evaluate\n\nEvaluate C/C++ expressions.\n\n```python\n{\n    \"executable\": \"./myprogram\",\n    \"expression\": \"ptr-\u003edata[5]\",\n    \"breakpoint\": \"processBuffer\",\n    \"args\": [\"test.dat\"]\n}\n```\n\n### lldb_backtrace\n\nGet stack traces.\n\n```python\n{\n    \"executable\": \"./myprogram\",\n    \"breakpoint\": \"handleError\",        # or use core_file\n    \"core_file\": \"./core\",              # For post-mortem\n    \"all_threads\": true,\n    \"limit\": 50,\n    \"response_format\": \"json\"           # Structured output\n}\n```\n\n### lldb_registers\n\nView CPU registers.\n\n```python\n{\n    \"executable\": \"./myprogram\",\n    \"breakpoint\": \"criticalSection\",\n    \"register_set\": \"general\",          # general, float, vector, all\n    \"specific_registers\": [\"rax\", \"rbx\", \"rsp\"]  # Optional\n}\n```\n\n### lldb_watchpoint\n\nSet data watchpoints.\n\n```python\n{\n    \"executable\": \"./myprogram\",\n    \"variable\": \"global_counter\",\n    \"watch_type\": \"write\",              # write, read, read_write\n    \"condition\": \"global_counter \u003e 1000\"\n}\n```\n\n### lldb_symbols\n\nLook up symbols.\n\n```python\n{\n    \"executable\": \"./myprogram\",\n    \"query\": \"process.*\",\n    \"query_type\": \"regex\"               # name, regex, address, type\n}\n```\n\n## Alternative: Using LLDB's Built-in MCP Server\n\nLLDB 18+ has built-in MCP support. To use it instead:\n\n1. Start LLDB and enable MCP:\n   ```text\n   (lldb) protocol-server start MCP listen://localhost:59999\n   ```\n\n2. Configure Claude Code to connect via netcat:\n   ```json\n   {\n     \"mcpServers\": {\n       \"lldb\": {\n         \"command\": \"/usr/bin/nc\",\n         \"args\": [\"localhost\", \"59999\"]\n       }\n     }\n   }\n   ```\n\nNote: LLDB's built-in MCP only exposes a single `lldb_command` tool, whereas this server provides structured, specialized tools for better AI integration.\n\n## Development\n\n### Running Tests\n\n```bash\npytest tests/\n```\n\n### Type Checking\n\n```bash\nmypy lldb_mcp_server.py\n```\n\n### Linting\n\n```bash\nruff check lldb_mcp_server.py\nruff format lldb_mcp_server.py\n```\n\n## Troubleshooting\n\n### \"LLDB executable not found\"\n\nEnsure LLDB is installed and in your PATH:\n\n```bash\nwhich lldb\nlldb --version\n```\n\n### Permission denied on core files\n\nOn Linux, enable core dumps:\n\n```bash\nulimit -c unlimited\nsudo sysctl -w kernel.core_pattern=core.%p\n```\n\n### Debugger can't find symbols\n\nCompile your programs with debug info:\n\n```bash\ng++ -g -O0 myprogram.cpp -o myprogram\nclang++ -g -O0 myprogram.cpp -o myprogram\n```\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Contributing\n\nContributions welcome! Please read CONTRIBUTING.md for guidelines.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenpm%2Fclaude_lldb_mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenpm%2Fclaude_lldb_mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenpm%2Fclaude_lldb_mcp/lists"}