mcp_server_gdb

MCP Server GDB is a GDB/MI protocol server based on the MCP protocol, providing remote application debugging capabilities. It supports concurrent multi-session debugging and utilizes AI assistants to enhance the debugging process. The built-in TUI allows users to inspect agent behaviors, facilitating prompt improvements.

GitHub Stars

45

User Rating

Not Rated

Favorites

0

Views

38

Forks

9

Issues

5

Installation
Difficulty
Intermediate
Estimated Time
10-20 minutes
Requirements
Rust: Latest version

Installation

Installation

Prerequisites

Rust: Latest version

Installation Steps

1. Clone Repository

bash
git clone https://github.com/pansila/mcp_server_gdb
cd mcp_server_gdb

2. Build

bash
cargo build --release

3. Start Server

bash
cargo run

Troubleshooting

Common Issues

Issue: Server won't start Solution: Check your Rust installation and ensure dependencies are correctly installed.

Configuration

Configuration

Basic Configuration

You can adjust server configuration by modifying the src/config.rs file or using environment variables:
Server IP Address
Server port
GDB command timeout time (in seconds)

Configuration Example

rust
// src/config.rs
const SERVER_IP: &str = "127.0.0.1";
const SERVER_PORT: u16 = 8080;
const GDB_TIMEOUT: u64 = 5;

Examples

Examples

Starting the Server

bash
./mcp-server-gdb

Creating a Debug Session

json
{
  "command": "create_session",
  "params": {
    "session_name": "my_debug_session"
  }
}

Controlling Program Execution

json
{
  "command": "start_debugging",
  "params": {
    "session_name": "my_debug_session"
  }
}

Use Cases

Debugging applications on a remote server
Managing multiple debugging sessions concurrently
Enhancing debugging efficiency with AI assistants
Setting breakpoints to monitor specific lines of code

Additional Resources