0L

0xeb/lldb-agent

Developer tools

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

20 stars 4 forks 품질 57 트렌드 14

LLDB MCP/HTTP server - drive LLDB from an external AI agent via a dbg_exec tool

개요

An LLDB plugin that exposes the debugger over (Model Context Protocol) and plain , so an external AI agent (Claude Code, Claude Desktop, etc.) can drive your debug session through a single dbg_exec tool. The plugin embeds . It is a thin bridge: it runs LLDB commands on request and returns their output. Bring your own agent. - LLDB 16+ with development headers - CMake 3.20+ - C++17 compiler Note: The winget package requires Python 3.10 at runtime (see Windows Setup below). Output: - Linux: build/lldb_agent.so - macOS: build/lldb_agent.dylib - Windows: build-windows/Release/lldb_agent.dll The plugin depends on fastmcpp (vendored as a submodule under external/fastmcpp), which provides the MCP server, cpp-httplib and nlohmann_json. When a server starts it prints its URL and endpoints (and copies them to the clipboard on Windows). Point your MCP client at the SSE endpoint, or POST commands to the HTTP endpoint, and press in LLDB to stop the server. bind_addr defaults to 127.0.0.

README

원문 README의 일부입니다. 원문 보기.

LLDB Agent

An LLDB plugin that exposes the debugger over MCP (Model Context Protocol) and plain HTTP, so an external AI agent (Claude Code, Claude Desktop, etc.) can drive your debug session through a single dbg_exec tool.

The plugin embeds no AI. It is a thin bridge: it runs LLDB commands on request and returns their output. Bring your own agent.

Requirements

  • LLDB 16+ with development headers
  • CMake 3.20+
  • C++17 compiler

Platform-specific requirements

Linux:

sudo apt install liblldb-dev lldb

macOS:

xcode-select --install

Windows:

winget install LLVM.LLVM

Note: The winget package requires Python 3.10 at runtime (see Windows Setup below).

Build

Linux/macOS:

cmake --preset default
cmake --build --preset default

Windows:

cmake --preset windows
cmake --build --preset windows

Output:

  • Linux: build/lldb_agent.so
  • macOS: build/lldb_agent.dylib
  • Windows: build-windows/Release/lldb_agent.dll

The plugin depends on fastmcpp (vendored as a submodule under external/fastmcpp), which provides the MCP server, cpp-httplib and nlohmann_json.

Usage

# Start LLDB with your program
lldb ./myprogram

# Load the plugin
(lldb) plugin load /path/to/lldb_agent.so

# Start the MCP (SSE) server - blocks until Ctrl+C
(lldb) agent mcp

# ...or a plain HTTP server
(lldb) agent http

When a server starts it prints its URL and endpoints (and copies them to the clipboard on Windows). Point your MCP client at the SSE endpoint, or POST commands to the HTTP endpoint, and press Ctrl+C in LLDB to stop the server.

Commands

Command Description
agent help Show help
agent version Show version
agent mcp [bind_addr] Start the MCP (SSE) server, block until Ctrl+C
agent http [bind_addr] Start the plain HTTP server, block until Ctrl+C

bind_addr defaults to 127.0.0.1 (localhost only). Pass 0.0.0.0 to listen on all interfaces — note the server has no authentication, so only do this on trusted networks.

MCP client configuration

agent mcp prints a ready-to-paste snippet, e.g. for Claude Desktop:

{
  "mcpServers": {
    "lldb-agent": {
      "url": "http://127.0.0.1:/sse"
    }
  }
}

HTTP API

agent http exposes:

Method Path Purpose
POST /exec Run a debugger command: {"command": "bt"} → {"output": "...", "success": true}
GET /status Server readiness
POST /shutdown Stop the server
curl -X POST http://127.0.0.1:/exec \
  -H "Content-Type: application/json" \
  -d '{"command": "bt"}'

Windows Setup

The LLVM package from winget requires Python 3.10 to run LLDB. Download and extract to the project bin folder:

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "lldb-agent": { "url": "http://127.0.0.1:<port>/sse" } } }