SSH & Serial port access for MCP-compatible clients
Installation • Features • Usage
An MCP server providing SSH and UART/serial port access for MCP-compatible clients (for example, Codex CLI or Claude Code). Enables direct control of remote devices like Raspberry Pi, embedded systems, and IoT devices.
- ssh_connect - Connect to remote hosts via SSH (password or key auth)
- ssh_execute - Run commands on connected hosts
- ssh_upload - Upload files via SFTP
- ssh_download - Download files via SFTP
- ssh_disconnect - Close connections
- ssh_list_connections - Show active connections
- serial_list_ports - List available serial ports
- serial_connect - Connect to a serial port
- serial_connect_match - Connect by matching VID/PID/serial/description
- serial_send - Send data (with optional response reading and configurable line ending)
- serial_read - Read data from port
- serial_wait_for - Wait for a specific pattern in output
- serial_expect - Wait/send sequences for prompts and AT flows
- serial_send_break - Send a break signal
- serial_set_dtr - Set DTR line state
- serial_set_rts - Set RTS line state
- serial_reset_device - Reset devices via DTR/RTS sequences
- serial_flush - Flush serial buffers
- serial_disconnect - Close connections
- serial_list_connections - Show active connections
git clone https://github.com/RFingAdam/mcp-remote-access.git
cd mcp-remote-access
uv pip install -e .Codex CLI example:
codex mcp add remote-access -- uv run --directory /path/to/mcp-remote-access mcp-remote-accessClaude Code example:
claude mcp add remote-access -- uv run --directory /path/to/mcp-remote-access mcp-remote-accessIf your client uses a config file, set the MCP server command to:
{
"command": "uv",
"args": ["run", "--directory", "/path/to/mcp-remote-access", "mcp-remote-access"]
}For example:
codexclaudeConnect to my Pi at vpn-ap.local with username pi and password raspberry
The client will use:
ssh_connectto establish connectionssh_executeto run commandsssh_upload/downloadfor file transfers
List available serial ports and connect to /dev/ttyUSB0 at 115200 baud
The client will use:
serial_list_portsto show available portsserial_connectto establish connectionserial_send/serial_readfor communication
Connect to the USB serial device with VID 0x10c4 and PID 0xea60 at 115200 baud
The client will use:
serial_connect_matchto select the portserial_send/serial_readfor communication
Connect to the UART and log in as root (password summit), then wait for a shell prompt
The client will use:
serial_connectorserial_connect_matchto open the portserial_expectto wait for prompts and send responses
- SSH passwords are passed in memory only, never stored
- Connections are session-based and cleared on server restart
- Use SSH keys when possible for better security
- The server only accepts connections from the local MCP client (stdio transport)
- Verify the host is reachable:
ping vpn-ap.local - Check SSH is running on target:
ssh pi@vpn-ap.local - Ensure credentials are correct
- Check port permissions:
ls -la /dev/ttyUSB* - Add user to dialout group:
sudo usermod -a -G dialout $USER - Verify device is connected:
dmesg | tail
MIT