FlowTruxFlowTrux/Docs
Docsmcp

SSH MCP Server

Execute commands and transfer files on remote servers via SSH

The SSH MCP server lets your workflows execute shell commands and transfer files on remote servers. It connects via SSH using either a private key or password authentication.

Setup

  1. Go to Settings > MCP Servers > Add Server.
  2. Select SSH.
  3. Configure the connection:
FieldRequiredDescription
hostYesRemote server hostname or IP address
portNoSSH port (default: 22)
usernameYesSSH username
privateKeyOne of theseSSH private key (PEM format)
passwordOne of theseSSH password

Either privateKey or password must be provided. Private key authentication is recommended.

  1. Click Save.

If your private key contains literal \n characters (common when pasting into form fields), they are automatically converted to real newlines.

Tools

ssh_exec

Execute a shell command on the remote server.

ParameterTypeRequiredDescription
commandstringYesShell command to execute
timeoutnumberNoTimeout in milliseconds (default: 30000, max: 300000)

Returns stdout, stderr, and exitCode. Output is capped at 1MB.

ssh_upload

Upload text content to a file on the remote server via 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 via SFTP (max 1MB).

ParameterTypeRequiredDescription
remote_pathstringYesAbsolute path to the file on the remote server

ssh_list_dir

List files and directories at a remote path.

ParameterTypeRequiredDescription
remote_pathstringYesAbsolute path to the directory

Returns an array of entries with name, type (file/directory), size, and modifiedAt.

ssh_file_info

Get file or directory metadata.

ParameterTypeRequiredDescription
remote_pathstringYesAbsolute path to the file or directory

Returns size, isDirectory, modifiedAt, and permissions.

Timeouts and Limits

  • Connection timeout: 10 seconds
  • Command timeout: Default 30 seconds, configurable up to 5 minutes (300,000 ms)
  • Output limit: 1MB per command (truncated with a warning if exceeded)

Example Workflow

A deployment automation workflow:

  1. Trigger -- Webhook from CI/CD pipeline
  2. Agent -- Parse deployment payload, tools: ssh:ssh_exec
  3. The agent runs commands like cd /app && git pull && npm install && pm restart
  4. Logic -- Check exit code for success/failure
  5. Agent -- Send deployment status notification via Slack