
ant4g0nist/lisa.py
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Интеграция MCP с LLDB + другие полезные команды
Обзор
Этот проект обеспечивает интеграцию протокола Model-Context Protocol (MCP) для LLDB, позволяя AI-ассистентам, таким как Claude, взаимодействовать с вашими сессиями отладки через стандартизированный интерфейс. Интеграция состоит из двух основных компонентов: 1. - MCP-сервер, который взаимодействует с Claude (или другими клиентами MCP) 2. - Плагин, который работает внутри LLDB и предоставляет функциональность отладчика через JSON-RPC Эта архитектура позволяет Claude помогать отладке кода, напрямую взаимодействуя с LLDB через естественный язык. MCP-сервер выступает в роли моста, переводя запросы Claude в команды LLDB и возвращая результаты в структурированном формате. - Python 3.10 или выше — LLDB с привязками на Python — пакет fastmcp Python (для интеграции с Claude Desktop) 1. Убедитесь, что Claude for Desktop установлен и обновлен до последней версии. 2. Настройте Claude for Desktop для использования LLDB MCP сервера, отредактировав следующее: - путь: ~/Library/Application Support/Claude/claude_desktop_config.json 3.
Обзор (машинный перевод)
Этот проект обеспечивает интеграцию протокола Model-Context Protocol (MCP) для LLDB, позволяя AI-ассистентам, таким как Claude, взаимодействовать с вашими сессиями отладки через стандартизированный интерфейс.
Обзор
Интеграция состоит из двух основных компонентов:
- server.py — MCP-сервер, который взаимодействует с Claude (или другими MCP-клиентами)
- lldb_plugin.py — плагин, который работает внутри LLDB и предоставляет функциональность отладчика через JSON-RPC
Эта архитектура позволяет Claude помогать отладке кода, напрямую взаимодействуя с LLDB через естественный язык. MCP-сервер выступает в роли моста, переводя запросы Claude в команды LLDB и возвращая результаты в структурированном формате.
Установка
Требования
- Python 3.10 или выше
- LLDB с привязками на Python
fastmcpPython-пакет (для интеграции с Claude Desktop)
Подготовка
-
Клонируйте этот репозиторий:
-
Установите необходимые зависимости:
или
Использование
Метод 1: Использование с Claude для рабочего стола
-
Убедитесь, что Claude for Desktop установлен и обновлен до последней версии.
-
Настройте Claude for Desktop для использования LLDB MCP сервера, отредактировав:
- путь:
~/Library/Application Support/Claude/claude_desktop_config.json
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
LLDB MCP Integration
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.
Overview
The integration consists of two main components:
- server.py - An MCP server that communicates with Claude (or other MCP clients)
- lldb_plugin.py - A plugin that runs inside LLDB and exposes debugger functionality via JSON-RPC
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.
Installation
Prerequisites
- Python 3.10 or higher
- LLDB with Python bindings
fastmcpPython package (for Claude Desktop integration)
Setup
-
Clone this repository:
git clone https://github.com/ant4g0nist/lldb-mcp.git cd lldb-mcp -
Install required dependencies:
pip install "fastmcp>=1.2.0" httpxor
uv install "fastmcp>=1.2.0" httpx
Usage
Method 1: Using with Claude for Desktop
-
Make sure Claude for Desktop is installed and updated to the latest version.
-
Configure Claude for Desktop to use the LLDB MCP server by editing:
- path:
~/Library/Application Support/Claude/claude_desktop_config.json
- path:
-
Update the paths and add the LLDB MCP configuration:
{ "mcpServers": { "lldb": { "command": "/path/to/your/.local/bin/uv", "args": [ "--directory", "/path/to/your/lldb-mcp/llmcp", "run", "lldb_mcp.py" ] } } } -
Restart Claude for Desktop.
-
Start a debugging session in LLDB and enable the MCP server with:
(lldb) command script import lisa.py -
You should now see the LLDB tools available in Claude for Desktop. Look for the hammer icon.
Method 2: Direct LLDB Integration
If you prefer to use the plugin directly from LLDB without Claude for Desktop:
-
Add the following to your
~/.lldbinitfile to load the plugin automatically:command script import /path/to/lldb_plugin.py -
In your LLDB session, start the MCP server:
(lldb) mcp start -
The server will be available at http://localhost:13338 for any MCP client to connect to.
Available LLDB Tools
The MCP server exposes the following methods for AI assistants:
- create_target - Create a debug target from an executable path
- launch_process - Launch a process with optional arguments, environment variables, and working directory
- attach_to_process - Attach to a running process by PID
- detach_from_process - Detach from the current process
- continue_process - Continue process execution
- step_over - Step over current line or instruction
- step_into - Step into function call
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"lldb": {
"command": "/path/to/your/.local/bin/uv",
"args": [
"--directory",
"/path/to/your/lldb-mcp/llmcp",
"run",
"lldb_mcp.py"
]
}
}
}