Delve MCP

MIT License
1
  • Linux
  • Apple

Integrations

  • Supported platform for running the Delve MCP server with specific configuration paths.

  • Supported platform for running the Delve MCP server with specific configuration paths.

  • Provides integration with Mozilla's rr tool for replay debugging of Go programs, allowing historical execution tracing and analysis.

デルブMCP

Delve デバッガー統合用の MCP サーバー

これはTypeScriptベースのMCPサーバーで、Goプログラム用のDelveデバッガーへの完全なインターフェースを提供します。MCPツールを通じて、主要なDelveコマンドと機能をすべて実装しています。

特徴

リソース

  • delve:// URI 経由でデバッグ セッションの一覧を表示してアクセスする
  • 各セッションには、そのタイプ、ターゲット、ポートに関するメタデータがあります。
  • セッションの詳細と状態のJSON表現

ツール

Go プログラムをデバッグ、トレース、分析するには:

  • デバッグコマンド( debugattachexectest
  • コアダンプ分析
  • プログラムトレース
  • rrでデバッグを再生する
  • DAPサーバーのサポート
  • 条件付きブレークポイント管理
  • 実行制御( continuestepnext
  • 変数の検査と評価
  • バックエンドの選択( nativelldbrr
  • ログ記録の構成
  • セッション管理

環境設定

サーバーには以下が必要です:

  • Delve と一緒にインストールされた Go ( go install github.com/go-delve/delve/cmd/dlv@latest )
  • 再生機能については、Mozilla rr ( https://github.com/mozilla/rr ) をご覧ください。
  • Node.jsとnpm

インストール

Delve MCP サーバーをインストールするには:

npm install @dwisiswant0/delve-mcp

発達

依存関係をインストールします:

npm install

サーバーを構築します。

npm run build

自動リビルドを使用した開発の場合:

npm run watch

構成

Claude Desktop で使用するには、サーバー設定を追加します。

  • Linux の場合: ~/.config/Claude/claude_desktop_config.json
  • MacOS の場合: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows の場合: %APPDATA%/Claude/claude_desktop_config.json
{ "mcpServers": { "delve-mcp": { "command": "/path/to/delve-mcp/build/index.js" } } }

利用可能なツール

デバッグコマンド

  • debug - 現在のディレクトリまたは指定されたパッケージ内の Go パッケージをデバッグします
  • attach - PIDで実行中のプロセスにアタッチする
  • exec - コンパイル済みバイナリの実行とデバッグ
  • test - 現在のパッケージまたは指定されたパッケージのテストをデバッグします
  • core - 関連する実行ファイルを含むコアダンプファイルを調べる
  • dap - デバッグアダプタプロトコル(DAP)サーバーを起動する
  • replay - rr トレース記録を再生する
  • trace - 関数マッチングによるプログラム実行のトレース

制御コマンド

  • setBreakpoint - オプションの条件でブレークポイントを設定する
  • removeBreakpoint - 既存のブレークポイントを削除する
  • continue - プログラムの実行を継続する
  • next - 次の行へ進む
  • step - 関数呼び出しにステップインする
  • stepout - 現在の関数からステップアウトする
  • variables - 現在のスコープ内のローカル変数を一覧表示する
  • evaluate - 現在のスコープ内の式を評価する

設定コマンド

  • version - Delveのバージョン情報を取得する
  • setBackend - デバッグバックエンドを構成する( nativelldbrr
  • configureLogging - デバッグログコンポーネントを構成する

使用例

デバッグセッションの開始

// Debug current package { name: "debug" } // Debug with specific package and build flags { name: "debug", arguments: { package: "./cmd/myapp", buildFlags: "-tags=integration" } }

ブレークポイントの管理

// Set a breakpoint { name: "setBreakpoint", arguments: { sessionId: "abc123", file: "main.go", line: 42, condition: "count > 5" } }

検査状態

// List variables { name: "variables", arguments: { sessionId: "abc123" } } // Evaluate expression { name: "evaluate", arguments: { sessionId: "abc123", expr: "myVar.Field" } }

ライセンス

マサチューセッツ工科大学。

-
security - not tested
A
license - permissive license
-
quality - not tested

Go プログラム用の Delve デバッガーへの完全なインターフェイスを提供する TypeScript ベースの MCP サーバー。自然言語コマンドを使用して Go コードのデバッグ、トレース、分析が可能になります。

  1. Features
    1. Resources
    2. Tools
    3. Environment Setup
  2. Installation
    1. Development
      1. Configuration
    2. Available Tools
      1. Debug Commands
      2. Control Commands
      3. Configuration Commands
    3. Usage Examples
      1. Starting a Debug Session
      2. Managing Breakpoints
      3. Inspecting State
    4. License
      ID: x7yii528ii