AL

ant4g0nist/lisa.py

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

756 stars 112 forks 품질 69 트렌드 21Apache-2.0

LLDB MCP 통합 + 기타 유용한 명령어

개요

이 프로젝트는 LLDB용 모델-컨텍스트 프로토콜(MCP) 통합을 제공하여 Claude와 같은 AI 어시스턴트가 표준화된 인터페이스를 통해 디버깅 세션과 상호작용할 수 있도록 합니다. 통합은 두 가지 주요 구성 요소로 구성됩니다: 1. - Claude(또는 다른 MCP 클라이언트)와 통신하는 MCP 서버 2. - LLDB 내에서 실행되며 JSON-RPC를 통해 디버거 기능을 노출하는 플러그인 이 아키텍처는 Claude가 자연어를 통해 LLDB와 직접 상호작용하여 코드를 디버깅하는 데 도움을 줍니다. MCP 서버는 다리 역할을 하여 Claude의 요청을 LLDB 명령어로 변환하고 결과를 구조화된 형식으로 반환합니다. - Python 3.10 이상 - LLDB with Python 바인딩 - fastmcp Python 패키지 (Claude Desktop 통합용) 1. Claude for Desktop이 최신 버전으로 설치되고 업데이트되었는지 확인하세요. 2. Claude for Desktop에서 LLDB MCP 서버를 사용하도록 다음을 편집하여 구성할 수 있습니다: - path: ~/Library/Application Support/Claude/claude_desktop_config.json 3.

개요(AI 번역)

이 프로젝트는 LLDB용 모델-컨텍스트 프로토콜(MCP) 통합을 제공하여 Claude와 같은 AI 어시스턴트가 표준화된 인터페이스를 통해 디버깅 세션과 상호작용할 수 있도록 합니다.

개요

통합은 두 가지 주요 구성 요소로 구성됩니다:

  1. server.py - Claude(또는 다른 MCP 클라이언트)와 통신하는 MCP 서버입니다.
  2. lldb_plugin.py - LLDB 내에서 실행되며 JSON-RPC를 통해 디버거 기능을 노출하는 플러그인

이 아키텍처는 Claude가 자연어를 통해 LLDB와 직접 상호작용하여 코드를 디버깅하는 데 도움을 줍니다. MCP 서버는 다리 역할을 하여 Claude의 요청을 LLDB 명령어로 변환하고 결과를 구조화된 형식으로 반환합니다.

설치

전제 조건

  • Python 3.10 이상
  • 파이썬 바인딩을 가진 LLDB
  • fastmcp Python 패키지 (Claude Desktop 통합용)

설정

  1. 이 저장소를 복제:

  2. 필요한 의존성 설치:

또는

사용

방법 1: 데스크톱용 클로드 사용

  1. Claude for Desktop이 최신 버전으로 설치되고 업데이트되었는지 확인하세요.

  2. Claude for Desktop에서 LLDB MCP 서버를 사용하도록 다음을 편집하여 설정하기:

  • 경로: ~/Library/Application Support/Claude/claude_desktop_config.json

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

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:

  1. server.py - An MCP server that communicates with Claude (or other MCP clients)
  2. 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
  • 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
    

Usage

Method 1: Using with Claude for Desktop

  1. Make sure Claude for Desktop is installed and updated to the latest version.

  2. Configure Claude for Desktop to use the LLDB MCP server by editing:

    • path: ~/Library/Application Support/Claude/claude_desktop_config.json
  3. 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"
          ]
        }
      }
    }
    
  4. Restart Claude for Desktop.

  5. Start a debugging session in LLDB and enable the MCP server with:

    (lldb) command script import lisa.py
    
  6. 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:

  1. Add the following to your ~/.lldbinit file to load the plugin automatically:

    command script import /path/to/lldb_plugin.py
    
  2. In your LLDB session, start the MCP server:

    (lldb) mcp start
    
  3. 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
GitHub에서 전체 README 보기

설치

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" ] } } }