
ant4g0nist/lisa.py
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
LLDB MCP統合+その他の役立つコマンド
概要
このプロジェクトはLLDB向けのモデル・コンテキストプロトコル(MCP)統合を提供し、ClaudeのようなAIアシスタントが標準化されたインターフェースを通じてデバッグセッションとやり取りできるようにします。 統合は主に2つの要素で構成されています。 1. - Claude(または他のMCPクライアント)と通信するMCPサーバー2.- LLDB内で動作し、JSON-RPCを通じてデバッガ機能を公開するプラグイン このアーキテクチャにより、Claudeは自然言語を通じてLLDBと直接やり取りすることでコードをデバッグするのを助けることができます。MCPサーバーはブリッジとして機能し、ClaudeのリクエストをLLDBコマンドに変換し、結果を構造化形式で返します。 - Python 3.10以降 - Pythonバインディング付きのLLDB - fastmcp Pythonパッケージ(Claudeデスクトップ統合用) 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アシスタントが標準化されたインターフェースを通じてデバッグセッションとやり取りできるようにします。
概要
統合は主に2つの要素で構成されています。
- server.py - Claude(または他のMCPクライアント)と通信するMCPサーバー
- lldb_plugin.py - LLDB内で動作し、JSON-RPCを通じてデバッガ機能を公開するプラグイン
このアーキテクチャにより、Claudeは自然言語を通じてLLDBと直接やり取りすることでコードをデバッグするのを助けることができます。MCPサーバーはブリッジとして機能し、ClaudeのリクエストをLLDBコマンドに変換し、結果を構造化形式で返します。
設置
前提条件
- Python 3.10以降
- Pythonバインディング付きのLLDB
fastmcpPython パッケージ(Claude Desktop 統合用)
セットアップ
-
このリポジトリのクローン:
-
必要な依存関係をインストールする:
または
使用法
方法1:デスクトップ版のClaudeでの使用
-
Claude for Desktopがインストールされ、最新バージョンに更新されていることを確認してください。
-
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:
- 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"
]
}
}
}