ssh-sftp-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SSH_MCP_LOG_LEVEL | No | Log level: debug, info, warn, error, or silent. Logs are written to stderr only. | warn |
| SSH_MCP_MAX_TASKS | No | Maximum number of in-flight long-running tasks. | 16 |
| SSH_MCP_KNOWN_HOSTS | No | Host key database. Host key verification cannot be disabled. | ~/.ssh/known_hosts |
| SSH_MCP_EXEC_TIMEOUT_MS | No | Default command timeout in milliseconds. | 30000 |
| SSH_MCP_IDLE_TIMEOUT_MS | No | Idle connection reclamation timeout in milliseconds (maximum 24h). | 600000 |
| SSH_MCP_MAX_CONNECTIONS | No | Maximum number of concurrent SSH connections. | 8 |
| SSH_MCP_MAX_OUTPUT_BYTES | No | Per-stream output limit for synchronous commands in bytes. | 1048576 |
| SSH_MCP_CONNECT_TIMEOUT_MS | No | Connection timeout in milliseconds. | 15000 |
| SSH_MCP_MAX_EXEC_TIMEOUT_MS | No | Maximum single command timeout in milliseconds. | 600000 |
| SSH_MCP_PASSWORD_ENV_PREFIX | No | Allowed prefix for password environment variable names. | SSH_MCP_PASSWORD_ |
| SSH_MCP_TRANSFER_TIMEOUT_MS | No | Server-side timeout for a single transfer in milliseconds. | 3600000 |
| SSH_MCP_ENABLE_PASSWORD_AUTH | No | Whether passwordEnv authentication is allowed. | true |
| SSH_MCP_MAX_ACTIVE_TRANSFERS | No | Maximum number of concurrent transfers. | 2 |
| SSH_MCP_TASK_MAX_LIFETIME_MS | No | Maximum lifetime of a long-running task in milliseconds. | 3600000 |
| SSH_MCP_TRANSFER_RATE_LIMIT_BPS | No | Transfer rate limit in bytes per second. 0 means unlimited. | 0 |
| SSH_MCP_TASK_OUTPUT_BUFFER_BYTES | No | Output buffer size per long-running task in bytes. | 4194304 |
| SSH_MCP_MAX_CHANNELS_PER_CONNECTION | No | Maximum number of active channels per connection. | 4 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| ssh_connectA | Connects to any host supplied by the caller (no application-level allowlist) and returns a connectionId; later exec/SFTP calls reuse the same SSH session. Auth supports a private key path, SSH Agent, or a password held in a local environment variable; passwords never appear in tool arguments. The host key must already exist in known_hosts; unknown or changed keys are always rejected (first-use keys are never trusted automatically). This tool lets the server process connect to any address reachable on the network (including localhost and private networks); the actual scope is bounded by the host firewall. |
| ssh_execA | Runs a non-interactive command on the remote host (no PTY, no stdin) and returns stdout/stderr/exit code. The command has the full shell privileges of that SSH account and may cause any remote side effect; the server does not block commands by keyword. Output is byte-capped; timeouts and truncation are reported explicitly. Use ssh_exec_start for long-running work. |
| ssh_exec_startA | Starts a long-running non-interactive remote command and returns a taskId immediately; poll output increments with ssh_task_poll and stop it with ssh_task_cancel. Task state and output buffers live only in this server process; after a restart or disconnect the remote state cannot be confirmed (marked unknown_after_disconnect), and commands are never replayed automatically. Cancel only closes the SSH channel owned by this server; it does not guarantee that the remote process or its children have terminated. |
| ssh_task_pollA | Returns task state and reads stdout/stderr increments from independent byte offsets. Returns running immediately when there is no new output; it never blocks. Pass stdoutAfterOffset / stderrAfterOffset and use the returned nextOffset of each stream; gaps from buffer recycling are reported in the droppedBeforeOffset of that stream. |
| ssh_task_cancelA | Requests closing the SSH exec channel owned by this task. channelCloseConfirmed reports whether a channel close or a remote exit status was observed; that only means the request was acknowledged by the server or remote side, and does not prove the remote command or its children have terminated. |
| ssh_connection_listA | Lists metadata for SSH connections held by this server process (no private keys, passwords, or full command history). |
| ssh_disconnectA | Closes the connection and its SFTP/exec channels and releases related task buffers. Idempotent: an already closed or unknown connection returns closed=false. Unfinished tasks on that connection end up as failed or unknown_after_disconnect. |
| sftp_listA | Lists remote directory entries sorted by name, with name, type, size, mtime and permission string; file contents are never returned. Large directories are paged with nextCursor; cursors are valid only in this process and are not a consistent snapshot under concurrent changes. |
| sftp_statA | Reads remote file/directory metadata. Defaults to lstat without following symlinks; set followSymlink=true to read the link target. File contents are never read. |
| sftp_downloadA | Downloads to a local path writable by the server account. Publishes atomically and refuses to overwrite by default. This call waits for the transfer to finish. Use the matching *_start tool for long transfers. |
| sftp_uploadA | Uploads a local file readable by the server account. Publishes atomically via a remote hardlink and refuses to overwrite by default. allowNonAtomicNoOverwrite=true writes the target directly with exclusive create and may leave a partial file on failure. This call waits for the transfer to finish. Use the matching *_start tool for long transfers. |
| sftp_download_startA | Downloads to a local path writable by the server account. Publishes atomically and refuses to overwrite by default. Returns a transferId immediately; query progress and the final result with sftp_transfer_status. |
| sftp_upload_startA | Uploads a local file readable by the server account. Publishes atomically via a remote hardlink and refuses to overwrite by default. allowNonAtomicNoOverwrite=true writes the target directly with exclusive create and may leave a partial file on failure. Returns a transferId immediately; query progress and the final result with sftp_transfer_status. |
| sftp_transfer_statusA | Returns transfer state, bytes processed, bytes verified and the final result. If the publish acknowledgement was lost, targetState=unknown - check the target before retrying. |
| sftp_transfer_cancelA | Cancels an in-flight transfer; keep polling until cleanup finishes. Once publishing has started the cancel cannot be guaranteed, so check the final state. |
| sftp_transfer_listA | Lists current and recent transfers, including in-flight legacy synchronous calls and their transferId. |
| diagnostics_recentB | Shows recent redacted diagnostic events in this process, optionally filtered by transferId. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 17 tools
Each tool maps to a distinct resource+action, and the sync/async pairs (ssh_exec vs ssh_exec_start, sftp_download vs sftp_download_start) are separated by the explicit `_start` suffix and by descriptions that say one returns immediately and the other blocks. Minor residual overlap exists between sftp_transfer_list and diagnostics_recent (both surface transfer info) and between ssh_task_cancel and sftp_transfer_cancel, but the SSH-task vs SFTP-transfer domains keep them distinguishable.
There is a stable prefix scheme (ssh_, sftp_, diagnostics_), but the element order inside names varies: ssh_connection_list and sftp_transfer_list put the noun before the verb, while sftp_list, ssh_disconnect and ssh_task_poll put the verb last, and ssh_task_poll/sftp_transfer_status use different verbs for the same 'check progress' concept. The result is readable but not a single predictable pattern.
Seventeen tools is slightly above the comfortable range, but nearly every one is justified by the sync/async split (exec, upload, download each need a start/status/cancel triple) plus lifecycle and diagnostics. There is little obvious dead weight, though the async scaffolding is what pushes the count up.
Connection lifecycle, command execution, async task control, and file transfer are well covered, including progress, cancel, and diagnostics. However, the SFTP surface has notable gaps: no mkdir, rename/move, delete/remove, or chmod/permission change operations, so an agent cannot do routine remote file management without dropping to ssh_exec. There is also no way to enumerate active tasks (only connections and transfers are listable).