Remote Terminal MCP
v1.3.3Complete SSH terminal for Linux with AI/user control and dual-stream visibility
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
open_terminal
Open the web terminal in a browser tab. If a terminal tab is already open, closes it and opens a fresh one. If the web server is not running, starts it first. Use this when the terminal tab has been lost or closed.
list_servers
List all configured servers with their details. Shows server status markers: - [CURRENT]: Currently connected server - [DEFAULT]: Default server (auto-connects when no server specified) Returns: Server names, hosts, ports, users, descriptions, tags, and status markers.
select_server
Select and connect to a server by name, IP, or tag. ⚠️ CRITICAL CLAUDE WORKFLOW: When this tool returns 'open_conversations' in the response, Claude MUST: 1. STOP and present the information to the user 2. ASK the user to choose ONE of these options: - Resume specific conversation: "resume conversation [ID]" - Start new conversation: "start new conversation for [goal]" - Run without conversation: "run commands without conversation" 3. Wait for user's explicit choice 4. Execute the choice (start_conversation, resume_conversation, or set no-conversation mode) 5. After user choice,…
| Parameter | Type | Description |
|---|---|---|
identifier * | string | Server name, host IP, or tag |
force_identity_check | boolean | Force re-read machine_id even if cached (default: False) |
get_current_server
Get the currently connected server information
set_default_server
Set default server (shown in list_servers with [DEFAULT] marker). The default server is the preferred server for operations that don't specify a server. When you execute commands without an active connection, Claude will automatically connect to the default server. Note: Use list_servers to see which server is currently marked as default.
| Parameter | Type | Description |
|---|---|---|
identifier * | string | Server name or host to set as default |
execute_command
Execute command on remote Linux machine with smart completion detection. BEHAVIOR: - Waits for command completion (detects prompt return) OR timeout - Returns smart-formatted output based on output_mode - Full output stored in buffer - Optionally tracks in conversation for rollback support TIMEOUT: - Default: 10 seconds (sufficient for most commands) - Override for long operations: timeout=300 (5 min), timeout=1800 (30 min) - Maximum: 3600 seconds (1 hour) OUTPUT_MODE OPTIONS: - "auto" (default): Smart output based on command type and size * < 100 lines: returns full output * >= 100 lin…
| Parameter | Type | Description |
|---|---|---|
command * | string | The command to execute |
conversation_id | integer | Optional: Associate command with conversation for tracking and rollback |
output_mode | string | Output format: auto, full, preview, summary, minimal, raw |
timeout | number | Maximum seconds to wait (default: 10, max: 3600) |
check_command_status
Check status of a long-running command. OUTPUT_MODE: Same options as execute_command - "auto": Smart decision based on output size - "full": Get complete output (for completed commands) - "preview": Peek at first/last lines - "summary": Just metadata (polling frequently) - "minimal": Status only - "raw": Complete unfiltered output (no truncation, no filtering) Use "summary" or "minimal" when polling frequently to save tokens. Use "full" when command completes and you need results.…
| Parameter | Type | Description |
|---|---|---|
command_id * | string | Command ID returned by execute_command |
output_mode | string | Output format: auto, full, preview, summary, minimal, raw |
get_command_output
Get full unfiltered output of a command. WARNING: Uses more tokens than filtered output.
| Parameter | Type | Description |
|---|---|---|
command_id * | string | Command ID |
raw | boolean | If true, returns completely unfiltered output |
cancel_command
Send Ctrl+C to a running command. Use when user wants to stop a long-running command.
| Parameter | Type | Description |
|---|---|---|
command_id * | string | Command ID to cancel |
list_session_commands
List tracked commands from current session with status. Shows commands in CommandRegistry (in-memory, max 50). Useful for checking what's currently running or was recently executed in this session. For historical commands from database, use list_command_history instead.
| Parameter | Type | Description |
|---|---|---|
status_filter | string | Optional: 'running', 'completed', or 'killed' |
list_command_history
List command execution history from database with flexible filters. Query persistent command history across all servers and sessions. Useful for: - Reviewing what commands were executed on a server - Finding commands from specific dates or time periods - Debugging by examining command history - Auditing command execution - Analyzing errors across multiple sessions Returns database records with integer IDs, command text, execution status, timestamps, error information, and conversation context when available. By default, shows commands from the currently connected server.
| Parameter | Type | Description |
|---|---|---|
after_date | string | Only commands after this date (ISO format: YYYY-MM-DD) |
before_date | string | Only commands before this date (ISO format: YYYY-MM-DD, exclusive) |
conversation_id | integer | Filter by conversation ID |
has_errors | boolean | Only show commands with errors (true) or without errors (false) |
limit | integer | Number of commands to return (default: 50, max: 500) |
machine_id | string | Filter by server machine ID (uses current server if omitted) |
offset | integer | Skip this many commands (for pagination, default: 0) |
order | string | Sort order (default: newest_first) |
status | string | Filter by execution status |
get_terminal_status
Check the connection status of the remote terminal
upload_file
Upload a file from local machine to remote server via SFTP
| Parameter | Type | Description |
|---|---|---|
local_path * | string | Absolute path to local file (e.g., 'C:/Users/Tim/config.json') |
remote_path * | string | Absolute path on remote server (e.g., '/home/tstat/config.json') |
chmod | integer | Optional octal permissions in decimal (e.g., 493 for 0o755) |
overwrite | boolean | If false, error if remote file exists (default: true) |
preserve_timestamp | boolean | Copy local modification time to remote file (default: true) |
download_file
Download a file from remote server to local machine via SFTP
| Parameter | Type | Description |
|---|---|---|
local_path * | string | Absolute path for local destination (e.g., 'C:/Downloads/app.log') |
remote_path * | string | Absolute path on remote server (e.g., '/home/tstat/app.log') |
overwrite | boolean | If false, error if local file exists (default: true) |
preserve_timestamp | boolean | Copy remote modification time to local file (default: true) |
list_remote_directory
List contents of a remote directory
| Parameter | Type | Description |
|---|---|---|
remote_path * | string | Remote directory path (e.g., '/home/tstat') |
recursive | boolean | Traverse subdirectories (default: false) |
show_hidden | boolean | Include files starting with '.' (default: false) |
get_remote_file_info
Get detailed information about a remote file or directory
| Parameter | Type | Description |
|---|---|---|
remote_path * | string | Remote file or directory path (e.g., '/home/tstat/config.json') |
upload_directory
Smart directory upload with automatic compression and progress tracking. Automatically decides whether to use compression and background mode based on transfer characteristics.
| Parameter | Type | Description |
|---|---|---|
local_path * | string | Absolute path to local directory (e.g., 'C:/Projects/myapp') |
remote_path * | string | Absolute path on remote server (e.g., '/home/tstat/myapp') |
background | boolean | Background mode: null = auto-decide, true = force, false = block |
chmod_dirs | integer | Directory permissions in decimal (e.g., 493 for 0o755) |
chmod_files | integer | File permissions in decimal (e.g., 420 for 0o644) |
compression | string | Compression mode: 'auto' (default), 'always', 'never' |
exclude_patterns | array | Glob patterns to exclude (None = use defaults: .git, __pycache__, node_modules, etc.) |
if_exists | string | Conflict resolution: 'merge' (default), 'overwrite', 'skip', 'error' |
preserve_timestamps | boolean | Copy local modification times (default: true) |
recursive | boolean | Include subdirectories (default: true) |
download_directory
Smart directory download with automatic compression and progress tracking. Automatically decides whether to use compression and background mode based on transfer characteristics.
| Parameter | Type | Description |
|---|---|---|
local_path * | string | Absolute path for local destination (e.g., 'C:/Projects/myapp') |
remote_path * | string | Absolute path on remote server (e.g., '/home/tstat/myapp') |
background | boolean | Background mode: null = auto-decide, true = force, false = block |
compression | string | Compression mode: 'auto' (default), 'always', 'never' |
exclude_patterns | array | Glob patterns to exclude (None = use defaults) |
if_exists | string | Conflict resolution: 'merge' (default), 'overwrite', 'skip', 'error' |
preserve_timestamps | boolean | Copy remote modification times (default: true) |
recursive | boolean | Include subdirectories (default: true) |
execute_script_content
Execute multi-command batch script on remote Linux server. OUTPUT_MODE_GUIDANCE: Use output_mode='full' for diagnostic commands with expected concise output. Full output returns directly in the response for immediate analysis. LOG_FILE_LOCATION: Script output is automatically saved to the local user's home directory: - %USERPROFILE%\mcp_batch_logs\batch_output_[timestamp].log Use Aspen tools (apsen-tool_v2:read_file) with project root ~\mcp_batch_logs to access saved log files for post-execution analysis—for example, extracting specific error context, parsing structured data, debugging by…
| Parameter | Type | Description |
|---|---|---|
description * | string | What this script does (for logging/tracking) |
script_content * | string | Complete bash script content with step markers |
conversation_id | integer | Optional: Link batch to conversation for tracking |
output_mode | string | Output format: summary (efficient, default) or full (includes complete output) |
timeout | integer | Max execution time in seconds (default: 300 = 5 min) |
build_script_from_commands
Helper tool to create a batch (shell) script from command list. Useful for AI to quickly build properly formatted scripts. Example: commands = [ {"description": "Network interfaces", "command": "ip link show"}, {"description": "Routing table", "command": "ip route show"}, {"description": "DNS config", "command": "cat /etc/resolv.conf"} ]
| Parameter | Type | Description |
|---|---|---|
commands * | array | List of command objects with 'description' and 'command' fields |
description | string | Overall script description |