Skip to content
Back to search

lisa.py

LLDB MCP Integration + other helpful commands

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/ant4g0nist--lisa-py/badge.svg)](/listings/ant4g0nist--lisa-py)

HTML

<a href="/listings/ant4g0nist--lisa-py"><img src="/api/listings/ant4g0nist--lisa-py/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Prerequisites

- Python 3.10 or higher - LLDB with Python bindings - `fastmcp` Python package (for Claude Desktop integration)

Setup

1. Clone this repository:

   git clone https://github.com/ant4g0nist/lldb-mcp.git
   cd lldb-mcp

2. Install required dependencies:

   pip install "fastmcp>=1.2.0" httpx

or

   uv install "fastmcp>=1.2.0" httpx

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 156 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # LLDB MCP Integration
  2. 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.
  3. ## Overview
  4. The integration consists of two main components:
  5. 1. **server.py** - An MCP server that communicates with Claude (or other MCP clients)
  6. 2. **lldb_plugin.py** - A plugin that runs inside LLDB and exposes debugger functionality via JSON-RPC
  7. 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.
  8. ## Installation
  9. ### Prerequisites
  10. - Python 3.10 or higher
  11. - LLDB with Python bindings
  12. - `fastmcp` Python package (for Claude Desktop integration)
  13. ### Setup
  14. 1. Clone this repository:
  15. ```
  16. git clone https://github.com/ant4g0nist/lldb-mcp.git
  17. cd lldb-mcp
  18. ```
  19. 2. Install required dependencies:
  20. ```
  21. pip install "fastmcp>=1.2.0" httpx
  22. ```
  23. or
  24. ```
  25. uv install "fastmcp>=1.2.0" httpx
  26. ```
  27. ## Usage
  28. ### Method 1: Using with Claude for Desktop
  29. 1. Make sure Claude for Desktop is installed and updated to the latest version.
  30. 2. Configure Claude for Desktop to use the LLDB MCP server by editing:
  31. - path: `~/Library/Application Support/Claude/claude_desktop_config.json`
  32. 3. Update the paths and add the LLDB MCP configuration:
  33. ```json
  34. {
  35. "mcpServers": {
  36. "lldb": {
  37. "command": "/path/to/your/.local/bin/uv",
  38. "args": [
  39. "--directory",
  40. "/path/to/your/lldb-mcp/llmcp",
  41. "run",
  42. "lldb_mcp.py"
  43. ]
  44. }
  45. }
  46. }
  47. ```
  48. 4. Restart Claude for Desktop.
  49. 5. Start a debugging session in LLDB and enable the MCP server with:
  50. ```
  51. (lldb) command script import lisa.py
  52. ```
  53. 6. You should now see the LLDB tools available in Claude for Desktop. Look for the hammer icon.
  54. ### Method 2: Direct LLDB Integration
  55. If you prefer to use the plugin directly from LLDB without Claude for Desktop:
  56. 1. Add the following to your `~/.lldbinit` file to load the plugin automatically:
  57. ```
  58. command script import /path/to/lldb_plugin.py
  59. ```
  60. 2. In your LLDB session, start the MCP server:
  61. ```
  62. (lldb) mcp start
  63. ```
  64. 3. The server will be available at http://localhost:13338 for any MCP client to connect to.
  65. ## Available LLDB Tools
  66. The MCP server exposes the following methods for AI assistants:
  67. - **create_target** - Create a debug target from an executable path
  68. - **launch_process** - Launch a process with optional arguments, environment variables, and working directory
  69. - **attach_to_process** - Attach to a running process by PID
  70. - **detach_from_process** - Detach from the current process
  71. - **continue_process** - Continue process execution
  72. - **step_over** - Step over current line or instruction
  73. - **step_into** - Step into function call
  74. - **step_out** - Step out of current function
  75. - **set_breakpoint** - Set a breakpoint at a specified location
  76. - **delete_breakpoint** - Delete a breakpoint by ID
  77. - **list_breakpoints** - List all breakpoints
  78. - **get_backtrace** - Get backtrace for current thread or specified thread
  79. - **get_variables** - Get variables in current frame
  80. - **get_disassembly** - Get disassembly around specified address or current PC
  81. - **read_memory** - Read memory from a specific address
  82. - **get_metadata** - Get metadata about the current debugging session
  83. - **run_lldb_command** - Execute an arbitrary LLDB command
  84. - **evaluate_expression** - Evaluate expression in current context
  85. ## Example Interactions with Claude
  86. Once set up, you can interact with LLDB through Claude using natural language. Some examples:
  87. - "Debug this program at `/path/to/executable`"
  88. - "Set a breakpoint at main"
  89. - "Run the program with arguments `-v input.txt`"
  90. - "Show me the variables in the current frame"
  91. - "Step into the next function call"
  92. - "What's the backtrace right now?"
  93. - "Evaluate the expression `ptr->data[i]`"
  94. - "Show me the assembly code at the current instruction"
  95. ## Troubleshooting
  96. - **Plugin not loading**: Ensure LLDB's Python environment can access the necessary modules
  97. - **Server connection issues**: Check if port 13338 is already in use by another application
  98. - **Claude not detecting tools**: Verify the correct configuration in `claude_desktop_config.json`
  99. - **Command errors**: The plugin logs errors to the LLDB console, check there for details
  100. ## Contributing
  101. Contributions are welcome! Please feel free to submit pull requests or create issues for bugs and feature requests.
  102. ## License
  103. Apache License
  104. ## TODO
  105. - [ ] Update instruction manuals
  106. - [ ] Add more testcases
  107. ### Credits
  108. - [voltron](https://github.com/snare/voltron)
  109. - [lldb](https://lldb.llvm.org/)
  110. - [chisel](https://github.com/facebook/chisel)
  111. - [gef](https://github.com/hugsy/gef)
  112. - [pixd](https://github.com/moreati/python-pixd)
  113. - [hexdump](https://github.com/sinofp/hexdoor)
  114. - [idaref](https://github.com/nologic/idaref)
  115. - [ida-pro-mcp](https://github.com/mrexodia/ida-pro-mcp)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.