ssh_sync
Synchronizes files or directories between local and remote systems using rsync over SSH, with optional dry-run previews and deletion of destination files not present in the source.
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. On a server with a transferRoot the local side must be inside that folder. Timeout defaults to 30000 ms.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"server": "<server>",
"source": "<source>",
"destination": "<destination>"
},
"name": "ssh_sync"
}
}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. |