Multi-Protocol Bridge
Access FTP, SSH, and MQTT protocols through a unified HTTP interface. All actions use a URL-first approach where connection details (host, port, credentials, path) are encoded in the URL.
URL Format
All actions require a protocol URL:
scheme://username:password@hostname:port/path
Supported schemes:
ftp:///ftps://(FTP with optional TLS)ssh://(SSH remote commands)mqtt:///mqtts://(MQTT with optional TLS)
Actions
ftp_upload
Upload a file to an FTP/FTPS server.
Required fields:
action:"ftp_upload"url: FTP URL with path to the destination file (scheme must beftp://orftps://)content: File content to upload (text or base64-encoded)
Optional fields:
content_encoding:"text"(default) or"base64"for binary files
Example:
{
"action": "ftp_upload",
"url": "ftp://myuser:mypass@ftp.example.com:21/uploads/report.txt",
"content": "Monthly report data here..."
}
Example (binary file):
{
"action": "ftp_upload",
"url": "ftps://myuser:mypass@ftp.example.com:21/images/logo.png",
"content": "iVBORw0KGgoAAAANSUhEUg...",
"content_encoding": "base64"
}
Limits: Maximum file size is 100 MB.
ftp_download
Download a file from an FTP/FTPS server.
Required fields:
action:"ftp_download"url: FTP URL with path to the file to download (scheme must beftp://orftps://)
Optional fields:
options.return_base64(boolean): Return file content as base64 instead of text. Default:false. Use this for binary files.
Example:
{
"action": "ftp_download",
"url": "ftp://myuser:mypass@ftp.example.com:21/reports/q1.csv"
}
Example (binary download):
{
"action": "ftp_download",
"url": "ftps://myuser:mypass@ftp.example.com:21/images/photo.jpg",
"options": { "return_base64": true }
}
Limits: Maximum file size is 100 MB. Non-text files that fail UTF-8 decoding are automatically returned as base64.
ftp_list
List the contents of a directory on an FTP/FTPS server.
Required fields:
action:"ftp_list"url: FTP URL with path to the directory (scheme must beftp://orftps://)
Optional fields:
options.recursive(boolean): List subdirectories recursively. Default:false
Example:
{
"action": "ftp_list",
"url": "ftp://myuser:mypass@ftp.example.com:21/documents/"
}
Example (recursive):
{
"action": "ftp_list",
"url": "ftp://myuser:mypass@ftp.example.com:21/project/",
"options": { "recursive": true }
}
Limits: Results are capped at 1,000 entries.
ftp_delete
Delete a file on an FTP/FTPS server. Requires explicit confirmation.
Required fields:
action:"ftp_delete"url: FTP URL with path to the file to delete (scheme must beftp://orftps://)options.confirm_delete: Must be the string"DELETE"to confirm deletion
Example:
{
"action": "ftp_delete",
"url": "ftp://myuser:mypass@ftp.example.com:21/old-files/archive.zip",
"options": { "confirm_delete": "DELETE" }
}
ssh_execute
Execute a shell command on a remote server via SSH.
Required fields:
action:"ssh_execute"url: SSH URL (scheme must bessh://)content: The shell command to execute
Optional fields:
options.timeout(integer): Command timeout in seconds. Default:30options.private_key(string): SSH private key in PEM format for key-based authentication. When provided, password in the URL can be omitted.options.known_hosts(string): SSH known hosts entry for host verification
Example (password auth):
{
"action": "ssh_execute",
"url": "ssh://deploy:s3cret@server.example.com:22",
"content": "df -h && uptime"
}
Example (key-based auth):
{
"action": "ssh_execute",
"url": "ssh://deploy@server.example.com:22",
"content": "ls -la /var/log",
"options": {
"private_key": "-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----",
"timeout": 60
}
}
Limits: Command output (stdout/stderr) is capped at 10 MB each.
mqtt_publish
Publish a message to an MQTT broker.
Required fields:
action:"mqtt_publish"url: MQTT URL with the topic as the path (scheme must bemqtt://ormqtts://)content: Message payload (plain text or JSON string)
Optional fields:
options.qos(integer): Quality of Service level.0= at most once (default),1= at least once,2= exactly once.options.retain(boolean): Broker retains the message for future subscribers. Default:falseoptions.client_id(string): MQTT client identifier. Auto-generated if not provided.
Example:
{
"action": "mqtt_publish",
"url": "mqtt://sensoruser:sensorpass@broker.example.com:1883/sensors/temperature",
"content": "{\"value\": 22.5, \"unit\": \"celsius\"}"
}
Example (with QoS and retain):
{
"action": "mqtt_publish",
"url": "mqtts://admin:secret@broker.example.com:8883/alerts/critical",
"content": "Server CPU above 95%",
"options": { "qos": 2, "retain": true, "client_id": "monitoring-agent" }
}
Limits: Payload size is capped at 1 MB.
Common Workflows
Deploy a file and verify it exists
- Use
ftp_uploadto upload the file. - Use
ftp_liston the parent directory to confirm it appears.
Remote server health check
- Use
ssh_executewith a command likeuptime && free -m && df -hto get server status.
IoT data publishing
- Use
mqtt_publishto send sensor readings to a topic withqos: 1for guaranteed delivery.
Secure file transfer
- Use
ftps://scheme for encrypted FTP connections. - Use
mqtts://scheme for encrypted MQTT connections. - Use
options.private_keyfor SSH key-based authentication.
Important Notes
- URL encoding: Special characters in usernames or passwords must be URL-encoded (e.g.,
@becomes%40). - Default ports: FTP uses 21, SSH uses 22, MQTT uses 1883, MQTTS uses 8883. You can omit the port to use the default.
- FTP anonymous access: If no username is provided, connections default to anonymous access.
- Delete safety: The
ftp_deleteaction requiresoptions.confirm_deleteset to"DELETE"as a safeguard. - Binary files: Use
content_encoding: "base64"for uploading binary files andoptions.return_base64: truefor downloading them. - SSH authentication: Provide either a password in the URL or a
private_keyin options, not both.







