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
- Go to Resources > MCP Servers > Add Server (OWNER or ADMIN).
- Choose SSH Server.
- Give the configuration a Name and fill in the connection:
| Field | Required | Description |
|---|---|---|
| Host | Yes | Server hostname or IP address |
| Port | No | SSH port (default 22) |
| Username | Yes | The user commands run as |
| Private Key (PEM) | One of these two | Private key, e.g. -----BEGIN OPENSSH PRIVATE KEY-----... (recommended) |
| Password | One of these two | Password, for hosts without key login |
| Host key fingerprint (recommended) | No | The server's host key fingerprint, SHA256:… |
- 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
command | string | Yes | Shell command to execute. |
timeout | number | No | Time 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).
| Parameter | Type | Required | Description |
|---|---|---|---|
remote_path | string | Yes | Absolute path on the remote server (e.g., /home/user/file.txt) |
content | string | Yes | File content to upload. |
ssh_download
Download a text file from the remote server (SFTP), up to 1 MB.
| Parameter | Type | Required | Description |
|---|---|---|---|
remote_path | string | Yes | Absolute 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
remote_path | string | Yes | Absolute path to the directory on the remote server. |
ssh_file_info
Get a file's or directory's size, permissions and modification date (SFTP).
| Parameter | Type | Required | Description |
|---|---|---|---|
remote_path | string | Yes | Absolute 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
&∨inside one command:cd /app && git pull && npm ci. - Command time limit.
ssh_execwaits 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_downloadreads at most 1 MB of a file and answerstruncated: truewhen it stopped there. - A non-zero exit code fails the call.
ssh_execreturnsstdout,stderrandexitCode; whenexitCodeis 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:
- Trigger - Webhook from your CI pipeline.
- Action - MCP tool
ssh:ssh_execwithcommandcd /app && git pull && npm ci && pm2 restart app. - Action - Post
{{steps.deploy.output.response.stdout}}to Slack withslack:send_message.
If the command exits with a non-zero code, the SSH step fails and the Slack step does not run.