SSH Execute
ssh_executeExecute shell commands on a connected remote server over SSH and return stdout, stderr, and exit code. Establish the connection first with ssh_connect.
Instructions
Execute a command on a connected remote server via SSH. Returns stdout, stderr, and exit code. The connection must have been established first with ssh_connect. Output is capped at 1MB per stream to prevent memory issues.
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": {
"connectionId": "<connectionId>",
"command": "<command>"
},
"name": "ssh_execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory — the command will be wrapped as: cd <cwd> && <command> | |
| command | Yes | Shell command to execute on the remote server | |
| timeout | No | Command timeout in milliseconds (default 30000). The command will be killed if it exceeds this. | |
| connectionId | Yes | The connection ID returned by ssh_connect (defaults to the host value used during connect) | |
| errOnNonZero | No | If true, non-zero exit codes are marked as MCP errors. Default false — only connection/execution failures are errors. Useful because many commands (grep, diff) return non-zero for normal results. |