
xhd2015/dlv-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
MCP Сервер, который раскрывает отладчик Delve Golang, позволяет ИИ самостоятельно отлаживать
Обзор
MCP-сервер, который позволяет LLM взаимодействовать с отладчиком Delve Go. Этот проект реализует сервер Model Context Protocol (MCP), который интегрируется с отладчиком Delve Go, чтобы позволить помощникам ИИ отлаживать приложения Go. Сервер предоставляет набор инструментов, которые позволяют LLM запускать, контролировать и взаимодействовать с сеансами отладки. Пример можно найти на сайте EXAMPLE.md. - Начать сеансы отладки для программ Go - Установить точки останова в коде - Шаг через код (следующий, шаг в, шаг в) - Оценить выражения в контексте сеанса отладки - Проверить переменные и следы стека - Управлять несколькими сеансами отладки - Go 1.21 или выше - установлен отладчик Delve (Go install github.com/go-delve/delve/cmd/dlv@latest) Затем настройте MCP Server на http://localhost:9097/sse, в Cursor или любом MCP-клиенте.
Обзор (машинный перевод)
MCP-сервер, который позволяет LLM взаимодействовать с отладчиком Delve Go.
Описание
Этот проект реализует сервер Model Context Protocol (MCP), который интегрируется с отладчиком Delve Go, чтобы позволить помощникам ИИ отлаживать приложения Go. Сервер предоставляет набор инструментов, которые позволяют LLM запускать, контролировать и взаимодействовать с сеансами отладки.
Пример можно найти на сайте EXAMPLE.md.
Особенности
Начните отладочные сессии для программ Go Установите точки останова в коде
- Шаг через код (следующий, шаг в, шаг в сторону)
- Оценка выражений в контексте сессии отладки
- Проверьте переменные и следы стека
- Управление несколькими сеансами отладки
##Установка
Предпосылки
1.21 или выше Устанавливается отладчик Delve ([T0])
###Установить
Использование
Запустите MCP-сервер:
Затем настройте MCP Server на http://localhost:9097/sse, в Cursor или любом MCP-клиенте.
Проверьте MCP-сервер
Доступные инструменты
###Управление сеансом отладки
- [[Т2]]: Начать новую сессию отладки
- [[Т3]]: Программа Path to Go для отладки
- [[Т4]]: Аргументы командной строки для программы (факультативно)
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
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 →