SSH MCP Server for Claude Desktop - Provides SSH command execution capabilities via MCP protocol
The SSH MCP server implements three tools (ssh_exec, ssh_upload, ssh_download) with complete JSON Schema definitions and clear descriptions. However, there are significant gaps in error handling, security considerations, and parameter guidance that limit production readiness. Tool descriptions are adequate (111-109 chars, within baseline range), but lack context about prerequisites, error recovery, and side effects. Parameter descriptions are present but minimal (8-28 chars for most). No input validation guidance, no destructive operation confirmation, no error recovery patterns. Tool names follow verb_noun convention well (ssh_exec, ssh_upload, ssh_download). The server uses connection pooling to manage SSH sessions, a good operational pattern, but exposes no toolAnnotations (destructiveHint/idempotentHint) to guide LLM planning.
Download a file from remote host via SFTP
Execute a command on a remote host via SSH
Upload a file to remote host via SFTP
Destructive tools (ssh_exec, ssh_upload) lack confirmation/dry-run pattern. ssh_exec with 'rm -rf /' or ssh_upload overwriting critical files should require confirmation before execution. LLM agents may execute irreversible operations without user awareness.
Error handling is minimal. Tool implementations catch exceptions but provide no recovery guidance to the LLM. Errors like 'Connection timeout' or 'Authentication failed' should include recovery steps (retry with different user, check host reachability, verify SSH key). See catch block in handle_tools_call(), error messages are not visible in the provided code.
Missing security annotation in tool definitions. ssh_exec and ssh_upload should declare destructiveHint:true in inputSchema to guide agent planning and prevent accidental misuse. Current schema has no toolAnnotations.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 55 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 0 | 2024-11-05+ | v1 |
Parameter descriptions are too minimal. 'Target host (hostname or IP)' (27 chars) is acceptable, but 'Command to execute' (18 chars) and 'Local file path' (14 chars) lack guidance on format, constraints, or examples. These are at the bare minimum.
No output schema documented for any tool. LLM cannot predict result structure. ssh_exec returns 'Exit Code\nSTDOUT\nSTDERR' as unstructured text (see send_result call), this should be documented as a JSON schema with fields {exit_code, stdout, stderr, message}.
Credentials and SSH keys are assumed to be available on the system without documentation. Tool description does not explain how SSH authentication is configured (e.g. 'Expects ~/.ssh/id_rsa and known_hosts to be configured'). Users/agents need to know prerequisites.
Tool descriptions do not clarify when to use each tool or dependencies between them. There is no guidance like 'Call ssh_exec to run remote commands. To copy files, use ssh_upload or ssh_download instead.' This forces LLM to infer via trial and error.
No input validation documented. 'host' parameter should specify format (FQDN, IPv4, IPv6, hostname). 'timeout' integer has no min/max (what happens if timeout=-1 or 999999?).