ssh_sync
Synchronize files between local and remote servers over SSH using rsync, with dry-run, delete, and checksum options.
Instructions
Synchronizes files or directories between local and remote using rsync over SSH on the named server. Each of source and destination must carry a local: or remote: prefix and one side must be local and the other remote; with no prefix it assumes a push from local to remote. On Windows MCP hosts, provide native Windows local paths such as C:\project or .\project; the tool converts drive-letter and UNC paths to MSYS2 format before spawning rsync. Do not pre-convert a local path to /c/project because Node performs local filesystem checks using Windows path semantics. Mutates the destination. Setting delete true removes destination files absent from source, which is destructive; dryRun true previews without changing anything. Compression is on by default. Password authentication requires sshpass installed locally. Blocked on readonly or restricted servers. Timeout defaults to 30000 ms.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| delete | No | Delete files in destination not in source | |
| dryRun | No | Perform dry run without actual changes | |
| server | Yes | Server name from configuration | |
| source | Yes | Source path with a "local:" or "remote:" prefix. On Windows, use a native local path such as "local:C:\project" or "local:.\project"; do not pre-convert it to MSYS2 /c/... syntax. | |
| exclude | No | Patterns to exclude from sync | |
| timeout | No | Timeout in milliseconds (default: 30000) | |
| verbose | No | Show detailed progress | |
| checksum | No | Use checksum instead of timestamp for comparison | |
| compress | No | Compress during transfer | |
| destination | Yes | Destination path with a "local:" or "remote:" prefix. On Windows, use a native local path such as "local:C:\output" or "local:.\output"; do not pre-convert it to MSYS2 /c/... syntax. |