Skip to main content
Glama
MCP GDB Server

MCP GDB Server

by signal-slot

MCP GDB サーバー

Claude やその他の AI アシスタントで使用するための GDB デバッグ機能を提供するモデル コンテキスト プロトコル (MCP) サーバー。

特徴

  • GDBデバッグセッションを開始および管理する

  • 分析のためにプログラムとコアダンプをロードする

  • ブレークポイントを設定し、コードをステップ実行し、メモリを調べる

  • コールスタック、変数、レジスタを表示する

  • 任意のGDBコマンドを実行する

Related MCP server: GDB MCP Server

インストール

# Clone the repository
git clone https://github.com/signal-slot/mcp-gdb.git
cd mcp-gdb

# Install dependencies
npm install

# Build the project
npm run build

使用法

Claude や他の MCP 対応アシスタントと併用する

  1. このサーバーを含めるように、Claude デスクトップ アプリまたはブラウザ拡張機能で MCP 設定を構成します。

{
  "mcpServers": {
    "gdb": {
      "command": "node",
      "args": ["/path/to/mcp-gdb/build/index.js"],
      "disabled": false
    }
  }
}
  1. Claude を再起動するか、ページを更新してください。

  2. これで、Claude との会話で GDB ツールを使用できるようになります。

コマンド例

Claude を介して GDB MCP サーバーを使用する例をいくつか示します。

GDBセッションの開始

Use gdb_start to start a new debugging session

プログラムの読み込み

Use gdb_load to load /path/to/my/program with the sessionId that was returned from gdb_start

ブレークポイントの設定

Use gdb_set_breakpoint to set a breakpoint at main in the active GDB session

プログラムの実行

Use gdb_continue to start execution

変数の検討

Use gdb_print to evaluate the expression "my_variable" in the current context

バックトレースを取得する

Use gdb_backtrace to see the current call stack

セッションを終了する

Use gdb_terminate to end the debugging session

サポートされているGDBコマンド

  • gdb_start : 新しいGDBセッションを開始する

  • gdb_load : プログラムをGDBにロードする

  • gdb_command : 任意のGDBコマンドを実行する

  • gdb_terminate : GDBセッションを終了する

  • gdb_list_sessions : アクティブなGDBセッションをすべて一覧表示する

  • gdb_attach : 実行中のプロセスにアタッチする

  • gdb_load_core : コアダンプファイルをロードする

  • gdb_set_breakpoint : ブレークポイントを設定する

  • gdb_continue : プログラムの実行を継続する

  • gdb_step : ステッププログラム実行

  • gdb_next : 関数呼び出しをステップオーバーする

  • gdb_finish : 現在の関数が戻るまで実行する

  • gdb_backtrace : コールスタックを表示する

  • gdb_print : 式の値を印刷する

  • gdb_examine : メモリを調べる

  • gdb_info_registers : レジスタを表示する

ライセンス

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

Available Tools

16 tools
gdb_attachC

Attach to a running process

Inputs: pid (required), sessionId (required).

gdb_backtraceC

Show call stack

Inputs: sessionId (required), full, limit.

gdb_commandC

Execute a GDB command

Inputs: command (required), sessionId (required).

gdb_continueC

Continue program execution

Inputs: sessionId (required).

gdb_examineC

Examine memory

Inputs: expression (required), sessionId (required), count, format.

gdb_finishC

Execute until the current function returns

Inputs: sessionId (required).

gdb_info_registersC

Display registers

Inputs: sessionId (required), register.

gdb_list_sessionsB

List all active GDB sessions

Inputs: no named parameters.

gdb_loadC

Load a program into GDB

Inputs: program (required), sessionId (required), arguments.

gdb_load_coreC

Load a core dump file

Inputs: corePath (required), program (required), sessionId (required).

gdb_nextC

Step over function calls

Inputs: sessionId (required), instructions.

gdb_printC

Print value of expression

Inputs: expression (required), sessionId (required).

gdb_set_breakpointC

Set a breakpoint

Inputs: location (required), sessionId (required), condition.

gdb_startC

Start a new GDB session

Inputs: gdbPath, workingDir.

gdb_stepC

Step program execution

Inputs: sessionId (required), instructions.

gdb_terminateC

Terminate a GDB session

Inputs: sessionId (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 16 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose with no ambiguity. Each tool targets a specific GDB operation like attaching, stepping, examining memory, or managing sessions, making misselection unlikely.

    Naming Consistency5/5

    All tools follow a consistent 'gdb_' prefix with descriptive verb_noun patterns (e.g., gdb_attach, gdb_backtrace, gdb_set_breakpoint). This predictability aids agent understanding and usage.

    Tool Count4/5

    With 16 tools, the count is slightly high but reasonable for a GDB debugging server. It covers essential debugging operations without feeling overly heavy, though it could be streamlined slightly.

    Completeness5/5

    The toolset provides complete coverage for GDB debugging workflows, including session management, execution control, breakpoints, memory examination, and stack analysis. No obvious gaps exist for the domain.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides structured debugging capabilities through LLDB, enabling AI assistants to set breakpoints, inspect variables, analyze crashes, disassemble code, and evaluate expressions in C/C++ programs.
      17
      3
      Apache 2.0
    • A
      license
      C
      quality
      B
      maintenance
      Enables LLM clients to interact with the GNU Debugger (GDB) for comprehensive debugging and binary analysis. It provides a wide range of tools for program execution control, memory examination, stack analysis, and disassembly.
      13
      74
      GPL 3.0
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to start and manage LLDB debugging sessions, including loading programs, setting breakpoints, stepping through code, and examining memory.
      19
      1
      MIT