An MCP server for PTY management with SSH connections, remote sessions, file access, and mounts
pty-mcp has well-structured schemas with proper JSON Schema definitions and enums for constrained inputs (output_view, line_number_mode, signal types). Tool names follow verb_noun convention (pty_spawn, ssh_connect, ssh_exec). However, descriptions are inconsistent: some tools have detailed, actionable descriptions (pty_spawn, pty_read), while others are minimal (pty_list, ssh_list, ssh_list_dir). Parameter descriptions are present but often generic. Output schemas are documented in response structs (PtySpawnResponse, PtyOutputPage). Error handling is not visible in the provided code, no recovery guidance or error classification patterns evident. Security concerns: ssh_connect accepts identity_path as a parameter, which could expose file paths in logs; no visible secret injection pattern. Tool composition is reasonable but some tools could be consolidated (ssh_exec vs ssh_run vs ssh_session_spawn have overlapping intent).
Kill a PTY session with a signal
List all PTY sessions
Read output from a PTY session
Spawn a new PTY session with a command
Wait for a PTY session to complete
Write data to a PTY session
Establish an SSH connection
Disconnect an SSH connection
Minimal descriptions on discovery tools (pty_list, ssh_list, ssh_list_dir). Descriptions are under 20 chars, providing no context for when to call them or what structure they reveal.
No visible error handling or recovery guidance in tool definitions. Error responses should tell LLMs what to do next (e.g., 'User not found. Try search_users() first'). No error classification (retryable vs user-fixable vs fatal).
ssh_connect accepts identity_path as a parameter, exposing file paths in logs and traces. Credentials and sensitive paths should use server-side secret injection via environment variables or vault.
Overlapping tool intent: ssh_exec, ssh_run, and ssh_session_spawn all execute commands over SSH but with unclear distinctions. Descriptions do not explain when to use each variant, forcing LLMs to guess.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 66 | <=2025-11-25 | v2 |
Execute a command over SSH
List all SSH connections
List directory contents over SSH
Create a directory over SSH
Mount a remote filesystem over SSH using SSHFS
Read a file over SSH
Run a command over SSH and return output
Spawn an interactive SSH session
Close an SSH port tunnel
Open an SSH port tunnel
Unmount a remote filesystem
Write a file over SSH
No visible tool annotations (readOnlyHint, destructiveHint, idempotentHint) in schema definitions. These help LLMs understand side effects and retry safety.