SSH-Connect — unified SSH/Telnet/Serial console + VPS/Ubuntu management as an MCP server (Rust)
SSH-Connect provides 15 tools with explicit schemas and descriptions. Most tools have clear action-based naming (ubuntu_mysql, vps_docker, vps_file_ops) and detailed parameter documentation. However, several tools exhibit composition issues (run_command + run_commands + run_on_fleet overlap), parameter descriptions lack constraint details (enums, ranges), and output schemas are not formally documented. Error handling is present but generic. Security practices are sound (password via env var, no secrets in params), but tool descriptions could be more LLM-optimized per the 50-200 char baseline.
Enter privileged (enable) mode, supplying the enable password if the device challenges. The password is NEVER echoed back. Drives the 'enable' → Password: handshake in one step.
Wait until `expect` (a regex) appears in the output, then send `send` verbatim (no newline added). Use for enable passwords, [confirm] prompts, and pagination.
Log in over a console/vty that prompts for username and/or password (e.g. after connecting telnet/serial). Secrets are NEVER echoed back.
Send one command to an interactive session and return device output up to the next prompt: { output, matched_prompt, sub_prompt, timed_out, truncated, duration_ms }. A --More-- pager is auto-advanced. If the device stops at a sub-prompt (Password:, [confirm]) it returns immediately with sub_prompt set. Do NOT send passwords here (they would be echoed) — use enable/login.
Send a list of commands sequentially to one session and return each command's output. A per-command timeout does NOT abort the sequence; only a transport/connection error stops it early.
Overlapping tool composition: run_command, run_commands, and run_on_fleet perform similar operations (send commands to sessions). LLMs must reason about which variant to use, increasing error likelihood. Consider consolidating into a single parameterized tool or clearly documenting when each is appropriate.
Parameter descriptions lack formal constraints. E.g., vps_docker 'action' accepts 'ps | start | stop | restart | logs | exec | pull | inspect' but is documented as free-form string. Should use enum type in schema. Similarly, vps_file_ops 'action' and ubuntu_mysql 'action' lack enum constraints.
Output schemas not formally documented. Tools return CallToolResult::success(vec![Content::text(...)]) but the structure of returned text (JSON, plain text, field layout) is not specified. LLMs cannot reliably parse or chain results. Document expected output format for each tool.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 59 | <=2025-11-25 | v2 |
Run the same command across multiple named sessions in parallel. Returns a per-session result with output or an error — one failing device does not abort the others.
MySQL/MariaDB management. action: list-databases | list-tables | query | backup | restore | create-db | drop-db. Password is passed securely via MYSQL_PWD env var (not exposed in ps).
Control any systemd service. action: start | stop | restart | reload | status | enable | disable | is-active | is-enabled | logs. Examples: mysql, php8.2-fpm, redis-server, cron, nginx.
Manage cron jobs. action: list | add | remove. Use 'entry' for the full cron line when adding (e.g. '*/5 * * * * /usr/bin/php /path/cron.php'). Use 'pattern' to match lines for removal.
Docker container management. action: ps | start | stop | restart | logs | exec | pull | inspect. Use 'container' for name/ID, 'command' for exec, 'image' for pull.
Remote file system operations. action: delete | mkdir | chmod | chown | find | copy | move. Use recursive=true for directory operations. sudo=true for protected paths.
Read a remote file's contents. Optionally limit to N lines from the start (head) or end (from_end=true, tail). Good for inspecting nginx configs, PHP ini, .env files, phpBB3 config.php.
Run the standard VPS health battery over an existing ssh_connect connection and return structured JSON across system, security, ssl_web, and maintenance. Pair with the vps-health-report skill to score and render an HTML report. Optional: domains[] (else derived from certbot), categories[] to limit scope.
Manage nginx virtual host configs. action: list (sites-available/enabled) | enable | disable | view | write (via SFTP) | test. 'site' is the filename in sites-available e.g. 'orchis.ai'.
Redis cache management. action: ping | info | keyspace | flush-cache | get | del | dbsize. Use 'key' for get/del. phpBB3 can use Redis as cache backend.
Error messages are generic (internal_err, invalid_err). While they include context, they do not guide recovery. E.g., 'No active connection' should suggest 'Call ssh_connect first to establish a session.' Errors should be actionable per pattern:recovery-guide.
Tool descriptions exceed 200 chars baseline in several cases (e.g., vps_health_check at ~250 chars). While detailed, they risk token waste. Trim to 50-200 chars per LLM-optimization baseline, moving examples and edge cases to parameter descriptions.