ssh_file_transfer
Upload or download a single file between the local machine and a remote host over SFTP. Use it for one-file transfers; for directories, use ssh_dir_transfer.
Instructions
Transfer a single FILE between the local machine (running this MCP server) and
the remote host, via SFTP. Both local_path and remote_path must be file
paths, not directories - for whole-directory transfers, use ssh_dir_transfer
instead. For remote-to-remote copies (no local machine involved), use
ssh_file_copy instead.
Caveat: use_sudo=True on download/upload stages a copy through /tmp/ using
Unix shell commands (mv/chmod/rm) - this only works against Linux/macOS
remote hosts. Windows has no per-command sudo concept anyway (see
ssh_conn_verify_sudo), so use_sudo=True against a Windows connection raises
immediately instead of attempting these Unix commands - connect as
Administrator instead.
Returns:
{'operation' (human-readable description of what happened), 'success': True, 'local_path', 'remote_path', 'sudo', 'connection'}. Raises an
exception on failure rather than returning a success: False dict.
Long-running calls: if this takes longer than the server's wait cap (default 50s), it
returns {"status": "in_progress", "handle_id": ...} instead of the result - the work keeps
running. Get the result by polling ssh_cmd_check_status(handle_id=...), which returns this
tool's normal response once finished. Do not call it again meanwhile. Only one such
operation runs at a time; another one started meanwhile fails with a 'busy' error.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| use_sudo | No | Use sudo for transfer | |
| direction | Yes | Transfer direction | |
| local_path | Yes | Local file path | |
| remote_path | Yes | Remote file path |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||