Skip to content
Back to search

mcp-gdb

A Model Context Protocol (MCP) server that provides GDB debugging functionality for use with Claude or other AI assistants.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/signal-slot--mcp-gdb/badge.svg)](/listings/signal-slot--mcp-gdb)

HTML

<a href="/listings/signal-slot--mcp-gdb"><img src="/api/listings/signal-slot--mcp-gdb/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Claude Code

claude mcp add gdb -- npx -y mcp-gdb

Claude Desktop

Add the following to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "gdb": {
      "command": "npx",
      "args": ["-y", "mcp-gdb"]
    }
  }
}

Install from Source

git clone https://github.com/signal-slot/mcp-gdb.git
cd mcp-gdb
npm install
npm run build

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 112 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # MCP GDB Server
  2. [![npm version](https://img.shields.io/npm/v/mcp-gdb.svg)](https://www.npmjs.com/package/mcp-gdb)
  3. [![license](https://img.shields.io/npm/l/mcp-gdb.svg)](https://github.com/signal-slot/mcp-gdb/blob/main/LICENSE)
  4. A Model Context Protocol (MCP) server that provides GDB debugging functionality for use with Claude or other AI assistants.
  5. ## Features
  6. - Start and manage GDB debugging sessions
  7. - Load programs and core dumps for analysis
  8. - Set breakpoints, step through code, and examine memory
  9. - View call stacks, variables, and registers
  10. - View source code with VS Code integration
  11. - Execute arbitrary GDB commands
  12. ## Installation
  13. ### Claude Code
  14. ```bash
  15. claude mcp add gdb -- npx -y mcp-gdb
  16. ```
  17. ### Claude Desktop
  18. Add the following to your Claude Desktop MCP configuration:
  19. ```json
  20. {
  21. "mcpServers": {
  22. "gdb": {
  23. "command": "npx",
  24. "args": ["-y", "mcp-gdb"]
  25. }
  26. }
  27. }
  28. ```
  29. ### Install from Source
  30. ```bash
  31. git clone https://github.com/signal-slot/mcp-gdb.git
  32. cd mcp-gdb
  33. npm install
  34. npm run build
  35. ```
  36. ## Usage
  37. ### Example Commands
  38. Here are some examples of using the GDB MCP server through Claude:
  39. #### Starting a GDB session
  40. ```
  41. Use gdb_start to start a new debugging session
  42. ```
  43. #### Loading a program
  44. ```
  45. Use gdb_load to load /path/to/my/program with the sessionId that was returned from gdb_start
  46. ```
  47. #### Setting a breakpoint
  48. ```
  49. Use gdb_set_breakpoint to set a breakpoint at main in the active GDB session
  50. ```
  51. #### Running the program
  52. ```
  53. Use gdb_continue to start execution
  54. ```
  55. #### Examining variables
  56. ```
  57. Use gdb_print to evaluate the expression "my_variable" in the current context
  58. ```
  59. #### Getting a backtrace
  60. ```
  61. Use gdb_backtrace to see the current call stack
  62. ```
  63. #### Terminating the session
  64. ```
  65. Use gdb_terminate to end the debugging session
  66. ```
  67. ## Supported GDB Commands
  68. - `gdb_start`: Start a new GDB session
  69. - `gdb_load`: Load a program into GDB
  70. - `gdb_command`: Execute an arbitrary GDB command
  71. - `gdb_terminate`: Terminate a GDB session
  72. - `gdb_list_sessions`: List all active GDB sessions
  73. - `gdb_attach`: Attach to a running process
  74. - `gdb_load_core`: Load a core dump file
  75. - `gdb_set_breakpoint`: Set a breakpoint
  76. - `gdb_continue`: Continue program execution
  77. - `gdb_step`: Step program execution
  78. - `gdb_next`: Step over function calls
  79. - `gdb_finish`: Execute until the current function returns
  80. - `gdb_backtrace`: Show call stack
  81. - `gdb_print`: Print value of expression
  82. - `gdb_examine`: Examine memory
  83. - `gdb_info_registers`: Display registers
  84. - `gdb_list_source`: List source code at current location or specified location with VS Code integration
  85. ## License
  86. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.