ssh_transfer
Transfer a single file between your local machine and a Vast.ai instance over SFTP. Supports upload and download, automatically resolving the instance's SSH host and port.
Instructions
Transfer a single file between the local machine and an instance over SFTP.
upload: local file -> instance pathdownload: instance path -> local file
Directories are not supported — call once per file. Resolves the instance's
ssh_host/ssh_port automatically. The private key stays local.
key_path defaults to the VASTAI_MCP_SSH_KEY_PATH env var if set.
Examples: ssh_transfer(direction="upload", instance_id=12345, local_path="./train.py", remote_path="/workspace/train.py") ssh_transfer(direction="download", instance_id=12345, local_path="./results.tar", remote_path="/workspace/results.tar")
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": {
"direction": "<direction>",
"instance_id": "<instance_id>",
"local_path": "<local_path>",
"remote_path": "<remote_path>"
},
"name": "ssh_transfer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | No | root | |
| timeout | No | ||
| key_path | No | ||
| direction | Yes | ||
| local_path | Yes | ||
| instance_id | Yes | ||
| remote_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||