
xhd2015/dlv-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
MCPの特長 GolangのDelve Debuggerを公開するサーバーは、AIがセルフデバッグできるようにします
概要
LLMがDelve Goデバッガとやり取りできるMCPサーバー。 このプロジェクトでは、Delve Go デバッガと統合するモデルコンテキストプロトコル (MCP) サーバを実装し、AI アシスタントがGo アプリケーションをデバッグできるようにします。 サーバは、LLM がデバッグセッションを開始、制御、対話できる一連のツールを公開します。 EXAMPLE.md で作業例を確認できます。 - Goプログラムのデバッグセッションを開始する - コードでブレークポイントを設定する - コードを経由してステップ(次、ステップイン、ステップアウト) - デバッグセッションのコンテキストで式を評価します - 変数を調べ、トレースをスタック - 複数のデバッグセッションを管理する - インストールされている1.21以上 - Delveデバッガ(インストール先 github.com/go-delve/delve/cmd/dlv@latest) 次に、Cursor または MCP クライアントの [http://localhost:9097/sse,] で MCP Server を構成します.
概要(AI 翻訳)
LLMがDelve Goデバッガとやり取りできるMCPサーバー。
説明
このプロジェクトでは、Delve Go デバッガと統合するモデルコンテキストプロトコル (MCP) サーバを実装し、AI アシスタントがGo アプリケーションをデバッグできるようにします。 サーバは、LLM がデバッグセッションを開始、制御、対話できる一連のツールを公開します。
EXAMPLE.md で作業例を確認できます。
##特徴
- Goプログラムのデバッグセッションを開始
- コードにブレイクポイントを設定する
- コードを通るステップ(次、ステップイン、ステップアウト)
- デバッグセッションのコンテキストで式を評価する
- 変数および積み重ねの跡を点検して下さい
- 複数のデバッグセッションの管理
インストール
前提条件
- 1.21以上
- Delve のデバッガは取付けました([
go install github.com/go-delve/delve/cmd/dlv@latest))
インストール
使用法
MCP サーバーを起動します。
次に、Cursor または MCP クライアントの [[http://localhost:9097/sse]] で MCP Server を構成します。
MCP サーバーのインスペクト
利用可能なツール
デバッグセッション管理
- [
start_debug: 新しいデバッグセッションを開始する
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Go Delve Debugger MCP Server
An MCP server that allows LLMs to interact with the Delve Go debugger.
Description
This project implements a Model Context Protocol (MCP) server that integrates with the Delve Go debugger to enable AI assistants to debug Go applications. The server exposes a set of tools that allow LLMs to start, control, and interact with debug sessions.
You can find a working example at EXAMPLE.md.
Features
- Start debug sessions for Go programs
- Set breakpoints in code
- Step through code (next, step in, step out)
- Evaluate expressions in the context of a debug session
- Inspect variables and stack traces
- Manage multiple debug sessions
Installation
Prerequisites
- Go 1.21 or higher
- Delve debugger installed (
go install github.com/go-delve/delve/cmd/dlv@latest)
Install
go install github.com/xhd2015/dlv-mcp/cmd/dlv-mcp@latest
Usage
Start the MCP server:
dlv-mcp --listen :9097
Then configure MCP Server at http://localhost:9097/sse, in Cursor or any MCP client.
Inspect the MCP Server
bunx @modelcontextprotocol/inspector dlv-mcp
Available Tools
Debug Session Management
-
start_debug: Start a new debug sessionprogram: Path to Go program to debugargs: Command line arguments for the program (optional)mode: Debug mode (debug,test, orexec, default:debug)
-
terminate_debug: Terminate a debug sessionsession_id: ID of the debug session to terminate
-
list_debug_sessions: List active debug sessions
Breakpoint Management
set_breakpoint: Set a breakpoint in a debug sessionsession_id: ID of the debug sessionfile: Source file to set breakpoint in (absolute path)line: Line number to set breakpoint at
Execution Control
-
continue: Continue execution in a debug sessionsession_id: ID of the debug session
-
next: Step over current line in a debug sessionsession_id: ID of the debug session
-
step_in: Step into function in a debug sessionsession_id: ID of the debug session
-
step_out: Step out of function in a debug sessionsession_id: ID of the debug session
Inspection
evaluate: Evaluate an expression in a debug sessionsession_id: ID of the debug sessionexpression: Expression to evaluateframe_id: Stack frame ID (optional, default: 0)
Example Workflow
-
Start a debug session:
start_debug program=/path/to/program.go -
Set a breakpoint:
set_breakpoint session_id=session-123456 file=/path/to/program.go line=15 -
Continue to breakpoint:
continue session_id=session-123456 -
Evaluate an expression:
evaluate session_id=session-123456 expression="myVariable" -
Step over a line:
next session_id=session-123456
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →