read_screen
Retrieve the current terminal screen content and cursor position from an active SSH session to monitor command output or interactive programs in real time.
Instructions
Read the terminal screen state for a session.
Returns the current screen content from the terminal emulator, including cursor position. Only works when MCP_SSH_INTERACTIVE_MODE=1 is set.
Args: host: Hostname, IP address, or SSH config alias username: SSH username (optional, will use SSH config or current user) port: SSH port (optional, will use SSH config or default 22) max_lines: Maximum number of lines to return (default: 24)
Returns: JSON string with screen lines, cursor position, and dimensions
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| username | No | ||
| port | No | ||
| max_lines | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |