FlowTruxFlowTrux/Docs

SSH MCP Server

Run commands and transfer files on a remote server over SSH

The SSH MCP server lets your workflows run shell commands and transfer text files on a remote server. It connects with a private key or a password and provides 5 tools.

Setup

  1. Go to Resources > MCP Servers > Add Server (OWNER or ADMIN).
  2. Choose SSH Server.
  3. Give the configuration a Name and fill in the connection:
FieldRequiredDescription
HostYesServer hostname or IP address
PortNoSSH port (default 22)
UsernameYesThe user commands run as
Private Key (PEM)One of these twoPrivate key, e.g. -----BEGIN OPENSSH PRIVATE KEY-----... (recommended)
PasswordOne of these twoPassword, for hosts without key login
Host key fingerprint (recommended)NoThe server's host key fingerprint, SHA256:…
  1. Under Available in workspaces, pick the workspaces, then click Add Server.

If a pasted private key contains literal \n sequences instead of line breaks, they are converted for you.

Pinning the host key

Set Host key fingerprint so FlowTrux only talks to the server you expect. Get it with:

ssh-keyscan <host> | ssh-keygen -lf -

Take the SHA256:… value of the ED25519 line if the host has one. With a fingerprint set, a server presenting a different key fails the call with "SSH host key mismatch — expected …, got …". Without it, any host key is accepted.

Tools

ssh_exec

Run a shell command on the remote server. Returns stdout, stderr and exitCode; a non-zero exit code fails the call.

ParameterTypeRequiredDescription
commandstringYesShell command to execute.
timeoutnumberNoTime limit in milliseconds. Default 30000, maximum 110000 - for longer work start it in the background and check later.

ssh_upload

Upload text content to a file on the remote server (SFTP).

ParameterTypeRequiredDescription
remote_pathstringYesAbsolute path on the remote server (e.g., /home/user/file.txt)
contentstringYesFile content to upload.

ssh_download

Download a text file from the remote server (SFTP), up to 1 MB.

ParameterTypeRequiredDescription
remote_pathstringYesAbsolute path to the file on the remote server.

ssh_list_dir

List files and directories at a remote path (SFTP). Each entry has a name, type, size and modification time.

ParameterTypeRequiredDescription
remote_pathstringYesAbsolute path to the directory on the remote server.

ssh_file_info

Get a file's or directory's size, permissions and modification date (SFTP).

ParameterTypeRequiredDescription
remote_pathstringYesAbsolute path to the file or directory.

Things to Know

  • Every command runs in a fresh shell. Nothing carries over between calls - not environment variables, not the working directory. Chain steps with && or ; inside one command: cd /app && git pull && npm ci.
  • Command time limit. ssh_exec waits 30 seconds by default and at most 110 seconds (timeout, in milliseconds). For longer work, start it in the background (nohup ./job.sh > job.log 2>&1 &) and check on it with a later call.
  • Output and file size. Command output is capped at 1 MB. ssh_download reads at most 1 MB of a file and answers truncated: true when it stopped there.
  • A non-zero exit code fails the call. ssh_exec returns stdout, stderr and exitCode; when exitCode is not 0 the node fails with that output, so a failed command stops the workflow like any other failed step.

Example Workflow

A deployment hook:

  1. Trigger - Webhook from your CI pipeline.
  2. Action - MCP tool ssh:ssh_exec with command cd /app && git pull && npm ci && pm2 restart app.
  3. Action - Post {{steps.deploy.output.response.stdout}} to Slack with slack:send_message.

If the command exits with a non-zero code, the SSH step fails and the Slack step does not run.