{
  "name": "lisa.py",
  "symbol": "LISA",
  "description": "LLDB MCP Integration + other helpful commands\n\n# LLDB MCP Integration\n\nThis 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.\n\n## Overview\n\nThe integration consists of two main components:\n\n1. **server.py** - An MCP server that communicates with Claude (or other MCP clients)\n2. **lldb_plugin.py** - A plugin that runs inside LLDB and exposes debugger functionality via JSON-RPC\n\nThis 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.\n\n## Installation\n\n### Prerequisites\n\n- Python 3.10 or higher\n- LLDB with Python bindings\n- `fastmcp` Python package (for Claude Desktop integration)\n\n### Setup\n\n1. Clone this repository:\n   ```\n   git clone https://github.com/ant4g0nist/lldb-mcp.git\n   cd lldb-mcp\n   ```\n\n2. Install required dependencies:\n   ```\n   pip install \"fastmcp>=1.2.0\" httpx\n   ```\n\n   or\n\n   ```\n   uv install \"fastmcp>=1.2.0\" httpx\n   ```\n\n## Usage\n\n### Method 1: Using with Claude for Desktop\n\n1. Make sure Claude for Desktop is installed and updated to the latest version.\n\n2. Configure Claude for Desktop to use the LLDB MCP server by editing:\n   - path: `~/Library/Application Support/Claude/claude_desktop_config.json`\n\n3. Update the paths and add the LLDB MCP configuration:\n   ```json\n   {\n     \"mcpServers\": {\n       \"lldb\": {\n         \"command\": \"/path/to/your/.local/bin/uv\",\n         \"args\": [\n           \"--directory\",\n           \"/path/to/your/lldb-mcp/llmcp\",\n           \"run\",\n           \"lldb_mcp.py\"\n         ]\n       }\n     }\n   }\n   ```\n\n4. Restart Claude for Desktop.\n\n5. Start a debugging session in LLDB and enable the MCP server with:\n   ```\n   (lldb) command script import lisa.py\n   ```\n\n6. You should now see the LLDB tools available in Claude for Desktop. Look for the hammer icon.\n\n### Method 2: Direct LLDB Integration\n\nIf you prefer to use the plugin directly from LLDB without Claude for Desktop:\n\n1. Add the following to your `~/.lldbinit` file to load the plugin automatically:\n   ```\n   command script import /path/to/lldb_plugin.py\n   ```\n\n2. In your LLDB session, start the MCP server:\n   ```\n   (lldb) mcp start\n   ```\n\n3. The server will be available at http://localhost:13338 for any MCP client to connect to.\n\n## Available LLDB Tools\n\nThe MCP server exposes the following methods for AI assistants:\n\n- **create_target** - Create a debug target from an executable path\n- **launch_process** - Launch a process with optional arguments, environment variables, and working directory\n- **attach_to_process** - Attach to a running process by PID\n- **detach_from_process** - Detach from the current process\n- **continue_process** - Continue process execution\n- **step_over** - Step over current line or instruction\n- **step_into** - Step into function call\n- **step_out** - Step out of current function\n- **set_breakpoint** - Set a breakpoint at a specified location\n- **delete_breakpoint** - Delete a breakpoint by ID\n- **list_breakpoints** - List all breakpoints\n- **get_backtrace** - Get backtrace for current thread or specified thread\n- **get_variables** - Get variables in current frame\n- **get_disassembly** - Get disassembly around specified address or current PC\n- **read_memory** - Read memory from a specific address\n- **get_metadata** - Get metadata about the current debugging session\n- **run_lldb_command** - Execute an arbitrary LLDB command\n- **evaluate_expression** - Evaluate expression in current context\n\n## Example Interactions with Claude\n\nOnce set up, you can interact with LLDB through Claude using natural language. Some examples:\n\n- \"Debug this program at `/path/to/executable`\"\n- \"Set a breakpoint at main\"\n- \"Run the program with arguments `-v input.txt`\"\n- \"Show me the variables in the current frame\"\n- \"Step into the next function call\"\n- \"What's the backtrace right now?\"\n- \"Evaluate the expression `ptr->data[i]`\"\n- \"Show me the assembly code at the current instruction\"\n\n## Troubleshooting\n\n- **Plugin not loading**: Ensure LLDB's Python environment can access the necessary modules\n- **Server connection issues**: Check if port 13338 is already in use by another application\n- **Claude not detecting tools**: Verify the correct configuration in `claude_desktop_config.json`\n- **Command errors**: The plugin logs errors to the LLDB console, check there for details\n\n## Contributing\n\nContributions are welcome! Please feel free to submit pull requests or create issues for bugs and feature requests.\n\n## License\n\nApache License\n\n## TODO\n- [ ] Update instruction manuals\n- [ ] Add more testcases\n\n### Credits\n\n- [voltron](https://github.com/snare/voltron)\n- [lldb](https://lldb.llvm.org/)\n- [chisel](https://github.com/facebook/chisel)\n- [gef](https://github.com/hugsy/gef)\n- [pixd](https://github.com/moreati/python-pixd)\n- [hexdump](https://github.com/sinofp/hexdoor)\n- [idaref](https://github.com/nologic/idaref)\n- [ida-pro-mcp](https://github.com/mrexodia/ida-pro-mcp)\n\n\nSource: https://github.com/ant4g0nist/lisa.py",
  "image": "https://static-create.jup.ag/images/X7mSFBsHzqqBZutb6ZhQW3i8erArJrkmWvo8huyswrm"
}