remote-debug-mcp
v0.2.1MCP server for remote debugging via SSH and Telnet with persistent background connections
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
ssh_connect
SSH connect using a named configuration from config.yaml. Auto-detects remote OS (Linux/Windows). Supports auto-reconnect on connection loss. Use list_connections to see available config entries.
| Parameter | Type | Description |
|---|---|---|
config_name * | string | Name of the connection in config.yaml (e.g. 'windows-pc') |
session_id * | string | Unique session ID (reusing overwrites old) |
max_retries | integer | Max auto-reconnect attempts (default 3) |
ssh_execute
Execute command on a connected SSH session. Automatically adapts to Linux (bash) or Windows (PowerShell) remote shell. Triggers auto-reconnect if connection dropped.
| Parameter | Type | Description |
|---|---|---|
command * | string | Command to execute |
session_id * | string | Session ID from ssh_connect |
timeout | integer | Timeout seconds (default 30) |
ssh_disconnect
Close and remove an SSH session.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID |
ssh_upload
Upload file via SCP or SFTP. Automatically adapts path format for Linux/Windows targets.
| Parameter | Type | Description |
|---|---|---|
local_path * | string | Local file path |
remote_path * | string | Remote destination |
session_id * | string | Session ID |
ssh_download
Download file via SCP or SFTP. Automatically adapts path format for Linux/Windows targets.
| Parameter | Type | Description |
|---|---|---|
local_path * | string | Local destination |
remote_path * | string | Remote file path |
session_id * | string | Session ID |
ssh_list
List all active SSH sessions with platform and status.
telnet_connect
Connect to remote host via Telnet, persistent background session. All connection parameters come from the com2tcp config in config.yaml. Look up com2tcp config by name, resolve host from linked SSH config, and use configured telnet_port, timeout, buffer settings, and auto-reconnect policy. Use list_connections to see available configs. Use save_config to create/update com2tcp entries.
| Parameter | Type | Description |
|---|---|---|
config_name * | string | Name of the com2tcp config in config.yaml (e.g. 'com2tcp_COM4_5200'). All connection params are read from this config. |
session_id * | string | Unique session ID (reusing overwrites old) |
telnet_send
Send data to a Telnet session. timeout=0: send and return immediately (no wait). timeout>0: send then wait for response. Supports auto-reconnect. Special values: __CTRL_C__, __CTRL_D__, __CTRL_Z__.
| Parameter | Type | Description |
|---|---|---|
data * | string | Data/command to send |
session_id * | string | Session ID |
timeout | integer | Wait timeout seconds. 0 = no wait (default), >0 = wait for response |
telnet_listen
Listen on a Telnet session for a specified duration, returning all newly received data (consumer pattern: data is consumed after read). Supports multiple encodings for binary data.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID |
duration | integer | Listen duration seconds (default 10) |
encoding | string | Output encoding: utf-8 (text), base64 (binary safe), hex (binary safe) |
telnet_disconnect
Close and remove a Telnet session.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID |
telnet_list
List all active Telnet sessions with status and buffer sizes.
setup_com2tcp
Complete com2telnet deployment workflow: 1. SSH upload com2telnet.py + pyproject.toml to D:\remote-debug\com2telnet\ on Windows PC 2. Install com2telnet + dependencies (pyserial) via pip 3. Kill any previous com2telnet instance on the same port 4. Start com2telnet in background (PowerShell Start-Process -WindowStyle Hidden) 5. Verify process is running After setup, use telnet_connect to host:telnet_port to access serial data from the COM port. Example: setup_com2tcp with com_port='COM4', telnet_port=5200 runs: com2telnet --serial COM4:5200:115200
| Parameter | Type | Description |
|---|---|---|
com_port * | string | COM port name (e.g. COM4) |
ssh_session_id * | string | SSH session ID (must already be connected to the Windows PC with the COM port) |
telnet_port * | integer | Telnet port to expose (e.g. 5200) |
baud | integer | Baud rate (default 115200) |
list_connections
List all configured connections from config.yaml. Shows SSH and com2tcp entries.
save_config
Save configuration to config.yaml. This is the unified entry for creating/updating connection configs. When no config.yaml exists: ask user for connection details (host, port, username, password for SSH; ssh_config_name, com_port, telnet_port for com2tcp), then call this tool with 'connections' parameter. When setup_com2tcp completes, call this tool with the com2tcp connection details to persist them. When called without arguments, saves current in-memory config.
| Parameter | Type | Description |
|---|---|---|
connections | array | Connections to save/merge. type=ssh: {name, host, port, username, password, key_file?}. type=com2tcp: {name, ssh, com_port, telnet_port, baud, connect_timeout?, buffer_max_size?, max_retries?, usernam… |
telnet_start_monitor
Start background monitoring on a Telnet session. Data is continuously read into a circular buffer (max 900000 lines, oldest evicted when full). Optionally append to a file continuously.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Telnet session ID |
output_file | string | Optional local file path to continuously append received data |
telnet_stop_monitor
Stop background monitoring on a Telnet session. Returns the total line count captured.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Telnet session ID |
list_sessions
List all active SSH and Telnet sessions.