MCP Server GDB

by pansila
Verified
MIT License
13
  • Linux
  • Apple

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Integration with Rust for debugging Rust applications, allowing users to set breakpoints, view stack information, and control program execution through GDB.

MCP 服务器 GDB

基于MCP协议的GDB/MI协议服务器,提供带有AI助手的远程应用程序调试功能。

特征

  • 创建和管理 GDB 调试会话
  • 设置和管理断点
  • 查看堆栈信息和变量
  • 控制程序执行(运行、暂停、单步执行等)
  • 支持并发多会话调试

安装

预构建的二进制文件

在发布页面中找到二进制文件,根据您的工作平台选择一个,然后您就可以直接运行它。

从源代码构建

克隆存储库并通过 cargo 构建它

cargo build --release cargo run

用法

  1. 直接运行: ./mcp-server-gdb server-gdb
  2. 服务器支持两种传输模式:
    • Stdio(默认):标准输入/输出传输
    • SSE:服务器发送事件传输,默认为http://127.0.0.1:8080

配置

您可以通过修改src/config.rs文件或环境变量来调整服务器配置:

  • 服务器 IP 地址
  • 服务器端口
  • GDB命令超时时间(秒)

支持的 MCP 工具

会话管理

  • create_session创建一个新的 GDB 调试会话
  • get_session获取特定会话信息
  • get_all_sessions - 获取所有会话
  • close_session - 关闭会话

调试控制

  • start_debugging开始调试
  • stop_debugging停止调试
  • continue_execution - 继续执行
  • step_execution - 进入下一行
  • next_execution - 跨过下一行

断点管理

  • get_breakpoints - 获取断点列表
  • set_breakpoint - 设置断点
  • delete_breakpoint - 删除断点

调试信息

  • get_stack_frames - 获取堆栈框架信息
  • get_local_variables - 获取局部变量
  • get_registers - 获取寄存器
  • read_memory - 读取内存内容

执照

麻省理工学院

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

基于MCP协议的GDB/MI协议服务器,提供远程应用程序调试功能。

  1. Features
    1. Installation
      1. Pre-built Binaries
      2. Build From Source
    2. Usage
      1. Configuration
        1. Supported MCP Tools
          1. Session Management
          2. Debug Control
          3. Breakpoint Management
          4. Debug Information
        2. License
          ID: md0l0j81g1